Created
February 19, 2020 18:25
-
-
Save pnlph/c6651cb49b0f3f74d5c286f630f83426 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
module ReflectionNames where | |
postulate Name : Set | |
{-# BUILTIN QNAME Name #-} | |
data Bool : Set where | |
false : Bool | |
true : Bool | |
{-# BUILTIN BOOL Bool #-} | |
{-# BUILTIN FALSE false #-} | |
{-# BUILTIN TRUE true #-} | |
postulate String : Set | |
{-# BUILTIN STRING String #-} | |
primitive | |
primQNameEquality : Name → Name → Bool | |
primQNameLess : Name → Name → Bool | |
primShowQName : Name → String | |
data Nat : Set where | |
zero : Nat | |
suc : Nat → Nat | |
nameOfNat : Name | |
nameOfNat = quote Nat | |
nameOfBool : Name | |
nameOfBool = quote Bool | |
isNat : Name → Bool | |
isNat (quote Nat) = true | |
isNat _ = false |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment