-mkCaseAltMsg :: CoreCaseAlts -> ErrMsg
-mkCaseAltMsg alts sty
- = ppAbove (ppPStr SLIT("Type of case alternatives not the same:"))
- (ppr sty alts)
-
-mkCaseDataConMsg :: CoreExpr -> ErrMsg
-mkCaseDataConMsg expr sty
- = ppAbove (ppPStr SLIT("A case scrutinee not of data constructor type:"))
- (pp_expr sty expr)
-
-mkCaseNotPrimMsg :: TyCon -> ErrMsg
-mkCaseNotPrimMsg tycon sty
- = ppAbove (ppPStr SLIT("A primitive case on a non-primitive type:"))
- (ppr sty tycon)
-
-mkCasePrimMsg :: TyCon -> ErrMsg
-mkCasePrimMsg tycon sty
- = ppAbove (ppPStr SLIT("An algebraic case on a primitive type:"))
- (ppr sty tycon)
-
-mkCaseAbstractMsg :: TyCon -> ErrMsg
-mkCaseAbstractMsg tycon sty
- = ppAbove (ppPStr SLIT("An algebraic case on some weird type:"))
- (ppr sty tycon)
-
-mkDefltMsg :: CoreCaseDefault -> ErrMsg
-mkDefltMsg deflt sty
- = ppAbove (ppPStr SLIT("Binder in case default doesn't match type of scrutinee:"))
- (ppr sty deflt)
-
-mkAppMsg :: Type -> Type -> CoreExpr -> ErrMsg
-mkAppMsg fun arg expr sty
- = ppAboves [ppPStr SLIT("Argument value doesn't match argument type:"),
- ppHang (ppPStr SLIT("Fun type:")) 4 (ppr sty fun),
- ppHang (ppPStr SLIT("Arg type:")) 4 (ppr sty arg),
- ppHang (ppPStr SLIT("Expression:")) 4 (pp_expr sty expr)]
-
-mkTyAppMsg :: FAST_STRING -> Type -> Type -> CoreExpr -> ErrMsg
-mkTyAppMsg msg ty arg expr sty
- = ppAboves [ppCat [ppPStr msg, ppPStr SLIT("type application:")],
- ppHang (ppPStr SLIT("Exp type:")) 4 (ppr sty ty),
- ppHang (ppPStr SLIT("Arg type:")) 4 (ppr sty arg),
- ppHang (ppPStr SLIT("Expression:")) 4 (pp_expr sty expr)]
-
-mkUsageAppMsg :: Type -> Usage -> CoreExpr -> ErrMsg
-mkUsageAppMsg ty u expr sty
- = ppAboves [ppPStr SLIT("Illegal usage application:"),
- ppHang (ppPStr SLIT("Exp type:")) 4 (ppr sty ty),
- ppHang (ppPStr SLIT("Usage exp:")) 4 (ppr sty u),
- ppHang (ppPStr SLIT("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)
--- (ppAbove (ppr sty ty) (ppr sty (expandTy ty))) -- ToDo: rm
-
-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
- ]