Repository : http://darcs.haskell.org/ghc.git/
On branch : master https://github.com/ghc/ghc/commit/cfb9bee7cd3e93bb872cbf6f3fa944d8ad5aabf3 >--------------------------------------------------------------- commit cfb9bee7cd3e93bb872cbf6f3fa944d8ad5aabf3 Author: Simon Peyton Jones <[email protected]> Date: Tue May 28 13:14:54 2013 +0100 Check for illegal syntax in types (fixes Trac #7943) >--------------------------------------------------------------- compiler/rename/RnTypes.lhs | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/compiler/rename/RnTypes.lhs b/compiler/rename/RnTypes.lhs index a230701..69921a2 100644 --- a/compiler/rename/RnTypes.lhs +++ b/compiler/rename/RnTypes.lhs @@ -187,9 +187,10 @@ rnHsTyKi isType doc (HsBangTy b ty) do { (ty', fvs) <- rnLHsType doc ty ; return (HsBangTy b ty', fvs) } -rnHsTyKi isType doc (HsRecTy flds) - = ASSERT ( isType ) - do { (flds', fvs) <- rnConDeclFields doc flds +rnHsTyKi _ doc ty@(HsRecTy flds) + = do { addErr (hang (ptext (sLit "Record syntax is illegal here:")) + 2 (ppr ty)) + ; (flds', fvs) <- rnConDeclFields doc flds ; return (HsRecTy flds', fvs) } rnHsTyKi isType doc (HsFunTy ty1 ty2) _______________________________________________ ghc-commits mailing list [email protected] http://www.haskell.org/mailman/listinfo/ghc-commits
