on master help sign in
Make prim__readString more consistent with C code
f148775David Christiansen
src/Core/Execute.hs+1−1
@@ -360,7 +360,7 @@ execApp' env ctxt f@(EP _ n _) args =
360 return (EConstant (Str line))
360 return (EConstant (Str line))
361 getOp (UN "prim__readString") [EHandle h] =
361 getOp (UN "prim__readString") [EHandle h] =
362 Just $ do contents <- execIO $ hGetLine h
362 Just $ do contents <- execIO $ hGetLine h
363− return (EConstant (Str contents))
363+ return (EConstant (Str (contents ++ "\n")))
364 getOp (UN "prim__shLInt") [EConstant (I i1), EConstant (I i2)] =
364 getOp (UN "prim__shLInt") [EConstant (I i1), EConstant (I i2)] =
365 primRes I (shiftL i1 i2)
365 primRes I (shiftL i1 i2)
366 getOp (UN "prim__shRInt") [EConstant (I i1), EConstant (I i2)] =
366 getOp (UN "prim__shRInt") [EConstant (I i1), EConstant (I i2)] =