diff options
Diffstat (limited to 'src/AST.hs')
-rw-r--r-- | src/AST.hs | 5 |
1 files changed, 5 insertions, 0 deletions
@@ -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 ++ "\"") |