diff --git a/Main.hs b/Main.hs index 300474a..b384b2c 100644 --- a/Main.hs +++ b/Main.hs @@ -5,6 +5,4 @@ import System.Environment main :: IO () main = do a <- getArgs - case null a of - False -> makeGUI (head a) - True -> makeGUI "" + makeGUI (if null a then head a else "") diff --git a/Parser.hs b/Parser.hs index 915173b..d783c13 100644 --- a/Parser.hs +++ b/Parser.hs @@ -17,7 +17,7 @@ newtype Parser a = MkParser { runParser :: String -> Maybe (a, String) } -- |Functor instance. instance Functor Parser where - fmap f p = (inParser . fmap . fmap . first $ f) p + fmap = inParser . fmap . fmap . first -- |Applicative functor instance. instance Applicative Parser where