Permalink
Browse files

Implement hlint suggestions

Use ++ instead of concat
Use getContents instead of System.IO functions.
  • Loading branch information...
1 parent b65d200 commit f310fbd68660ccee870b44e7b9e2dc13539a3620 @Raynes committed Dec 5, 2012
Showing with 3 additions and 4 deletions.
  1. +3 −4 src/Main.hs
View
@@ -8,7 +8,6 @@ import System.FilePath ((</>), takeExtension)
import Control.Monad (when)
import System.Console.CmdArgs
import Network.URI (URI)
-import qualified System.IO as HIO
config :: IO (Maybe (String, String))
config = do
@@ -38,8 +37,8 @@ defArgs = do
, copy = True &= help "True by default. If true, copy resulting link to clipboard."
, language = def &= help "Must be exactly as the language name appears on refheap's dropdown."
, anon = False &= help "Paste anonymously regardless of username and token settings."
- , file = def &= help (concat ["Paste from this file instead of stdin. If ",
- "extension is present, use it to determine language."])
+ , file = def &= help "Paste from this file instead of stdin. If "
+ ++ "extension is present, use it to determine language."
, private = False &= help "False by default. If true, make paste private."
} &= summary "refh v0.1.0"
cfg <- config
@@ -58,7 +57,7 @@ pickLang file language
where ext = takeExtension file
readBody :: String -> IO String
-readBody "" = HIO.hGetContents HIO.stdin
+readBody "" = getContents
readBody file = readFile file
auth :: Bool -> String -> String -> Maybe (String, String)

0 comments on commit f310fbd

Please sign in to comment.