module ErasedTypeArguments where
open import Agda.Primitive renaming (Set to Type)
open import Agda.Builtin.Unit
open import Agda.Builtin.Nat
record Σ' {i j} (a : Type i) (b : @0 a -> Type j) : Type (i ⊔ j) where
no-eta-equality
constructor _:^:_
field
proj₁ : a
proj₂ : b proj₁
open Σ' public
infixr 4 _:^:_
test₀ : Nat -> Σ' Nat (λ (n : Nat) -> ⊤)
test₀ n = n :^: tt
data Id {i j} (@0 a : Type i) (f : @0 Type i -> Type j) : Type j where
MkId : f a -> Id a f
open import Agda.Builtin.Equality
test : Nat
test = proj₁ (test₀ 40) + unit (proj₂ (test₀ 0)) + unId (MkId 2)
where
unit : ⊤ → Nat
unit tt = 0
unId : Id Nat (λ _ → Nat) → Nat
unId (MkId n) = n
{-# COMPILE AGDA2LAMBOX test #-}
_ : test ≡ 42
_ = refl