hazel
hazel copied to clipboard
CastBVHoleGround exception raised during evaluation of Examples.map_example
Given the following edit state:
Expected behavior:
Pressing <Space>
should promote the f
to an application of f
to a fresh expression hole.
Actual behavior:
The following exception is caught and reported in the console log:
[EvaluatorError.Exception((CastBVHoleGround
(Cast
(Fun (Var x)
(((VarBinding x Hole)
(VarBinding map (Arrow (Arrow Int Int) (Arrow (List Int) (List Int))))
(VarBinding PI Float) (VarBinding int_of_float (Arrow Float Int))
(VarBinding float_of_int (Arrow Int Float))
(VarBinding mod (Arrow Int (Arrow Int Int))))
Hole)
(BinIntOp Plus
(Cast (BoundVar x)
(((VarBinding x Hole)
(VarBinding map (Arrow (Arrow Int Int) (Arrow (List Int) (List Int))))
(VarBinding PI Float) (VarBinding int_of_float (Arrow Float Int))
(VarBinding float_of_int (Arrow Int Float))
(VarBinding mod (Arrow Int (Arrow Int Int))))
Hole)
(((VarBinding PI Float) (VarBinding int_of_float (Arrow Float Int))
(VarBinding float_of_int (Arrow Int Float))
(VarBinding mod (Arrow Int (Arrow Int Int))))
Int))
(IntLit 1)))
(((VarBinding map (Arrow (Arrow Int Int) (Arrow (List Int) (List Int))))
(VarBinding PI Float) (VarBinding int_of_float (Arrow Float Int))
(VarBinding float_of_int (Arrow Int Float))
(VarBinding mod (Arrow Int (Arrow Int Int))))
(Arrow Hole Int))
(((VarBinding map (Arrow (Arrow Int Int) (Arrow (List Int) (List Int))))
(VarBinding PI Float) (VarBinding int_of_float (Arrow Float Int))
(VarBinding float_of_int (Arrow Int Float))
(VarBinding mod (Arrow Int (Arrow Int Int))))
(Arrow Int Int)))))]
This term can be written more concisely as (fun x { x + 1 })<? => Int -> Int => Int>
.
We get the same error if we begin with the cursor in the adjacent hole (143) instead.
Constructing and manipulating other operators (e.g., +
or '::') does not raise the error.