X-Git-Url: http://git.megacz.com/?p=ghc-hetmet.git;a=blobdiff_plain;f=compiler%2FbasicTypes%2FMkId.lhs;h=986542bdb3a1a79a64b1d2d6d0fee5add4e226f7;hp=1fe712b285e14012085c39e53c05d4fbb0e845be;hb=9414bda057e8ac8422ca5590c8500c7cdee323bb;hpb=a11662957fa688997e6c4befff44e7efe94c2db8 diff --git a/compiler/basicTypes/MkId.lhs b/compiler/basicTypes/MkId.lhs index 1fe712b..986542b 100644 --- a/compiler/basicTypes/MkId.lhs +++ b/compiler/basicTypes/MkId.lhs @@ -35,7 +35,7 @@ module MkId ( unsafeCoerceId, realWorldPrimId, voidArgId, nullAddrId, seqId, lazyId, lazyIdUnfolding, lazyIdKey, - mkRuntimeErrorApp, + mkRuntimeErrorApp, mkImpossibleExpr, rEC_CON_ERROR_ID, iRREFUT_PAT_ERROR_ID, rUNTIME_ERROR_ID, nON_EXHAUSTIVE_GUARDS_ERROR_ID, nO_METHOD_BINDING_ERROR_ID, pAT_ERROR_ID, eRROR_ID, rEC_SEL_ERROR_ID, @@ -53,7 +53,7 @@ import Type import TypeRep import Coercion import TcType -import CoreUtils +import CoreUtils ( exprType, mkCoerce ) import CoreUnfold import Literal import TyCon @@ -977,6 +977,10 @@ mkRuntimeErrorApp err_id res_ty err_msg where err_string = Lit (mkMachString err_msg) +mkImpossibleExpr :: Type -> CoreExpr +mkImpossibleExpr res_ty + = mkRuntimeErrorApp rUNTIME_ERROR_ID res_ty "Impossible case alternative" + rEC_SEL_ERROR_ID = mkRuntimeErrorId recSelErrorName rUNTIME_ERROR_ID = mkRuntimeErrorId runtimeErrorName iRREFUT_PAT_ERROR_ID = mkRuntimeErrorId irrefutPatErrorName