PrettyInterface.agda 882 B

1234567891011121314151617181920212223242526272829303132333435363738
  1. -- {-# OPTIONS -v 20 #-}
  2. -- {-# OPTIONS -v tc.polarity:30 #-}
  3. -- {-# OPTIONS -v tc.decl:30 #-}
  4. -- {-# OPTIONS -v tc.term:30 #-}
  5. -- {-# OPTIONS -v tc.conv.coerce:20 #-}
  6. -- {-# OPTIONS -v tc.signature:30 #-}
  7. -- {-# OPTIONS -v import.iface:100 #-}
  8. module PrettyInterface where
  9. open import Agda.Primitive
  10. open import Agda.Builtin.Nat
  11. open import Agda.Builtin.Equality
  12. id : ∀{a} {A : Set a} → A → A
  13. id {A = A} a = a
  14. id2 : ∀{A : id Set} → id A → A
  15. id2 x = x
  16. plus0 : ∀ x → x + 0 ≡ x
  17. plus0 zero = refl
  18. plus0 (suc x) rewrite plus0 x = refl
  19. Identity : ∀{a} {A : Set a} (f : A → A) → Set a
  20. Identity f = ∀ x → f x ≡ x
  21. plus-0 : Identity (_+ 0)
  22. plus-0 = plus0
  23. my-Fun : ∀{a b} (A : Set a) (F : A → Set b) → Set (a ⊔ b)
  24. my-Fun A F = (x : A) → F x
  25. syntax my-Fun A (λ x → B) = [ x ∷ A ]=> B
  26. my-id : [ A ∷ Set ]=> [ x ∷ A ]=> A
  27. my-id A x = x