Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Builtins] Defer 'readKnown' until full saturation #4430

Prev Previous commit
Next Next commit
Correct causes for unlifting errors
  • Loading branch information
effectfully committed Mar 21, 2022
commit 932756a8a6d5d96a156e1c5e4fca6b69d374d59c
Original file line number Diff line number Diff line change
Expand Up @@ -307,7 +307,7 @@ applyEvaluate stack (VBuiltin term (BuiltinRuntime sch f _)) arg = do
-- It's only possible to apply a builtin application if the builtin expects a term
-- argument next.
RuntimeSchemeArrow schB -> case f arg of
Left err -> throwReadKnownErrorWithCause $ term' <$ err
Left err -> throwReadKnownErrorWithCause $ argTerm <$ err
Right app -> do
let noCosting = error "The CK machine does not support costing"
runtime' = BuiltinRuntime schB app noCosting
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -709,7 +709,7 @@ enterComputeCek = computeCek (toWordArray 0) where
-- It's only possible to apply a builtin application if the builtin expects a term
-- argument next.
RuntimeSchemeArrow schB -> case f arg of
Left err -> throwReadKnownErrorWithCause $ term' <$ err
Left err -> throwReadKnownErrorWithCause $ argTerm <$ err
Right app -> do
-- TODO: should we bother computing that 'ExMemory' eagerly? We may not need it.
-- We pattern match on @arg@ twice: in 'readKnown' and in 'toExMemory'.
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
(Left An error has occurred: error:
Could not unlift a builtin:
Type mismatch: expected: bool; actual: string
Caused by: [ (force (builtin ifThenElse)) (con string "11 <= 22") ])
Caused by: (con string "11 <= 22"))
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
(Left An error has occurred: error:
Could not unlift a builtin:
Type mismatch: expected: bool; actual: string
Caused by: [ (force (builtin ifThenElse)) (con string "11 <= 22") ])
Caused by: (con string "11 <= 22"))