Skip to content

Commit

Permalink
Correct causes for unlifting errors
Browse files Browse the repository at this point in the history
  • Loading branch information
effectfully committed Mar 9, 2022
1 parent ce57931 commit 2bf38b9
Show file tree
Hide file tree
Showing 4 changed files with 4 additions and 4 deletions.
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"))

0 comments on commit 2bf38b9

Please sign in to comment.