agda / agda

Agda is a dependently typed programming language / interactive theorem prover.

Home Page:https://wiki.portal.chalmers.se/agda/pmwiki.php

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Mimer drops part of the solution with module parameter

andreasabel opened this issue · comments

open import Agda.Primitive renaming (Set to Type)
open import Agda.Builtin.Nat using (zero; suc) renaming (Nat to ℕ)

data T : Type where
  c : {n}  T n  T (suc n)

module _ (A : Set) where

  data D (n : ℕ) : Type where
    foo : T n  D n
    bar : T (suc n)  D n

  test : {n : ℕ}  T n  D n
  test (c t) = {!!}  -- C-c C-a just gives "foo"

Without the module parameter, the solution is foo (c t).