From 9af1a41a58575508c8d2dff6e7b25a5caac8aadc Mon Sep 17 00:00:00 2001 From: Greg Brown Date: Sun, 8 Jan 2023 00:56:11 +0000 Subject: Add box types. --- src/Obs/Parser.idr | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) (limited to 'src/Obs/Parser.idr') 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)) -- cgit v1.2.3