A Pointless Library Proposal

John Meacham john at repetae.net
Mon Oct 30 19:58:40 EST 2006

On Mon, Oct 30, 2006 at 10:16:46AM -0500, Lennart Augustsson wrote:
> I like to use undefined is the stub for unimplemented functions since  
> it's nice and terse.  Unfortunately, ghc doesn't give much  
> information about where the undefined was called.
> It would be great if the message for undefined could include file  
> name and line number (like hbc did :).

jhc has the SRCLOC_ANNOTATE pragma, which lets you attach file and line
number information to arbitrary functions. sort of a generalization of
the 'assert' feature of ghc. One day I will get around to implementing
it in ghc. perhaps the next time a program I write mysteriously dies
with "Prelude.undefined" being the only thing printed.


John Meacham - ⑆repetae.net⑆john⑈

More information about the Libraries mailing list