
18 May
2015
18 May
'15
6:42 a.m.
On 18/05/15 13:12, Tobias Florek wrote:
Hi,
I also wanted such a feature but eventually I just went with:
__todo :: String -> a {-# WARNING __todo "TODO" #-} __todo msg = error $ "TODO: " ++ msg
__fixme :: a -> a {-# WARNING __fixme "FIXME" #-} __fixme = id
I found WARNING fell short because it doesn't work on module-local definitions, and only triggers on use.
Maybe I am missing things, but `__todo` should generate a warning at use site which _is_ the module definition of the thing using it.
Yes, that's right. The downside of __todo is that you can't specify the text of the compiler warning. (The String argument is the text of the runtime error.) Roman