This commit is contained in:
Martin Fredin 2023-04-25 13:22:33 +02:00
parent 2d96a50219
commit b5384bf2c3

View file

@ -397,7 +397,7 @@ checkPattern patt t_patt = case patt of
PInj name ps -> do
t_inj <- maybeToRightM "unknown constructor" =<< lookupInj name
let ts = getParams t_inj
unless (length ts' == length ps) $
unless (length ts == length ps) $
throwError "Wrong number of arguments!"
sub <- substituteTVarsOf t_inj
subtype (sub $ getDataId t_inj) t_patt