#2399: Template Haskell: support for view patterns
------------------------------+---------------------------------------------
 Reporter:  fons              |          Owner:         
     Type:  feature request   |         Status:  new    
 Priority:  low               |      Milestone:  _|_    
Component:  Template Haskell  |        Version:  6.9    
 Severity:  normal            |     Resolution:         
 Keywords:                    |     Difficulty:  Unknown
 Testcase:                    |   Architecture:  Unknown
       Os:  Unknown           |  
------------------------------+---------------------------------------------
Comment (by AudreyTang):

 Simon, it's difficult to add a guard there, because a QuasiQuoter accepts
 the pattern-generation function of the form:

 {{{
 quoteExprPat :: String -> TH.PatQ
 }}}

 But in TH, Guard is part of Body, so a quasiquoter designated to the PatQ
 side cannot affect the BodyQ side.

 As there seems to be no other Pat constructors that's useful for a
 [$rx|...|] at the pattern side, would you consider accepting a patch that
 adds ViewP for 6.10?

 Cheers,

 Audrey

 (The context for [$rx|...|] is http://hackage.haskell.org/cgi-bin/hackage-
 scripts/package/regexqq btw.)

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