This commit is contained in:
2024-12-06 09:34:49 -08:00
parent 3aa127c42b
commit 3227bffaa6
6 changed files with 175 additions and 4 deletions

View File

@@ -652,6 +652,7 @@ buildCase ctx prob scnm scty (dcName, arity, ty) = do
then case y of
PatVar _ _ s => pure $ Just $ c :: (xs ++ acc)
PatWild _ _ => pure $ Just $ c :: (xs ++ acc)
-- FIXME why don't we hit this ('x' for Just x)
PatLit fc lit => error fc "Literal \{show lit} in constructor split"
PatCon _ _ str ys => if str == dcName
then pure $ Just $ !(makeConstr vars ys) ++ xs ++ acc