diff options
Diffstat (limited to 'ymir')
-rw-r--r-- | ymir/mlmmj-expose.hs | 11 |
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) | |||
28 | import qualified Data.Set as Set | 28 | import qualified Data.Set as Set |
29 | 29 | ||
30 | newtype FoxReplace = FoxReplace (Set FoxReplaceGroup) | 30 | newtype FoxReplace = FoxReplace (Set FoxReplaceGroup) |
31 | deriving (Ord, Eq) | 31 | deriving (Ord, Eq, Show) |
32 | 32 | ||
33 | data FoxReplaceGroup = FoxReplaceGroup | 33 | data 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 | ||
41 | data FoxReplaceHTML = NoHTML | OutputOnlyHTML | BothHTML | 41 | data FoxReplaceHTML = NoHTML | OutputOnlyHTML | BothHTML |
42 | deriving (Ord, Eq, Enum) | 42 | deriving (Ord, Eq, Enum, Show) |
43 | 43 | ||
44 | data FoxReplaceSub = FoxReplaceSub | 44 | data 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 | ||
51 | data SubInput = TextInput | WordInput | RegexpInput | 51 | data SubInput = TextInput | WordInput | RegexpInput |
52 | deriving (Ord, Eq, Enum) | 52 | deriving (Ord, Eq, Enum, Show) |
53 | 53 | ||
54 | 54 | ||
55 | instance ToJSON FoxReplace where | 55 | instance 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' |