Skip to content

Commit

Permalink
[ fix #3853 ] Set quantity to infinity in codomain of pi type
Browse files Browse the repository at this point in the history
  • Loading branch information
jespercockx committed Jun 13, 2019
1 parent 20097f6 commit 37e8d81
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 3 deletions.
7 changes: 4 additions & 3 deletions src/full/Agda/TypeChecking/Rules/Term.hs
Expand Up @@ -291,7 +291,7 @@ checkTypedBindings lamOrPi (A.TBind r xs' e) ret = do
OutputTypeNameNotYetKnown{} -> return ()
NoOutputTypeName -> warning . InstanceNoOutputTypeName =<< prettyTCM (A.TBind r ixs e)

let xs' = (map . mapRelevance) (modRel lamOrPi experimental) xs
let xs' = map (modMod lamOrPi experimental) xs
addContext (xs', t) $
ret $ namedBindsToTel xs t
where
Expand All @@ -301,8 +301,9 @@ checkTypedBindings lamOrPi (A.TBind r xs' e) ret = do
-- modify the new context entries
modEnv LamNotPi = workOnTypes
modEnv _ = id
modRel PiNotLam xp = if xp then irrToNonStrict else id
modRel _ _ = id
modMod PiNotLam xp = (if xp then mapRelevance irrToNonStrict else id)
. (setQuantity Quantityω)
modMod _ _ = id
checkTypedBindings lamOrPi (A.TLet _ lbs) ret = do
checkLetBindings lbs (ret EmptyTel)

Expand Down
5 changes: 5 additions & 0 deletions test/Succeed/Issue3853.agda
@@ -0,0 +1,5 @@
postulate
A : Set
B : A Set

T = (@0 x : A) B x

0 comments on commit 37e8d81

Please sign in to comment.