on master help sign in
Make prim__readString more consistent with C code

Now, newlines are returned from prim__readString just as in compiled C code.

commitf148775fc5171e9a3cd0ef477f87ca08fb1151ac authorDavid Christiansen <david@davidchristiansen.dk> dateFri 24 May 2013, 11:12 (13 years ago) parent2544d93
1 file changed+1−1
src/Core/Execute.hs+1−1
src/Core/Execute.hs+1−1
@@ -360,7 +360,7 @@ execApp' env ctxt f@(EP _ n _) args =
360360 return (EConstant (Str line))
361361 getOp (UN "prim__readString") [EHandle h] =
362362 Just $ do contents <- execIO $ hGetLine h
363− return (EConstant (Str contents))
363+ return (EConstant (Str (contents ++ "\n")))
364364 getOp (UN "prim__shLInt") [EConstant (I i1), EConstant (I i2)] =
365365 primRes I (shiftL i1 i2)
366366 getOp (UN "prim__shRInt") [EConstant (I i1), EConstant (I i2)] =