on master help sign in
fix Core.Execute
commit233a07e76fa90f5968180948c4cdbad858a8a7b2 authorAlex Gryzlov <skyrodent@gmail.com> dateWed 10 Jul 2019, 14:10 (7 years ago) parenta803df4
1 file changed+2−3
src/Idris/Core/Execute.hs+2−3
src/Idris/Core/Execute.hs+2−3
@@ -390,9 +390,8 @@ execForeign env ctxt arity ty fn xs onfail
390390 ". Are all cases covered?"
391391 | Just (FFun "fileRemove" [(_,fileStr)] _) <- foreignFromTT arity ty fn xs
392392 = case fileStr of
393− EConstant (Str f) -> do eofp <- execIO $ removeFile f
394− let res = ioWrap (EConstant (I $ if eofp then 1 else 0))
395− execApp env ctxt res (drop arity xs)
393+ EConstant (Str f) -> do execIO $ removeFile f
394+ execApp env ctxt ioUnit (drop arity xs)
396395 _ -> execFail . Msg $
397396 "The argument to fileRemove should be a constant string, but it was " ++
398397 show handle ++