Re: Wish list: RULES, line number and filenames.

2000-08-10 Thread 'Marc van Dongen'
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

RE: Wish list: RULES, line number and filenames.

2000-08-10 Thread Simon Marlow
> > > {-# 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

Re: Wish list: RULES, line number and filenames.

2000-08-10 Thread 'Marc van Dongen'
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

Re: Wish list: RULES, line number and filenames.

2000-08-10 Thread Keith Wansbrough
> > {-# 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

Re: Wish list: RULES, line number and filenames.

2000-08-10 Thread 'Marc van Dongen'
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

RE: Wish list: RULES, line number and filenames.

2000-08-09 Thread Simon Marlow
> 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

Wish list: RULES, line number and filenames.

2000-08-04 Thread Marc van Dongen
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