Skip to content

Commit

Permalink
Merge pull request #32 from Frege/feature/3.22.524
Browse files Browse the repository at this point in the history
Fix newline while displaying symbols
  • Loading branch information
mmhelloworld committed Aug 15, 2015
2 parents 96980aa + 745c91b commit f57e684
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 f57e684

Please sign in to comment.