Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in / Register
Toggle navigation
Menu
Open sidebar
Alex D
GHC
Commits
cfb9bee7
Commit
cfb9bee7
authored
May 28, 2013
by
Simon Peyton Jones
Browse files
Check for illegal syntax in types (fixes Trac #7943)
parent
efc8ad15
Changes
1
Hide whitespace changes
Inline
Side-by-side
compiler/rename/RnTypes.lhs
View file @
cfb9bee7
...
...
@@ -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)
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment