on master help sign in
Merge pull request #3736 from ctford/idris_time

Fix the idris_time special case.

commit7bd33c23558ac35be0c4f65ca90654eb1a433cbe authorNiklas Larsson <metaniklas@gmail.com> dateFri 7 Apr 2017, 21:44 (10 years ago) parentc56feb8a521cc4
1 file changed+1−1
src/Idris/Core/Execute.hs+1−1
src/Idris/Core/Execute.hs+1−1
@@ -348,7 +348,7 @@ execForeign env ctxt arity ty fn xs onfail
348348 ch <- execIO $ fmap (ioWrap . EConstant . I . fromEnum) getChar
349349 execApp env ctxt ch xs
350350 | Just (FFun "idris_time" _ _) <- foreignFromTT arity ty fn xs
351− = do execIO $ fmap (ioWrap . EConstant . I . round) getPOSIXTime
351+ = do execIO $ fmap (ioWrap . mkRaw . EConstant . I . round) getPOSIXTime
352352 | Just (FFun "idris_showerror" _ _) <- foreignFromTT arity ty fn xs
353353 = do execIO $ return $ ioWrap $ EConstant $ Str "Operation not permitted"
354354 | Just (FFun "idris_mkFileError" _ _) <- foreignFromTT arity ty fn xs