Commit cfb9bee7 authored by Simon Peyton Jones's avatar Simon Peyton Jones
Browse files

Check for illegal syntax in types (fixes Trac #7943)

parent efc8ad15
......@@ -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)
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment