[Template-haskell] Non-typechecked reification brackets

Simon Peyton-Jones simonpj@microsoft.com
Tue, 8 Apr 2003 13:48:24 +0100


I didn't understand this.  Care to elaborate, with some examples?

S

|  -----Original Message-----
|  From: template-haskell-admin@haskell.org [mailto:template-haskell-
|  admin@haskell.org] On Behalf Of Ian Lynagh
|  Sent: 08 April 2003 12:45
|  To: template-haskell@haskell.org
| =20
| =20
|  Hi all,
| =20
|  I've just (locally) added a [| ... |n] style of reification brackets
|  that aren't type checked. This means I can do things like
| =20
|      [| \g x y -> Tup (Cond g x y) --> Cond g (Tup x) (Tup y) |n]
| =20
|  for describing rewrite rules (they end up being correctly typed when
|  I've fiddled about with them). I think I've worked around cases where
|  I'd wanted to do this but couldn't in the past, but where I had a
|  simpler alternative; I didn't keep a note of them unfortunately. This
|  has a very small impact on the code - just add a Bool to ExpBr (and
the
|  others) "data HsBracket id =3D ExpBr (HsExpr id) Bool" and then alter
the
|  handful of places it's used.
| =20
|  My question is, is this an appropriate thing to be in Template
Haskell?
|  I for one would find it useful.
| =20
| =20
|  Thanks
|  Ian
| =20
|  _______________________________________________
|  template-haskell mailing list
|  template-haskell@haskell.org
|  http://www.haskell.org/mailman/listinfo/template-haskell