ggreif / omega

Automatically exported from code.google.com/p/omega
Other
7 stars 0 forks source link

underscore (in type vars) confuses parser badly #26

Open GoogleCodeExporter opened 9 years ago

GoogleCodeExporter commented 9 years ago
Compile this file
<http://svn.berlios.de/svnroot/repos/al4nin/trunk/found-bugs/issue26-HenkTest.om
g>

you get a parse error because of an underscore in the type variable "_b":

"issue26-HenkTest.omg" (line 48, column 20) tabs []:
unexpected "-" at: "> Equal {d..."
expecting: simple expression, operator, "where", decl, inserted layout
separator (;), inserted layout closing brace, or end of input

Please note that the parser gives up well before the error, thus emitting a
confusing error message.

When the underscore is removed, the file compiles.

Original issue reported on code.google.com by ggr...@gmail.com on 13 Oct 2007 at 9:12

GoogleCodeExporter commented 9 years ago
I have observed similar symptoms when using :k

:k Maybe a

--> unbound tyvar

:k Maybe 'a

--> *~>* (strangeness)

Probably the parser drops out when seeig the apostroph.

I get a crash when using parens:

:k (Maybe 'a)

:-( CRASH

Original comment by ggr...@gmail.com on 31 Dec 2010 at 12:07

GoogleCodeExporter commented 9 years ago
here is a line that uses the underscore to escape to some level-selection mode 
that I do not understand yet:

<http://code.google.com/p/omega/source/browse/trunk/work/ExpsWithTerminationWitn
esses.prg?spec=svn689&r=217#14>

Original comment by ggr...@gmail.com on 1 Feb 2011 at 10:59