on master help sign in
Make foreign calls lazily (or they get executed at the wrong time...)
commit598160ca833fc1fb71615cf5c15965e5b0d505a1 authorEdwin Brady <eb@cs.st-andrews.ac.uk> dateSun 8 Jan 2012, 20:36 (15 years ago) parentf3ce933
1 file changed+1−1
src/Idris/Compiler.hs+1−1
src/Idris/Compiler.hs+1−1
@@ -131,7 +131,7 @@ doForeign (_ : fgn : args)
131131 do args' <- mapM epic args
132132 -- wrap it in a prim__IO
133133 -- return $ con_ 0 @@ impossible @@
134− return $ foreign_ rty fgnName (zip args' tys)
134+ return $ lazy_ $ foreign_ rty fgnName (zip args' tys)
135135 | otherwise = fail "Badly formed foreign function call"
136136
137137getFTypes :: TT Name -> [E.Type]