aboutsummaryrefslogtreecommitdiff
path: root/src/AST.hs
diff options
context:
space:
mode:
Diffstat (limited to 'src/AST.hs')
-rw-r--r--src/AST.hs5
1 files changed, 5 insertions, 0 deletions
diff --git a/src/AST.hs b/src/AST.hs
index 76b39b6..878c9fb 100644
--- a/src/AST.hs
+++ b/src/AST.hs
@@ -2,6 +2,8 @@ module AST where
import Data.List.NonEmpty (NonEmpty)
+import Pretty
+
newtype Name = Name String
deriving (Show, Eq)
@@ -61,3 +63,6 @@ data Literal = LInt Integer | LFloat Rational | LChar Char | LString String
data Operator = OAdd | OSub | OMul | ODiv | OMod | OEqu | OPow
| OCons
deriving (Show)
+
+instance Pretty Name where
+ prettysPrec _ (Name n) = showString ("\"" ++ n ++ "\"")