Added explicit case to headEq to allow matching on Pi Types.

This commit is contained in:
Donovan Crichton 2020-07-25 12:59:33 +10:00
parent 39f23ffd9b
commit 048f1887ea

View File

@ -601,6 +601,7 @@ sameType {ns} fc phase fn env (p :: xs)
firstPat (pinf :: _) = pat pinf
headEq : NF ns -> NF ns -> Phase -> Bool
headEq (NBind _ _ (Pi _ _ _) _) (NBind _ _ (Pi _ _ _) _) _ = True
headEq (NTCon _ n _ _ _) (NTCon _ n' _ _ _) _ = n == n'
headEq (NPrimVal _ c) (NPrimVal _ c') _ = c == c'
headEq (NType _) (NType _) _ = True