diff options
Diffstat (limited to 'compiler/typecheck/TcRnTypes.hs')
-rw-r--r-- | compiler/typecheck/TcRnTypes.hs | 21 |
1 files changed, 1 insertions, 20 deletions
diff --git a/compiler/typecheck/TcRnTypes.hs b/compiler/typecheck/TcRnTypes.hs index 2a04bf2a1c..a95079e597 100644 --- a/compiler/typecheck/TcRnTypes.hs +++ b/compiler/typecheck/TcRnTypes.hs @@ -97,7 +97,6 @@ module TcRnTypes( ctLocDepth, bumpCtLocDepth, setCtLocOrigin, setCtLocEnv, setCtLocSpan, CtOrigin(..), exprCtOrigin, lexprCtOrigin, matchesCtOrigin, grhssCtOrigin, - ErrorThing(..), mkErrorThing, errorThingNumArgs_maybe, TypeOrKind(..), isTypeLevel, isKindLevel, pprCtOrigin, pprCtLoc, pushErrCtxt, pushErrCtxtSameOrigin, @@ -3160,7 +3159,7 @@ data CtOrigin | TypeEqOrigin { uo_actual :: TcType , uo_expected :: TcType - , uo_thing :: Maybe ErrorThing + , uo_thing :: Maybe SDoc -- ^ The thing that has type "actual" } @@ -3237,13 +3236,6 @@ data CtOrigin -- Skolem variable arose when we were testing if an instance -- is solvable or not. --- | A thing that can be stored for error message generation only. --- It is stored with a function to zonk and tidy the thing. -data ErrorThing - = forall a. Outputable a => ErrorThing a - (Maybe Arity) -- # of args, if known - (TidyEnv -> a -> TcM (TidyEnv, a)) - -- | Flag to see whether we're type-checking terms or kind-checking types data TypeOrKind = TypeLevel | KindLevel deriving Eq @@ -3260,20 +3252,9 @@ isKindLevel :: TypeOrKind -> Bool isKindLevel TypeLevel = False isKindLevel KindLevel = True --- | Make an 'ErrorThing' that doesn't need tidying or zonking -mkErrorThing :: Outputable a => a -> ErrorThing -mkErrorThing thing = ErrorThing thing Nothing (\env x -> return (env, x)) - --- | Retrieve the # of arguments in the error thing, if known -errorThingNumArgs_maybe :: ErrorThing -> Maybe Arity -errorThingNumArgs_maybe (ErrorThing _ args _) = args - instance Outputable CtOrigin where ppr = pprCtOrigin -instance Outputable ErrorThing where - ppr (ErrorThing thing _ _) = ppr thing - ctoHerald :: SDoc ctoHerald = text "arising from" |