your head around.
Simon
| -Original Message-
| From: ghc-devs [mailto:ghc-devs-boun...@haskell.org] On Behalf Of Jan
| Stolarek
| Sent: 17 December 2014 19:34
| To: Richard Eisenberg
| Cc: ghc-devs@haskell.org
| Subject: Re: Understanding DsMeta module
|
| Thanks. That helps but I
I'm implementing Template Haskell support for injective type families and I'm
struggling to
understand DsMeta module. It seems that all functions in that module delegate
their calls to
functions in Language.Haskell.TH.Lib via wired-in names and the `DsMeta.rep2`
function. I'm
puzzled by this
On Dec 17, 2014, at 12:29 PM, Jan Stolarek jan.stola...@p.lodz.pl wrote:
Why not implement repPlainTV like this: ?
repPlainTV :: Core TH.Name - DsM (Core TH.TyVarBndr)
repPlainTV (MkC nm) = return $ MkC (TH.PlainTV nm)
In short, that's ill typed. We have
newtype Core a = MkC CoreExpr
Thanks. That helps but I still don't understand why the calls are delegated to
template-haskell
library. Couldn't all of this be done locally?
Janek
Dnia środa, 17 grudnia 2014, Richard Eisenberg napisał:
On Dec 17, 2014, at 12:29 PM, Jan Stolarek jan.stola...@p.lodz.pl wrote:
Why not
But you need an expression that, say, produces a PlainTV. Where are you going
to find an expression that does this without using the template-haskell library?
On Dec 17, 2014, at 2:33 PM, Jan Stolarek jan.stola...@p.lodz.pl wrote:
Thanks. That helps but I still don't understand why the calls