QNameOrder.agda 535 B

123456789101112131415161718192021222324252627282930
  1. module _ where
  2. open import Agda.Builtin.Reflection
  3. open import Agda.Builtin.Bool
  4. open import Agda.Builtin.Unit
  5. open import Agda.Builtin.String
  6. open import Common.Prelude
  7. _<_ = primQNameLess
  8. True : Bool → Set
  9. True true = ⊤
  10. True false = ⊥
  11. zzz aaa : ⊤
  12. zzz = _
  13. aaa = _
  14. ⊥-elim : {A : Set} → ⊥ → A
  15. ⊥-elim ()
  16. check : (x y : Name) → True (x < y) → String
  17. check x y prf with x < y
  18. check x y prf | true = "A-ok"
  19. check x y prf | false = ⊥-elim prf
  20. main : IO Unit
  21. main = putStrLn (check (quote zzz) (quote aaa) _)