]> woffs.de Git - fd/haskell-amqp-utils.git/commitdiff
more Flexprint instances
authorFrank Doepper <[email protected]>
Fri, 6 Dec 2019 21:59:15 +0000 (22:59 +0100)
committerFrank Doepper <[email protected]>
Fri, 6 Dec 2019 21:59:15 +0000 (22:59 +0100)
Network/AMQP/Utils/Helpers.hs

index 6e135158cc3d4e4e93c34f7e7431befd7941bc24..5763326d1f90f34e9f4d4cfee184eb114bc83b9d 100644 (file)
@@ -17,11 +17,6 @@ import System.Exit
 import System.IO
 import System.Process
 
--- | log cmdline options
-listToMaybeUnwords :: [String] -> Maybe String
-listToMaybeUnwords [] = Nothing
-listToMaybeUnwords x = Just $ unwords x
-
 -- | Strings or ByteStrings with label, oder nothing at all
 printwithlabel :: String -> Maybe (IO ()) -> IO ()
 printwithlabel _ Nothing = return ()
@@ -37,7 +32,7 @@ instance Flexprint (Maybe String) where
   flexprint = fmap (hPutStrLn stderr)
 
 instance Flexprint (Maybe Int) where
-  flexprint = fmap (hPutStrLn stderr . show)
+  flexprint x = flexprint (fmap show x)
 
 instance Flexprint String where
   flexprint x = flexprint (Just x)
don't click here