#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  |  
-------------------------+--------------------------------------------------

Comment(by francisco):

 In GHCi 6.10.4 the dialog is:

 $ factorial (-1)
 *** Exception ... : Non-exhaustive patterns in function factorial

 since n+1 only unify (in the past!) with a number equal or greater than 1,
 so the risk of to fall into an infinite loop is avoided. So we changed a
 possible infinite loop by an exception.


 Anyway, please, how can I use "-XNPlusKPatterns". I do not know how to do
 this.

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