summaryrefslogtreecommitdiff
path: root/Language/C.hs
diff options
context:
space:
mode:
authorTom Smeding <tom@tomsmeding.com>2021-09-25 21:45:43 +0200
committerTom Smeding <tom@tomsmeding.com>2021-09-25 21:46:10 +0200
commit57e5bbbbab0d5315c6bba497447ff9bf2487e995 (patch)
treee505ed9ff97f8822824c5b8d1d7615f5c86f1d65 /Language/C.hs
parent070772f008bcb5edb63f3f2c2c5f10c4eb9cb008 (diff)
Lots of stuff; can compile simple single-generate program
Diffstat (limited to 'Language/C.hs')
-rw-r--r--Language/C.hs3
1 files changed, 3 insertions, 0 deletions
diff --git a/Language/C.hs b/Language/C.hs
index 35cf432..6a3256f 100644
--- a/Language/C.hs
+++ b/Language/C.hs
@@ -9,6 +9,7 @@ data FunDef
| ProcDef Name [(Type, Name)] [Stmt]
deriving (Show, Eq)
+-- | Some C types.
data Type
= TInt Bits
| TUInt Bits
@@ -17,9 +18,11 @@ data Type
| TPtr Type
deriving (Show, Eq)
+-- | The number of bits in a C integral type.
data Bits = B8 | B16 | B32 | B64
deriving (Show, Eq)
+-- | A C variable or function name.
newtype Name = Name String
deriving (Show, Eq, Ord)