Change name
This commit is contained in:
parent
804d0da167
commit
2d96a50219
1 changed files with 3 additions and 3 deletions
|
|
@ -396,13 +396,13 @@ checkPattern patt t_patt = case patt of
|
|||
-- Γ ⊢ K p₁ p₂ ↑ B ⊣ Δ
|
||||
PInj name ps -> do
|
||||
t_inj <- maybeToRightM "unknown constructor" =<< lookupInj name
|
||||
let ps' = getParams t_inj
|
||||
unless (length ps' == length ps) $
|
||||
let ts = getParams t_inj
|
||||
unless (length ts' == length ps) $
|
||||
throwError "Wrong number of arguments!"
|
||||
sub <- substituteTVarsOf t_inj
|
||||
subtype (sub $ getDataId t_inj) t_patt
|
||||
let checkP p t = checkPattern p =<< apply (sub t)
|
||||
ps' <- zipWithM checkP ps ps'
|
||||
ps' <- zipWithM checkP ps ts
|
||||
apply (T.PInj (coerce name) (map fst ps'), t_patt)
|
||||
where
|
||||
substituteTVarsOf = \case
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue