Add putStrLn to Control.ST for ConsoleIO
commit698705e6173d22e2646f6682f456874012ccf2e8
authorEdwin Brady <ecb10@st-andrews.ac.uk>
dateMon 20 Mar 2017, 14:26 (10 years ago)
parent195ad13
libs/contrib/Control/ST.idr+4
@@ -539,6 +539,10 @@ interface ConsoleIO (m : Type -> Type) where
539539 putStr : String -> STrans m () xs (const xs)
540540 getStr : STrans m String xs (const xs)
541541
542+export
543+putStrLn : ConsoleIO m => String -> STrans m () xs (const xs)
544+putStrLn str = putStr (str ++ "\n")
545+
542546export
543547ConsoleIO IO where
544548 putStr str = lift (Interactive.putStr str)