#6038: Allow view patterns inside record patterns
------------------------------+---------------------------------------------
 Reporter:  akio              |          Owner:                  
     Type:  feature request   |         Status:  new             
 Priority:  normal            |      Component:  Compiler        
  Version:  7.4.1             |       Keywords:                  
       Os:  Unknown/Multiple  |   Architecture:  Unknown/Multiple
  Failure:  None/Unknown      |       Testcase:                  
Blockedby:                    |       Blocking:                  
  Related:                    |  
------------------------------+---------------------------------------------
 I think it would be nice if I could directly write a view pattern inside a
 record pattern. Currently the following program causes a parse error.

 {{{
 {-# LANGUAGE ViewPatterns #-}
 newtype Foo = Foo{ fooA :: Int }

 main = case Foo 4 of
     Foo{ fooA = show -> s } -> print s
     --Foo{ fooA = (show -> s) } -> print s -- This version is ok.
 }}}

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