[pure-lang-svn] SF.net SVN: pure-lang: [284] pure/trunk/interpreter.cc
Status: Beta
Brought to you by:
agraef
From: <ag...@us...> - 2008-06-23 00:06:57
|
Revision: 284 http://pure-lang.svn.sourceforge.net/pure-lang/?rev=284&view=rev Author: agraef Date: 2008-06-22 17:07:02 -0700 (Sun, 22 Jun 2008) Log Message: ----------- '_' on the lhs should always be the anonymous variable, even if it occurs as the head symbol of a function application. Modified Paths: -------------- pure/trunk/interpreter.cc Modified: pure/trunk/interpreter.cc =================================================================== --- pure/trunk/interpreter.cc 2008-06-22 23:55:56 UTC (rev 283) +++ pure/trunk/interpreter.cc 2008-06-23 00:07:02 UTC (rev 284) @@ -1052,8 +1052,9 @@ default: assert(x.tag() > 0); const symbol& sym = symtab.sym(x.tag()); - if (sym.prec < 10 || sym.fix == nullary || p.len() == 0 && !b || - p.len() > 0 && p.last() == 0) { + if (sym.s != "_" && + (sym.prec < 10 || sym.fix == nullary || p.len() == 0 && !b || + p.len() > 0 && p.last() == 0)) { // constant or constructor if (x.ttag() != 0) throw err("error in pattern (misplaced type tag)"); This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |