diff options
Diffstat (limited to 'compiler/GHC/Tc/Errors/Types.hs')
-rw-r--r-- | compiler/GHC/Tc/Errors/Types.hs | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/compiler/GHC/Tc/Errors/Types.hs b/compiler/GHC/Tc/Errors/Types.hs index e2707b4aa4..0420a4e498 100644 --- a/compiler/GHC/Tc/Errors/Types.hs +++ b/compiler/GHC/Tc/Errors/Types.hs @@ -665,6 +665,20 @@ data TcRnMessage where -} TcRnTagToEnumResTyNotAnEnum :: Type -> TcRnMessage + {-| TcRnTagToEnumResTyTypeData is an error that occurs when the 'tagToEnum#' + function is given a result type that is headed by a @type data@ type, as + the data constructors of a @type data@ do not exist at the term level. + + Example(s): + type data Letter = A | B | C + + foo :: Letter + foo = tagToEnum# 0# + + Test cases: type-data/should_fail/TDTagToEnum.hs + -} + TcRnTagToEnumResTyTypeData :: Type -> TcRnMessage + {-| TcRnArrowIfThenElsePredDependsOnResultTy is an error that occurs when the predicate type of an ifThenElse expression in arrow notation depends on the type of the result. |