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