on master help sign in
Merge pull request #3736 from ctford/idris_time
7bd33c2Niklas Larsson
src/Idris/Core/Execute.hs+1−1
@@ -348,7 +348,7 @@ execForeign env ctxt arity ty fn xs onfail
348 ch <- execIO $ fmap (ioWrap . EConstant . I . fromEnum) getChar
348 ch <- execIO $ fmap (ioWrap . EConstant . I . fromEnum) getChar
349 execApp env ctxt ch xs
349 execApp env ctxt ch xs
350 | Just (FFun "idris_time" _ _) <- foreignFromTT arity ty fn xs
350 | 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
352 | Just (FFun "idris_showerror" _ _) <- foreignFromTT arity ty fn xs
352 | Just (FFun "idris_showerror" _ _) <- foreignFromTT arity ty fn xs
353 = do execIO $ return $ ioWrap $ EConstant $ Str "Operation not permitted"
353 = do execIO $ return $ ioWrap $ EConstant $ Str "Operation not permitted"
354 | Just (FFun "idris_mkFileError" _ _) <- foreignFromTT arity ty fn xs
354 | Just (FFun "idris_mkFileError" _ _) <- foreignFromTT arity ty fn xs