1
- {-# LANGUAGE LambdaCase, OverloadedStrings #-}
1
+ {-# LANGUAGE GeneralizedNewtypeDeriving #-}
2
+ {-# LANGUAGE LambdaCase #-}
3
+ {-# LANGUAGE OverloadedStrings#-}
4
+
2
5
-- | Atoms used by the Crucible CFG concrete syntax.
3
6
module Lang.Crucible.Syntax.Atoms
4
7
(
@@ -24,20 +27,21 @@ import qualified Data.Text as T
24
27
25
28
import Lang.Crucible.Syntax.SExpr
26
29
import Numeric
30
+ import qualified Prettyprinter as PP
27
31
28
32
import Text.Megaparsec as MP hiding (many , some )
29
33
import Text.Megaparsec.Char
30
34
31
35
-- | The name of an atom (non-keyword identifier)
32
- newtype AtomName = AtomName Text deriving (Eq , Ord , Show )
36
+ newtype AtomName = AtomName Text deriving (Eq , Ord , PP.Pretty , Show )
33
37
-- | The name of a label (identifier followed by colon)
34
- newtype LabelName = LabelName Text deriving (Eq , Ord , Show )
38
+ newtype LabelName = LabelName Text deriving (Eq , Ord , PP.Pretty , Show )
35
39
-- | The name of a register (dollar sign followed by identifier)
36
- newtype RegName = RegName Text deriving (Eq , Ord , Show )
40
+ newtype RegName = RegName Text deriving (Eq , Ord , PP.Pretty , Show )
37
41
-- | The name of a function (at-sign followed by identifier)
38
- newtype FunName = FunName Text deriving (Eq , Ord , Show )
42
+ newtype FunName = FunName Text deriving (Eq , Ord , PP.Pretty , Show )
39
43
-- | The name of a global variable (two dollar signs followed by identifier)
40
- newtype GlobalName = GlobalName Text deriving (Eq , Ord , Show )
44
+ newtype GlobalName = GlobalName Text deriving (Eq , Ord , PP.Pretty , Show )
41
45
42
46
-- | Individual language keywords (reserved identifiers)
43
47
data Keyword = Defun | DefBlock | DefGlobal | Declare | Extern
0 commit comments