X-Git-Url: http://git.megacz.com/?a=blobdiff_plain;f=compiler%2Ftypecheck%2FTcHsType.lhs;h=dabd17f764785a70252e56c093ee83b5021aac5a;hb=3f1b316d7035c55cd712cd39a9981339bcef2e8c;hp=67ae3bdb13c8a7f094a8a9a8bc9049e4a6ad5829;hpb=ad94d40948668032189ad22a0ad741ac1f645f50;p=ghc-hetmet.git diff --git a/compiler/typecheck/TcHsType.lhs b/compiler/typecheck/TcHsType.lhs index 67ae3bd..dabd17f 100644 --- a/compiler/typecheck/TcHsType.lhs +++ b/compiler/typecheck/TcHsType.lhs @@ -9,7 +9,7 @@ -- The above warning supression flag is a temporary kludge. -- While working on this module you are encouraged to remove it and fix -- any warnings in the module. See --- http://hackage.haskell.org/trac/ghc/wiki/CodingStyle#Warnings +-- http://hackage.haskell.org/trac/ghc/wiki/Commentary/CodingStyle#Warnings -- for details module TcHsType ( @@ -341,8 +341,12 @@ kc_hs_type ty@(HsAppTy ty1 ty2) split (L _ (HsAppTy f a)) as = split f (a:as) split f as = (f,as) mk_app fun arg = HsAppTy (noLoc fun) arg -- Add noLocs for inner nodes of - -- the application; they are never used - + -- the application; they are + -- never used + +kc_hs_type ty@(HsPredTy (HsEqualP _ _)) + = wrongEqualityErr + kc_hs_type (HsPredTy pred) = kcHsPred pred `thenM` \ pred' -> returnM (HsPredTy pred', liftedTypeKind) @@ -856,5 +860,8 @@ dupInScope n n' ty = hang (ptext SLIT("The scoped type variables") <+> quotes (ppr n) <+> ptext SLIT("and") <+> quotes (ppr n')) 2 (vcat [ptext SLIT("are bound to the same type (variable)"), ptext SLIT("Distinct scoped type variables must be distinct")]) + +wrongEqualityErr + = failWithTc (text "Equality predicate used as a type") \end{code}