Skip to content

Commit

Permalink
Fix newline while displaying symbols
Browse files Browse the repository at this point in the history
  • Loading branch information
mmhelloworld committed Aug 15, 2015
1 parent afd2b89 commit 745c91b
Showing 1 changed file with 3 additions and 5 deletions.
8 changes: 3 additions & 5 deletions frege-repl-core/src/main/frege/frege/repl/FregeRepl.fr
Original file line number Diff line number Diff line change
Expand Up @@ -301,12 +301,10 @@ slurp filePath = do

printMessages :: ReplIO a => a -> [Message] -> IO ()
printMessages console [] = return ()
printMessages console msgs = console.writeln $ Message.showMessages msgs
printMessages console msgs = mapM_ (console.writeln . show) msgs

printSymbolType :: ReplIO a => a -> Global -> Symbol -> IO ()
printSymbolType console g sym = do
console.write ":: "
console.writeln (getSymbolType g sym)
printSymbolType console g sym = console.writeln (getSymbolType g sym)

readMultiline :: ReplIO a => a -> String -> IO String
readMultiline console multilinePrompt = intercalate newLine . reverse <$> f [] where
Expand Down Expand Up @@ -519,7 +517,7 @@ instance ReplIO ConsoleReader where
write console s = try (flip ConsoleReader.print (CharSequence.fromString s)) console
`catch` (\(ioe :: IOException) -> return ())
writeln console s = try (flip ConsoleReader.println s) console
`catch` (\(ioe :: IOException) -> return ())
`catch` (\(ioe :: IOException) -> println ioe.getMessage)
interpretSym console g sym env =
do
valMaybe <- fieldValue (symbolClass sym g) (symbolVar sym g) env.state
Expand Down

0 comments on commit 745c91b

Please sign in to comment.