|
Template Haskell: msg#00106lang.haskell.glasgow.bugs
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
|
|
| <Prev in Thread] | Current Thread | [Next in Thread> |
|---|---|---|
| Previous by Date: | Build fail on MacOSX 1.4.5, jur |
|---|---|
| Next by Date: | Error in shutdownHaskell() in Win32 DLL, Cyril Schmidt |
| Previous by Thread: | Build fail on MacOSX 1.4.5, jur |
| Next by Thread: | Error in shutdownHaskell() in Win32 DLL, Cyril Schmidt |
| Indexes: | [Date] [Thread] [Top] [All Lists] |
| News | FAQ | advertise |