Max Bolingbroke wrote:
...
In this proposal, you can then export "t" and "d" functions from
Language.Haskell.TH with the type:

t :: String -> Type
d :: String -> [Decl]

Which parse the provided string as Haskell. This allows existing any
uses of Template Haskell to remain *unchanged* (as long as they
imported the TH module :-). Otherwise rewrite them as:

[t|..|] ==> Language.Haskell.TH.t [|...|]

I'm concerned in both your proposals, that single-letter names like "t" and "d" are common function parameters, thus possibly producing
- shadowing warnings for all such functions in modules that happen to use TH
- errors, I think, for some uses of TH inside such functions (either the function parameters must be renamed, or the TH splice module-qualified)

-Isaac
_______________________________________________
Glasgow-haskell-users mailing list
[email protected]
http://www.haskell.org/mailman/listinfo/glasgow-haskell-users

Reply via email to