summaryrefslogtreecommitdiff
path: root/compiler/GHC/Utils/Error.hs
diff options
context:
space:
mode:
authorKrzysztof Gogolewski <krzysztof.gogolewski@tweag.io>2021-12-08 08:38:42 +0100
committerKrzysztof Gogolewski <krzysztof.gogolewski@tweag.io>2021-12-15 18:23:55 +0100
commit3023654df8cb2ff9d24ced05ddb5ad7a5dca2306 (patch)
treeb3ef3bd3988bfb4223affd7f2c10a3a9d6b66ee5 /compiler/GHC/Utils/Error.hs
parent4c6985cc91b9cf89b393f69c9a603e8df0aea9e0 (diff)
downloadhaskell-wip/T20401.tar.gz
Change isUnliftedTyCon to marshalablePrimTyCon (#20401)wip/T20401
isUnliftedTyCon was used in three places: Ticky, Template Haskell and FFI checks. It was straightforward to remove it from Ticky and Template Haskell. It is now used in FFI only and renamed to marshalablePrimTyCon. Previously, it was fetching information from a field in PrimTyCon called is_unlifted. Instead, I've changed the code to compute liftedness based on the kind. isFFITy and legalFFITyCon are removed. They were only referred from an old comment that I removed. There were three functions to define a PrimTyCon, but the only difference was that they were setting is_unlifted to True or False. Everything is now done in mkPrimTyCon. I also added missing integer types in Ticky.hs, I think it was an oversight. Fixes #20401
Diffstat (limited to 'compiler/GHC/Utils/Error.hs')
-rw-r--r--compiler/GHC/Utils/Error.hs6
1 files changed, 1 insertions, 5 deletions
diff --git a/compiler/GHC/Utils/Error.hs b/compiler/GHC/Utils/Error.hs
index c2b708b56a..fb981452b6 100644
--- a/compiler/GHC/Utils/Error.hs
+++ b/compiler/GHC/Utils/Error.hs
@@ -10,7 +10,7 @@
module GHC.Utils.Error (
-- * Basic types
- Validity'(..), Validity, andValid, allValid, isValid, getInvalids, orValid,
+ Validity'(..), Validity, andValid, allValid, getInvalids, orValid,
Severity(..),
-- * Messages
@@ -198,10 +198,6 @@ data Validity' a
-- | Monomorphic version of @Validity'@ specialised for 'SDoc's.
type Validity = Validity' SDoc
-isValid :: Validity' a -> Bool
-isValid IsValid = True
-isValid (NotValid {}) = False
-
andValid :: Validity' a -> Validity' a -> Validity' a
andValid IsValid v = v
andValid v _ = v