on master help sign in
Merge branch 'master' of github.com:idris-lang/Idris-dev into liftDecls_js_backend
commitb5715bffb966cdef32d166c2cd1a5d6b49abf8b9 authorRui Barreiro <rui.barreiro@gmail.com> dateWed 17 May 2017, 07:24 (9 years ago) parent57fb08e29e271c
2 files changed+4−5
rts/idris_stdfgn.c+1−1 src/IRTS/Portable.hs+3−4
rts/idris_stdfgn.c+1−1
@@ -61,7 +61,7 @@ int fileSize(void* h) {
6161
6262int idris_writeStr(void* h, char* str) {
6363 FILE* f = (FILE*)h;
64− if (fputs(str, f)) {
64+ if (fputs(str, f) >= 0) {
6565 return 0;
6666 } else {
6767 return -1;
src/IRTS/Portable.hs+3−4
@@ -144,6 +144,8 @@ instance ToJSON PrimFn where
144144 toJSON (LTimes aty) = object ["LTimes" .= aty]
145145 toJSON (LUDiv aty) = object ["LUDiv" .= aty]
146146 toJSON (LSDiv aty) = object ["LSDiv" .= aty]
147+ toJSON (LURem ity) = object ["LURem" .= ity]
148+ toJSON (LSRem aty) = object ["LSRem" .= aty]
147149 toJSON (LAnd ity) = object ["LAnd" .= ity]
148150 toJSON (LOr ity) = object ["LOr" .= ity]
149151 toJSON (LXOr ity) = object ["LXOr" .= ity]
@@ -200,12 +202,9 @@ instance ToJSON PrimFn where
200202 toJSON LFork = object ["LFork" .= Null]
201203 toJSON LPar = object ["LPar" .= Null]
202204 toJSON (LExternal name) = object ["LExternal" .= name]
205+ toJSON LCrash = object ["LCrash" .= Null]
203206 toJSON LNoOp = object ["LNoOp" .= Null]
204207
205−
206−
207−
208−
209208instance ToJSON DDecl where
210209 toJSON (DFun name args exp) = object ["DFun" .= (name, args, exp)]
211210 toJSON (DConstructor name tag arity) = object ["DConstructor" .= (name, tag, arity)]