|
RE: Template Haskell: msg#00036lang.haskell.glasgow.bugs
Thank you for the bug report. It certainly is a bug. I'm fixing it now. Sadly, I've missed the boat for GHC 6.4.2, but the fix will be in the HEAD, and in the next release. Simon | -----Original Message----- | From: glasgow-haskell-bugs-bounces@xxxxxxxxxxx [mailto:glasgow-haskell-bugs- | bounces@xxxxxxxxxxx] On Behalf Of mze@xxxxxxxxxxxxxxxxxxxxxx | Sent: 15 March 2006 12:33 | To: glasgow-haskell-bugs@xxxxxxxxxxx | Subject: Template Haskell | | Hi, | | i've got a problem with the function recover in Template Haskell: | | I'd like to check, if a function is already implemented. My idea is to | call reify with the functionname. But reify throws an error if the name is | not in scope. So I wanted to use "recover", but it doesn't work like | expected: | | y = $(recover (return (LitE (IntegerL 1))) | (reify (mkName ("ola")) >> return (LitE (IntegerL 2)))) | | The compilation failed: `ola' is not in scope at a reify | In the definition of `y' | I thought the value of y would be 1, if "ola" is not in scope and 2 | otherwise. | | | And even this doesn't work (the compilation failed): | | x = $(recover (return (LitE (IntegerL 1))) | (report True "error" >> return (LitE (IntegerL 2)))) | | | Is there a bug in recover? | | Melanie Bargstädt | | | | | | | | _______________________________________________ | Glasgow-haskell-bugs mailing list | Glasgow-haskell-bugs@xxxxxxxxxxx | http://www.haskell.org/mailman/listinfo/glasgow-haskell-bugs
|
|
| <Prev in Thread] | Current Thread | [Next in Thread> |
|---|---|---|
| Previous by Date: | RE: TH, tuples and "impossible happened" problem, Simon Peyton-Jones |
|---|---|
| Next by Date: | [GHC] #746: ghc panic! with foreign import wrapper involving Bool, GHC |
| Previous by Thread: | RE: TH, tuples and "impossible happened" problem, Simon Peyton-Jones |
| Next by Thread: | [GHC] #746: ghc panic! with foreign import wrapper involving Bool, GHC |
| Indexes: | [Date] [Thread] [Top] [All Lists] |
| News | FAQ | advertise |