Skip to content

Commit f57e684

Browse files
committed
Merge pull request #32 from Frege/feature/3.22.524
Fix newline while displaying symbols
2 parents 96980aa + 745c91b commit f57e684

File tree

1 file changed

+3
-5
lines changed

1 file changed

+3
-5
lines changed

frege-repl-core/src/main/frege/frege/repl/FregeRepl.fr

+3-5
Original file line numberDiff line numberDiff line change
@@ -301,12 +301,10 @@ slurp filePath = do
301301

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

306306
printSymbolType :: ReplIO a => a -> Global -> Symbol -> IO ()
307-
printSymbolType console g sym = do
308-
console.write ":: "
309-
console.writeln (getSymbolType g sym)
307+
printSymbolType console g sym = console.writeln (getSymbolType g sym)
310308

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

0 commit comments

Comments
 (0)