on master help sign in
minor cleanups
c458007Hannes Mehnert
src/Idris/IdeSlave.hs+2−2
@@ -41,7 +41,7 @@ instance SExpable Int where
41
41
42instance (SExpable a) => SExpable (Maybe a) where
42instance (SExpable a) => SExpable (Maybe a) where
43 toSExp Nothing = List [SymbolAtom "Nothing"]
43 toSExp Nothing = List [SymbolAtom "Nothing"]
44− toSExp (Just a) = List ((SymbolAtom "Just") : [toSExp a])
44+ toSExp (Just a) = List [SymbolAtom "Just", toSExp a]
45
45
46instance (SExpable a) => SExpable [a] where
46instance (SExpable a) => SExpable [a] where
47 toSExp l = List (map toSExp l)
47 toSExp l = List (map toSExp l)
@@ -66,7 +66,7 @@ atom = do char ':'; x <- atomC; return x
66
66
67atomC = do string "True"; return (BoolAtom True)
67atomC = do string "True"; return (BoolAtom True)
68 <|> do string "False"; return (BoolAtom False)
68 <|> do string "False"; return (BoolAtom False)
69− <|> do xs <- many (noneOf " \n\"()"); return (SymbolAtom xs)
69+ <|> do xs <- many (noneOf " \n\t\r\"()"); return (SymbolAtom xs)
70
70
71quotedChar = noneOf "\""
71quotedChar = noneOf "\""
72 <|> try (string "\\\"" >> return '"')
72 <|> try (string "\\\"" >> return '"')
src/Idris/REPL.hs+2−2
@@ -82,7 +82,7 @@ repl orig mods
82 repl orig mods
82 repl orig mods
83
83
84-- | Run the IdeSlave
84-- | Run the IdeSlave
85−ideslave :: IState -> [FilePath] -> InputT Idris ()
85+ideslave :: IState -> [FilePath] -> Idris ()
86ideslave orig mods
86ideslave orig mods
87 = do x <- liftIO $ receiveMessage
87 = do x <- liftIO $ receiveMessage
88 case x of
88 case x of
@@ -592,7 +592,7 @@ idrisMain opts =
592 [] -> return ()
592 [] -> return ()
593 (o:_) -> process "" (NewCompile o)
593 (o:_) -> process "" (NewCompile o)
594 when (runrepl && not idesl) $ runInputT replSettings $ repl ist inputs
594 when (runrepl && not idesl) $ runInputT replSettings $ repl ist inputs
595− when (idesl) $ runInputT replSettings $ ideslave ist inputs
595+ when (idesl) $ ideslave ist inputs
596 ok <- noErrors
596 ok <- noErrors
597 when (not ok) $ liftIO (exitWith (ExitFailure 1))
597 when (not ok) $ liftIO (exitWith (ExitFailure 1))
598 where
598 where