Re: [GHC] #1041: Bang patterns in do notation and lambdas

2006-12-11 Thread GHC
#1041: Bang patterns in do notation and lambdas
---+
 Reporter:  dons   |  Owner: 
 Type:  bug| Status:  closed 
 Priority:  normal |  Milestone: 
Component:  Compiler (Parser)  |Version:  6.6
 Severity:  normal | Resolution:  fixed  
 Keywords:  bang patterns  | Difficulty:  Easy (1 hr)
 Testcase:  read042|   Architecture:  Unknown
   Os:  Unknown|  
---+
Changes (by simonpj):

  * resolution:  = fixed
  * testcase:  = read042
  * status:  new = closed

Comment:

 Fixed thank you.

-- 
Ticket URL: http://hackage.haskell.org/trac/ghc/ticket/1041
GHC http://www.haskell.org/ghc/
The Glasgow Haskell Compiler___
Glasgow-haskell-bugs mailing list
Glasgow-haskell-bugs@haskell.org
http://www.haskell.org/mailman/listinfo/glasgow-haskell-bugs


[GHC] #1041: Bang patterns in do notation and lambdas

2006-12-07 Thread GHC
#1041: Bang patterns in do notation and lambdas
--+-
Reporter:  dons   |   Owner:   
Type:  bug|  Status:  new  
Priority:  normal |   Milestone:   
   Component:  Compiler (Parser)  | Version:  6.6  
Severity:  normal |Keywords:  bang patterns
  Difficulty:  Easy (1 hr)|Testcase:   
Architecture:  Unknown|  Os:  Unknown  
--+-
Bang patterns in do-notation and lambdas need parentheses around them to
 parse. This isn't the case for ~ patterns, or bang patterns in let
 bindings. Seems like a wibble.

 {{{
 {-# OPTIONS -fbang-patterns #-}

 -- doesn't work:A.hs:5:8: Empty 'do' construct
 main1 = do
 !c - return ()
 return ()

 -- doesn't work:A.hs:12:24: parse error on input `!'
 main2 = return () = \ !c - return ()



 -- does
 main3 = do
 (!c) - return ()
 return ()

 -- does
 main4 = return () = \ (!c) - return ()


 -- does
 main5 = let !x = 1 in return ()


 -- does
 main6 = do
 ~c - return ()
 return ()

 -- does
 main7 = return () = \ ~c - return ()
 }}}


 -- dons

-- 
Ticket URL: http://hackage.haskell.org/trac/ghc/ticket/1041
GHC http://www.haskell.org/ghc/
The Glasgow Haskell Compiler___
Glasgow-haskell-bugs mailing list
Glasgow-haskell-bugs@haskell.org
http://www.haskell.org/mailman/listinfo/glasgow-haskell-bugs