From eca3a0e78e20258bd165053e7832a0490432c59a Mon Sep 17 00:00:00 2001 From: Teddy Wing Date: Fri, 11 Aug 2017 00:04:05 +0200 Subject: Lib.hs: Move `putStrLn` outside the `case` statement It's duplicated so I figured I'd take it out. --- src/Lib.hs | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'src') diff --git a/src/Lib.hs b/src/Lib.hs index f8745b2..a6ea8c0 100644 --- a/src/Lib.hs +++ b/src/Lib.hs @@ -17,7 +17,7 @@ someFunc = do Just plugin = matchPlugin message dbConn <- open "db/sorbot_development.sqlite3" response <- performPlugin plugin message dbConn - case response of - Left e -> putStrLn e - Right r -> putStrLn r + putStrLn $ case response of + Left e -> e + Right r -> r close dbConn -- cgit v1.2.3