#5572: factorial.hs:3:12: Parse error in pattern: n + 1
-------------------------+--------------------------------------------------
  Reporter:  francisco   |          Owner:        
      Type:  bug         |         Status:  closed
  Priority:  normal      |      Milestone:        
 Component:  GHCi        |        Version:  7.0.3 
Resolution:  invalid     |       Keywords:        
  Testcase:              |      Blockedby:        
Difficulty:              |             Os:  Linux 
  Blocking:              |   Architecture:  x86   
   Failure:  GHCi crash  |  
-------------------------+--------------------------------------------------
Changes (by simonpj):

  * status:  new => closed
  * resolution:  => invalid


Comment:

 Looks correct to me:
 {{{
 factorial (-1)
  = (-1) * factorial (-2)
  = (-1) * (-2) * factorial (-3)
  = etc forever
 }}}
 I don't know why 6.10 would behave any differently.

 Note that (n+k) patterns are no longer in Haskell. Use `-XNPlusKPatterns`
 to get them back

-- 
Ticket URL: <http://hackage.haskell.org/trac/ghc/ticket/5572#comment:2>
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