Transformational Patterns?

Simon Peyton-Jones simonpj at
Tue Jul 25 12:43:23 EDT 2006

| After reading the paper "Pattern Guards and Transformational Patterns"
| by Martin Erwig and Simon Peyton Jones, I'm left wondering about the
| status of transformational patterns?  Can we expect to see these at
| some point in GHC?  Or have they gone by the wayside in favor of some
| other alternative?
| When I had finished reading the paper, I was disappointed to find out
| that they were not implemented as I was convinced of the merits based
| on the arguments presented in the paper.

We have no immediate plans to add views or transformational patterns to

Why not?
a) we already have pattern guards
l#pattern-guards which do part of the job

b) in any language, there is a trade-off between complexity and
expressiveness.  It's not immediately clear which side of the line views

c) there are a number of alternative designs, and no clear winner

Having said that, I think one can make a strong case that some form of
views support is essential to allow abstraction, and that views should
therefore have direct support.   Indeed, it's on the table for Haskell

It would be a Good Thing, I believe, if those interested in views and/or
transformational patterns could use the above Wiki to record the various
possible designs, and try to converge on one. Then it might be an
interesting intern project to implement it:


More information about the Glasgow-haskell-users mailing list