Style
This commit is contained in:
parent
f46d47c827
commit
5976ba984e
4
Main.hs
4
Main.hs
@ -5,6 +5,4 @@ import System.Environment
|
|||||||
main :: IO ()
|
main :: IO ()
|
||||||
main = do
|
main = do
|
||||||
a <- getArgs
|
a <- getArgs
|
||||||
case null a of
|
makeGUI (if null a then head a else "")
|
||||||
False -> makeGUI (head a)
|
|
||||||
True -> makeGUI ""
|
|
||||||
|
@ -17,7 +17,7 @@ newtype Parser a = MkParser { runParser :: String -> Maybe (a, String) }
|
|||||||
|
|
||||||
-- |Functor instance.
|
-- |Functor instance.
|
||||||
instance Functor Parser where
|
instance Functor Parser where
|
||||||
fmap f p = (inParser . fmap . fmap . first $ f) p
|
fmap = inParser . fmap . fmap . first
|
||||||
|
|
||||||
-- |Applicative functor instance.
|
-- |Applicative functor instance.
|
||||||
instance Applicative Parser where
|
instance Applicative Parser where
|
||||||
|
Loading…
Reference in New Issue
Block a user