This commit is contained in:
3
.gitignore
vendored
3
.gitignore
vendored
@@ -6,4 +6,5 @@ dist-newstyle
|
||||
*.hi
|
||||
.ghc.environment.*
|
||||
*.tix
|
||||
.direnv
|
||||
.direnv
|
||||
result
|
||||
@@ -24,7 +24,7 @@
|
||||
shell.tools = {
|
||||
cabal = {};
|
||||
# hlint = {};
|
||||
# haskell-language-server = {};
|
||||
haskell-language-server = {};
|
||||
};
|
||||
# Non-Haskell shell tools go here
|
||||
shell.buildInputs = with final; [
|
||||
|
||||
@@ -170,15 +170,14 @@ instance Pretty ExtTy where
|
||||
-- | Constant/immediate
|
||||
data Const
|
||||
-- MAYBE just use a signed type
|
||||
= CInt Bool Word64 -- ^ 64 bit integer. The 'Bool' is whether to negate.
|
||||
= CInt Integer -- ^ Integer
|
||||
| CSingle Float -- ^ Single-precision float
|
||||
| CDouble Double -- ^ Double-precision float
|
||||
| CGlobal (Ident 'Global) -- ^ Global symbol
|
||||
deriving (Show, Eq)
|
||||
|
||||
instance Pretty Const where
|
||||
pretty (CInt negative int) | negative = pretty '-' <> pretty int
|
||||
| otherwise = pretty int
|
||||
pretty (CInt int) = pretty int
|
||||
pretty (CSingle float) = "s_" <> pretty float
|
||||
pretty (CDouble double) = "d_" <> pretty double
|
||||
pretty (CGlobal ident) = pretty ident
|
||||
|
||||
Reference in New Issue
Block a user