Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in / Register
Toggle navigation
Menu
Open sidebar
Glasgow Haskell Compiler
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
Show whitespace changes
Inline
Side-by-side
compiler/rename/RnTypes.lhs
View file @
cfb9bee7
...
@@ -187,9 +187,10 @@ rnHsTyKi isType doc (HsBangTy b ty)
...
@@ -187,9 +187,10 @@ rnHsTyKi isType doc (HsBangTy b ty)
do { (ty', fvs) <- rnLHsType doc ty
do { (ty', fvs) <- rnLHsType doc ty
; return (HsBangTy b ty', fvs) }
; return (HsBangTy b ty', fvs) }
rnHsTyKi isType doc (HsRecTy flds)
rnHsTyKi _ doc ty@(HsRecTy flds)
= ASSERT ( isType )
= do { addErr (hang (ptext (sLit "Record syntax is illegal here:"))
do { (flds', fvs) <- rnConDeclFields doc flds
2 (ppr ty))
; (flds', fvs) <- rnConDeclFields doc flds
; return (HsRecTy flds', fvs) }
; return (HsRecTy flds', fvs) }
rnHsTyKi isType doc (HsFunTy ty1 ty2)
rnHsTyKi isType doc (HsFunTy ty1 ty2)
...
...
a.ulrich
@trac-a.ulrich
mentioned in issue
#7947 (closed)
·
May 29, 2013
mentioned in issue
#7947 (closed)
mentioned in issue #7947
Toggle commit list
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Attach a 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