how to track down out-of-bounds error?

2003-05-28 Thread David Roundy
In some code which uses UArrays, I'm getting the following error: Fail: Ix{Int}.index: Index (3723) out of range ((0,3722)) Presumably this means I'm trying to access one beyond the end of an array. The problem is trying to figure out where I'm doing this. Unfortunately, I have only been able to

Re: Question about Haskell lexer and parser.

2003-05-28 Thread Arjan van IJzendoorn
Hi, > This rule only applies if there is a parse error on the next token (t). > [...] > It does mean that layout processing can't be done entirely in the lexer, > Take a look at some of the existing Haskell parsers to > see how it can be done: [...] Don't look at Helium. We have a simplified la

RE: Question about Haskell lexer and parser.

2003-05-28 Thread Simon Marlow
> Question is really about layout rules. > If the first lexeme of a module is not a "module" keyword, we insert > {n}, where n is the indentation of first lexeme. Then we apply > function L to the list of lexemes and stack of layouts: > > L ({n}:lexemes) [] > > One of first case definitions o

Question about Haskell lexer and parser.

2003-05-28 Thread Serguey Zefirov
Hello haskell-cafe, Question is really about layout rules. If the first lexeme of a module is not a "module" keyword, we insert {n}, where n is the indentation of first lexeme. Then we apply function L to the list of lexemes and stack of layouts: L ({n}:lexemes) [] One of first case definition