Skip to content

Instantly share code, notes, and snippets.

@sellout
Created May 2, 2014 20:17
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save sellout/8923cf1bbbe498702651 to your computer and use it in GitHub Desktop.
Save sellout/8923cf1bbbe498702651 to your computer and use it in GitHub Desktop.
-- - + Errors (2)
-- |-- (eliminator) line 0 col 0:
-- | Can't convert
-- | texp t__4
-- | with
-- | texp t
-- `-- line 0 col 0:
-- No type declaration for <<Main.texp eliminator>>
data type : Type where
nat : type
bool : type
data tbinop : type -> type -> type -> Type where
TPlus : tbinop nat nat nat
TTimes : tbinop nat nat nat
TEq : (t : type) -> tbinop t t bool
TLt : tbinop nat nat bool
%elim
data texp : type -> Type where
TNConst : Nat -> texp nat
TBConst : Bool -> texp bool
TBinop : (t1, t2, t : type) -> tbinop t1 t2 t -> texp t1 -> texp t2 -> texp t
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment