David Roundy wrote:
On Wed, Sep 06, 2006 at 09:56:17AM -0700, Jason Dagit wrote:
Or maybe even more extreme you could use template haskell or the c
preprocessor to fill in the line number + column.

Which is precisely what darcs does for fromJust (which we use a lot):
we define a C preprocessor macro fromJust.  It's ugly, but beats any
other choice I'm aware of.  I wish that built in functions that call
error could be automatically this way...

This old mailing list message may help: http://www.mail-archive.com/haskell-cafe@haskell.org/msg13034.html

Suggested by a question from sethk on #haskell irc channel. Solves an FAQ where people have often resorted to cpp or m4: a `trace' that prints line numbers.

--
Chris
_______________________________________________
Haskell-Cafe mailing list
Haskell-Cafe@haskell.org
http://www.haskell.org/mailman/listinfo/haskell-cafe

Reply via email to