Hi Adam,

> On 9 Feb 2015, at 17:44, Adam Gundry <[email protected]> wrote:
> In the absence of a coherent story for polymorphism, I think the right
> thing to do is to be able to specify a particular validator, rather than
> try to have type inference determine a monomorphic type and otherwise
> get stuck...

I was planning to write a TH library for this sort of thing anyway, I was just 
curious if people had better solutions for the polymorphic story/solutions to 
take away this annoyance. But maybe a better solution in this direction is 
Gershom's solution to allow proper compile time functions.

> ...so is the right solution to introduce Typed TH quasiquoters for
> expressions? Sorry, I presumed such a thing existed, as Typed TH is
> rather regrettably underdocumented. Is there any particular difficulty
> with them, or is it just a Small Matter of Programming?

I don't actually know the answer to this, it was one of the questions I was 
hoping to answer in this discussion :)

> I think the lack of Lift instances is a separate problem; while it looks
> like 7.10 will be better in this respect and dataToExpQ goes a fair way,
> I agree that making them easier to generate would be nice. Perhaps a
> generics-based default method combined with DeriveAnyClass would make
> "deriving Lift" possible?

It's not directly related to whatever solution we pick, but I do think it's an 
important issue. There's currently a TH library for deriving them, but from 
what I've seen about writing them by hand I don't understand how GHC couldn't 
trivially generate them for most (all?) ADTs.

Cheers,
Merijn

Attachment: signature.asc
Description: Message signed with OpenPGP using GPGMail

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

Reply via email to