on master help sign in
Fix File effect
commitff1dc887ceee5faf8bb730222970f1808d840910 authorEdwin Brady <ecb10@st-andrews.ac.uk> dateTue 15 Dec 2015, 00:25 (11 years ago) parentbf4bdcc
1 file changed+2−2
libs/effects/Effect/File.idr+2−2
libs/effects/Effect/File.idr+2−2
@@ -79,7 +79,7 @@ instance Handler FileIO IO where
7979 k True (FH h)
8080 handle (FH h) Close k = do closeFile h
8181 k () ()
82− handle (FH h) ReadLine k = do Right str <- fGetStr h
82+ handle (FH h) ReadLine k = do Right str <- fGetLine h
8383 -- Need proper error handling!
8484 | Left err => k "" (FH h)
8585 k str (FH h)
@@ -95,7 +95,7 @@ instance Handler FileIO (IOExcept a) where
9595 k True (FH h)
9696 handle (FH h) Close k = do ioe_lift $ closeFile h
9797 k () ()
98− handle (FH h) ReadLine k = do Right str <- ioe_lift $ fGetStr h
98+ handle (FH h) ReadLine k = do Right str <- ioe_lift $ fGetLine h
9999 -- Need proper error handling!
100100 | Left err => k "" (FH h)
101101 k str (FH h)