summaryrefslogtreecommitdiff
path: root/ymir/mlmmj-expose.hs
diff options
context:
space:
mode:
authorGregor Kleen <pngwjpgh@users.noreply.github.com>2016-12-12 15:32:35 +0100
committerGregor Kleen <pngwjpgh@users.noreply.github.com>2016-12-12 15:32:35 +0100
commit87e9b7a54ae50398e3c93d8808ade354be035be3 (patch)
tree2f5891cb21f673d573d7effb89a9d7b93a2f375c /ymir/mlmmj-expose.hs
parent5fab29b4ffc801eba2d8747fa51bb82f102a5e14 (diff)
downloadnixos-87e9b7a54ae50398e3c93d8808ade354be035be3.tar
nixos-87e9b7a54ae50398e3c93d8808ade354be035be3.tar.gz
nixos-87e9b7a54ae50398e3c93d8808ade354be035be3.tar.bz2
nixos-87e9b7a54ae50398e3c93d8808ade354be035be3.tar.xz
nixos-87e9b7a54ae50398e3c93d8808ade354be035be3.zip
Debug output
Diffstat (limited to 'ymir/mlmmj-expose.hs')
-rw-r--r--ymir/mlmmj-expose.hs11
1 files changed, 6 insertions, 5 deletions
diff --git a/ymir/mlmmj-expose.hs b/ymir/mlmmj-expose.hs
index 73e329d8..b5fc9cab 100644
--- a/ymir/mlmmj-expose.hs
+++ b/ymir/mlmmj-expose.hs
@@ -28,7 +28,7 @@ import Data.Set (Set)
28import qualified Data.Set as Set 28import qualified Data.Set as Set
29 29
30newtype FoxReplace = FoxReplace (Set FoxReplaceGroup) 30newtype FoxReplace = FoxReplace (Set FoxReplaceGroup)
31 deriving (Ord, Eq) 31 deriving (Ord, Eq, Show)
32 32
33data FoxReplaceGroup = FoxReplaceGroup 33data FoxReplaceGroup = FoxReplaceGroup
34 { groupName :: String 34 { groupName :: String
@@ -36,20 +36,20 @@ data FoxReplaceGroup = FoxReplaceGroup
36 , groupSubs :: Set FoxReplaceSub 36 , groupSubs :: Set FoxReplaceSub
37 , groupHtmlMode :: FoxReplaceHTML 37 , groupHtmlMode :: FoxReplaceHTML
38 } 38 }
39 deriving (Ord, Eq) 39 deriving (Ord, Eq, Show)
40 40
41data FoxReplaceHTML = NoHTML | OutputOnlyHTML | BothHTML 41data FoxReplaceHTML = NoHTML | OutputOnlyHTML | BothHTML
42 deriving (Ord, Eq, Enum) 42 deriving (Ord, Eq, Enum, Show)
43 43
44data FoxReplaceSub = FoxReplaceSub 44data FoxReplaceSub = FoxReplaceSub
45 { rInput, rOutput :: String 45 { rInput, rOutput :: String
46 , rInputType :: SubInput 46 , rInputType :: SubInput
47 , rCaseSensitive :: Bool 47 , rCaseSensitive :: Bool
48 } 48 }
49 deriving (Ord, Eq) 49 deriving (Ord, Eq, Show)
50 50
51data SubInput = TextInput | WordInput | RegexpInput 51data SubInput = TextInput | WordInput | RegexpInput
52 deriving (Ord, Eq, Enum) 52 deriving (Ord, Eq, Enum, Show)
53 53
54 54
55instance ToJSON FoxReplace where 55instance ToJSON FoxReplace where
@@ -160,6 +160,7 @@ main = do
160 , rInputType = WordInput 160 , rInputType = WordInput
161 , rCaseSensitive = True 161 , rCaseSensitive = True
162 } 162 }
163 hPutStrLn stderr . show $ map replaceGroup identities
163 164
164 LBS.putStr . encodePretty . FoxReplace . Set.fromList $ map replaceGroup identities 165 LBS.putStr . encodePretty . FoxReplace . Set.fromList $ map replaceGroup identities
165 putChar '\n' 166 putChar '\n'