aboutsummaryrefslogtreecommitdiff
path: root/server
diff options
context:
space:
mode:
Diffstat (limited to 'server')
-rw-r--r--server/test/Thermoprint/Server/Printer/GenericSpec.hs7
-rw-r--r--server/thermoprint-server.cabal2
-rw-r--r--server/thermoprint-server.nix2
3 files changed, 3 insertions, 8 deletions
diff --git a/server/test/Thermoprint/Server/Printer/GenericSpec.hs b/server/test/Thermoprint/Server/Printer/GenericSpec.hs
index 80096b0..e535754 100644
--- a/server/test/Thermoprint/Server/Printer/GenericSpec.hs
+++ b/server/test/Thermoprint/Server/Printer/GenericSpec.hs
@@ -29,8 +29,6 @@ import Data.Word
29import Data.Sequence (Seq) 29import Data.Sequence (Seq)
30import qualified Data.Sequence as Seq 30import qualified Data.Sequence as Seq
31 31
32import Debug.Trace
33
34instance IsString Line where 32instance IsString Line where
35 fromString = (\(Right l) -> l) . text . TL.pack 33 fromString = (\(Right l) -> l) . text . TL.pack
36 34
@@ -40,7 +38,7 @@ spec = do
40 zipWithM_ example [1..] examples 38 zipWithM_ example [1..] examples
41 where 39 where
42 example n (s, ts) = let str = show s 40 example n (s, ts) = let str = show s
43 in specify str $ traceDump (mkPrintout . Printout . fmap (Paragraph . Seq.singleton) . fmap Cooked $ s) == ts 41 in specify str $ (mkPrintout . Printout . fmap (Paragraph . Seq.singleton) . fmap Cooked $ s) == ts
44 42
45final, initial :: L.ByteString 43final, initial :: L.ByteString
46initial = esc [64] <> esc [64] 44initial = esc [64] <> esc [64]
@@ -52,9 +50,6 @@ esc = L.BS.pack . (27:)
52p :: L.ByteString -> L.ByteString 50p :: L.ByteString -> L.ByteString
53p = (<> final) . (initial <>) 51p = (<> final) . (initial <>)
54 52
55traceDump :: L.ByteString -> L.ByteString
56traceDump bs = traceShow (map (\b -> (b, (toEnum $ fromEnum b) :: Char)) $ L.BS.unpack bs) bs
57
58examples :: [(Seq Block, L.ByteString)] 53examples :: [(Seq Block, L.ByteString)]
59examples = [ ( [Line (JuxtaPos ["Hello", HSpace 1, "World!"])] 54examples = [ ( [Line (JuxtaPos ["Hello", HSpace 1, "World!"])]
60 , p "Hello World!") 55 , p "Hello World!")
diff --git a/server/thermoprint-server.cabal b/server/thermoprint-server.cabal
index c80351b..eae3754 100644
--- a/server/thermoprint-server.cabal
+++ b/server/thermoprint-server.cabal
@@ -2,7 +2,7 @@
2-- documentation, see http://haskell.org/cabal/users-guide/ 2-- documentation, see http://haskell.org/cabal/users-guide/
3 3
4name: thermoprint-server 4name: thermoprint-server
5version: 2.0.1 5version: 2.0.2
6synopsis: Server for thermoprint-spec 6synopsis: Server for thermoprint-spec
7-- description: 7-- description:
8homepage: http://dirty-haskell.org/tags/thermoprint.html 8homepage: http://dirty-haskell.org/tags/thermoprint.html
diff --git a/server/thermoprint-server.nix b/server/thermoprint-server.nix
index 71a4211..41e645a 100644
--- a/server/thermoprint-server.nix
+++ b/server/thermoprint-server.nix
@@ -9,7 +9,7 @@
9}: 9}:
10mkDerivation { 10mkDerivation {
11 pname = "thermoprint-server"; 11 pname = "thermoprint-server";
12 version = "2.0.1"; 12 version = "2.0.2";
13 src = ./.; 13 src = ./.;
14 isLibrary = true; 14 isLibrary = true;
15 isExecutable = true; 15 isExecutable = true;