-mkCaseAltMsg :: CoreCaseAlts -> ErrMsg
-mkCaseAltMsg alts sty
- = ppAbove (ppStr "Type of case alternatives not the same:")
- (ppr sty alts)
-
-mkCaseDataConMsg :: CoreExpr -> ErrMsg
-mkCaseDataConMsg expr sty
- = ppAbove (ppStr "A case scrutinee not of data constructor type:")
- (pp_expr sty expr)
-
-mkCaseNotPrimMsg :: TyCon -> ErrMsg
-mkCaseNotPrimMsg tycon sty
- = ppAbove (ppStr "A primitive case on a non-primitive type:")
- (ppr sty tycon)
-
-mkCasePrimMsg :: TyCon -> ErrMsg
-mkCasePrimMsg tycon sty
- = ppAbove (ppStr "An algebraic case on a primitive type:")
- (ppr sty tycon)
-
-mkCaseAbstractMsg :: TyCon -> ErrMsg
-mkCaseAbstractMsg tycon sty
- = ppAbove (ppStr "An algebraic case on some weird type:")
- (ppr sty tycon)
-
-mkDefltMsg :: CoreCaseDefault -> ErrMsg
-mkDefltMsg deflt sty
- = ppAbove (ppStr "Binder in case default doesn't match type of scrutinee:")
- (ppr sty deflt)
-
-mkAppMsg :: Type -> Type -> CoreExpr -> ErrMsg
-mkAppMsg fun arg expr sty
- = ppAboves [ppStr "Argument values doesn't match argument type:",
- ppHang (ppStr "Fun type:") 4 (ppr sty fun),
- ppHang (ppStr "Arg type:") 4 (ppr sty arg),
- ppHang (ppStr "Expression:") 4 (pp_expr sty expr)]
-
-mkTyAppMsg :: FAST_STRING -> Type -> Type -> CoreExpr -> ErrMsg
-mkTyAppMsg msg ty arg expr sty
- = ppAboves [ppCat [ppPStr msg, ppStr "type application:"],
- ppHang (ppStr "Exp type:") 4 (ppr sty ty),
- ppHang (ppStr "Arg type:") 4 (ppr sty arg),
- ppHang (ppStr "Expression:") 4 (pp_expr sty expr)]
-
-mkUsageAppMsg :: Type -> Usage -> CoreExpr -> ErrMsg
-mkUsageAppMsg ty u expr sty
- = ppAboves [ppStr "Illegal usage application:",
- ppHang (ppStr "Exp type:") 4 (ppr sty ty),
- ppHang (ppStr "Usage exp:") 4 (ppr sty u),
- ppHang (ppStr "Expression:") 4 (pp_expr sty expr)]
-
-mkAlgAltMsg1 :: Type -> ErrMsg
-mkAlgAltMsg1 ty sty
- = ppAbove (ppStr "In some case statement, type of scrutinee is not a data type:")
- (ppr sty ty)
-
-mkAlgAltMsg2 :: Type -> Id -> ErrMsg
-mkAlgAltMsg2 ty con sty
- = ppAboves [
- ppStr "In some algebraic case alternative, constructor is not a constructor of scrutinee type:",
- ppr sty ty,
- ppr sty con
- ]