Closed necrosovereign closed 6 years ago
Interesting. Can you post an example of what the errors look like without this truncation?
For example, the following code:
module m where
T (A : U) : U = A = A
causes error message with the following text:
Exception: Parse failed in "m.ctt"
"syntax error at line 3 before = A }"
CallStack (from HasCallStack):
error, called at Main.hs:188:16 in main:Main
Ah right, so with the truncation you don't get the line number? That's what I was suspecting...
I suspect that we wanted to remove the CallStack
part but ended up removing too much. How about using lines
and then takeWhile (/= "CallStack (from HasCallStack):")
?
I really don't know what is the best solution in this case. Removing the truncation completely works for me
I finally found some free time and pushed: https://github.com/mortberg/cubicaltt/commit/452d973fae544861090fbdea51f4f5da653fb394
This should solve this issue so I'm closing.
In the file Main.hs at the lines 93-94 there is an expression
Which, as I understand, is used to catch exception arising from parsing files.
The presence of
takeWhile (/='\n')
in the expression causes the parser error message to be truncated toException: Parse failed in "filename"
. I am not sure if this is the intended behaviour