Closed
Description
data AST a where
BoolLit :: Bool -> AST Bool
IntLit :: Int -> AST Int
eval :: AST a -> a
eval = [wingman| intros x, destruct x |]
with resulting goals:
2 goals
b :: Bool
⊢ Bool
n :: Int
⊢ Bool
Except that no! That second goal should be ⊢ Int
.
What's happening here is that unification gets tracked in the TacticState
, which is shared across the entire search tree. Thus, in the first branch, we learn that a ~ Bool
, and this fact never gets invalidated when we enter the IntLit
case.
@TOTBWF any good idea about what to do here?