summaryrefslogtreecommitdiff
path: root/src/Obs/Parser.idr
diff options
context:
space:
mode:
authorGreg Brown <greg.brown01@ed.ac.uk>2023-01-08 00:56:11 +0000
committerGreg Brown <greg.brown01@ed.ac.uk>2023-01-08 00:56:11 +0000
commit9af1a41a58575508c8d2dff6e7b25a5caac8aadc (patch)
tree51522621c0726b19216e13cb18ddc19483c48b54 /src/Obs/Parser.idr
parent028685cef60b5d32e42a0951856e78f39165635a (diff)
Add box types.
Diffstat (limited to 'src/Obs/Parser.idr')
-rw-r--r--src/Obs/Parser.idr18
1 files changed, 18 insertions, 0 deletions
diff --git a/src/Obs/Parser.idr b/src/Obs/Parser.idr
index c1bd468..e59b2d7 100644
--- a/src/Obs/Parser.idr
+++ b/src/Obs/Parser.idr
@@ -40,6 +40,9 @@ data ObsTokenKind
| OTPosition
| OTNextIndex
| OTExtension
+ | OTBox
+ | OTMkBox
+ | OTUnbox
| OTAbsurd
| OTRefl
| OTTransp
@@ -91,6 +94,9 @@ Eq ObsTokenKind where
OTPosition == OTPosition = True
OTNextIndex == OTNextIndex = True
OTExtension == OTExtension = True
+ OTBox == OTBox = True
+ OTMkBox == OTMkBox = True
+ OTUnbox == OTUnbox = True
OTAbsurd == OTAbsurd = True
OTRefl == OTRefl = True
OTTransp == OTTransp = True
@@ -144,6 +150,9 @@ Show ObsTokenKind where
show OTPosition = "Position"
show OTNextIndex = "nextIndex"
show OTExtension = "extension"
+ show OTBox = "Box"
+ show OTMkBox = "box"
+ show OTUnbox = "unbox"
show OTAbsurd = "absurd"
show OTRefl = "refl"
show OTTransp = "transp"
@@ -199,6 +208,9 @@ TokenKind ObsTokenKind where
tokValue OTPosition s = ()
tokValue OTNextIndex s = ()
tokValue OTExtension s = ()
+ tokValue OTBox s = ()
+ tokValue OTMkBox s = ()
+ tokValue OTUnbox s = ()
tokValue OTAbsurd s = ()
tokValue OTRefl s = ()
tokValue OTTransp s = ()
@@ -256,6 +268,9 @@ keywords =
, ("Position", OTPosition)
, ("nextIndex", OTNextIndex)
, ("extension", OTExtension)
+ , ("Box", OTBox)
+ , ("box", OTMkBox)
+ , ("unbox", OTUnbox)
, ("absurd", OTAbsurd)
, ("refl", OTRefl)
, ("transp", OTTransp)
@@ -321,6 +336,9 @@ headForms =
, (OTShape, (0 ** Shape))
, (OTPosition, (0 ** Position))
, (OTNextIndex, (0 ** Next))
+ , (OTBox, (0 ** Box))
+ , (OTMkBox, (0 ** MkBox))
+ , (OTUnbox, (0 ** Unbox))
, (OTAbsurd, (0 ** Absurd))
, (OTRefl, (0 ** Refl))
, (OTTransp, (4 ** Transp))