#2033: GHC-6.9 panics rather than parse error, related to view patterns.
----------------------+-----------------------------------------------------
 Reporter:  apeacock  |          Owner:             
     Type:  bug       |         Status:  new        
 Priority:  normal    |      Milestone:  6.10 branch
Component:  Compiler  |        Version:  6.9        
 Severity:  normal    |     Resolution:             
 Keywords:            |     Difficulty:  Unknown    
 Testcase:            |   Architecture:  x86        
       Os:  Windows   |  
----------------------+-----------------------------------------------------
Comment (by simonpj):

 Ian, I guess you understand what is going on here?  Patterns are parsed as
 expressions, and then converted to patterns. The form (e -> p), the
 `EViewPat` constructor in `HsExpr`, is valid as a pattern, but not as as
 expression.  Just like `EWildPat`, `EAsPat`, `ELazyPat`.

 The renamer checks for these (line 280 of `RnExpr`), so it's just a qn of
 adding `EViewPat` there too.  The error message isn't fantastic, but it's
 better than a crash.

 I'll let you finish this since you've started.

 Simon

-- 
Ticket URL: <http://hackage.haskell.org/trac/ghc/ticket/2033#comment:4>
GHC <http://www.haskell.org/ghc/>
The Glasgow Haskell Compiler
_______________________________________________
Glasgow-haskell-bugs mailing list
[email protected]
http://www.haskell.org/mailman/listinfo/glasgow-haskell-bugs

Reply via email to