From 87e9b7a54ae50398e3c93d8808ade354be035be3 Mon Sep 17 00:00:00 2001 From: Gregor Kleen Date: Mon, 12 Dec 2016 15:32:35 +0100 Subject: Debug output --- ymir/mlmmj-expose.hs | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) (limited to 'ymir') 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) import qualified Data.Set as Set newtype FoxReplace = FoxReplace (Set FoxReplaceGroup) - deriving (Ord, Eq) + deriving (Ord, Eq, Show) data FoxReplaceGroup = FoxReplaceGroup { groupName :: String @@ -36,20 +36,20 @@ data FoxReplaceGroup = FoxReplaceGroup , groupSubs :: Set FoxReplaceSub , groupHtmlMode :: FoxReplaceHTML } - deriving (Ord, Eq) + deriving (Ord, Eq, Show) data FoxReplaceHTML = NoHTML | OutputOnlyHTML | BothHTML - deriving (Ord, Eq, Enum) + deriving (Ord, Eq, Enum, Show) data FoxReplaceSub = FoxReplaceSub { rInput, rOutput :: String , rInputType :: SubInput , rCaseSensitive :: Bool } - deriving (Ord, Eq) + deriving (Ord, Eq, Show) data SubInput = TextInput | WordInput | RegexpInput - deriving (Ord, Eq, Enum) + deriving (Ord, Eq, Enum, Show) instance ToJSON FoxReplace where @@ -160,6 +160,7 @@ main = do , rInputType = WordInput , rCaseSensitive = True } + hPutStrLn stderr . show $ map replaceGroup identities LBS.putStr . encodePretty . FoxReplace . Set.fromList $ map replaceGroup identities putChar '\n' -- cgit v1.2.3