Simon Marlow ([EMAIL PROTECTED]) wrote:
: yes, I should have mentioned that you need to use a cpp macro to achieve the
: desired effect. eg. GHC's "ASSERT" macro:
:
:#define ASSERT(e) if (not (e)) then (assertPanic __FILE__ __LINE__) else
Cool. I'll try it the next time I have to debug som
> > > {-# RULES
> > > "lookupFM.range check" forall m key . rdMap m key =
> > > maybe (lookupFmError #LINE #FILE)
> > >id
> > >(#lookupFM m key)
> > > #-} --
> [..]
> > Actually, when using cpp, the __LINE__ and __FILE__ macros
> should expand to
> > the right thing (t
Keith Wansbrough ([EMAIL PROTECTED]) wrote:
: I think Marc wants the line number of the occurrence of rdMap to occur
: in the error message, not the line number of the definition of the
: rule "lookupFM.range check".
Exactly.
Regards,
Marc
--
Marc van Dongen, CS Dept | phone: +353 21
> > {-# RULES
> > "lookupFM.range check" forall m key . rdMap m key =
> > maybe (lookupFmError #LINE #FILE)
> >id
> >(#lookupFM m key)
> > #-} --
[..]
> Actually, when using cpp, the __LINE__ and __FILE__ macros should expand to
> the right thing (this is what GHC itsel
Simon Marlow ([EMAIL PROTECTED]) wrote:
: You're right in saying that errors can be generated at certain points in the
: source file, but these points (the beginning of a definition, a case branch,
: a type signature, a guard, an 'if' expression, etc.) have nothing to do with
: definition vs. cal
> At the moment I think it is only possible that
> error messages about functions can refer to line
> numbers and names of source files at the points
> of *definition* of these functions. These error
> messages are the ones that ghc automatically
> generates when there is a pattern matching error
Dear ghc-team,
At the moment I think it is only possible that
error messages about functions can refer to line
numbers and names of source files at the points
of *definition* of these functions. These error
messages are the ones that ghc automatically
generates when there is a pattern matching e