From 5976ba984e75527c5bfe54737b9c47e8f0ced657 Mon Sep 17 00:00:00 2001 From: hasufell Date: Sun, 5 Oct 2014 15:57:18 +0200 Subject: [PATCH] Style --- Main.hs | 4 +--- Parser.hs | 2 +- 2 files changed, 2 insertions(+), 4 deletions(-) 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