RE: [Template-haskell] Contexts on Datatype - question/bug?
| Also, is there a todo-list | somewhere or a document with a fairly comprehensive listing of how far along | the implementation is and known bugs? There isn't, but it's a good idea. Here's a start http://research.microsoft.com/~simonpj/Haskell/TH.html Pls suggest improvements I'd put it in the GHC Commentary, only that isn't being updated at the moment for some reason. (Manuel will doubtless fix that shortly.) [urk: I'm not sure our website mirroring is working right either; if the link doesn't work, try again in a few hrs.] | On a side note: why not toss up a TH page on the Haskell wiki, especially if | the answer to my second question is no? by all means go ahead. | data (Eq a) => Tree a = Leaf a | Branch (Tree a) (Tree a) | | main = do output <- runQ $ reifyDecl Tree | putStr $ show output | | will cause the impossible to happen. | I went in and changed DsMeta.hs to pass the cxt for reifyDecl (repTyClD for | case TyData), which kept the impossible from happening, but then realized | (at least partially) why it wasn't there before. THSyntax.Data doesn't | support contexts. | | Except that a diagnostic rather than death would be preferable, is this an | omission, on a todo list, or purposely left out? I think Contexts in data declarations are a mis-feature of Haskell (i.e. they shouldn't be there in the first place). But I suppose that since they are there, TH had better support them. To do! Simon
participants (1)
-
Simon Peyton-Jones