summaryrefslogtreecommitdiff
path: root/ghc/compiler/parser/syntax.c
diff options
context:
space:
mode:
authorsimonpj <unknown>1997-03-14 08:11:17 +0000
committersimonpj <unknown>1997-03-14 08:11:17 +0000
commit1fb1ab5d53a09607e7f6d2450806760688396387 (patch)
treeb437d55fe6dc77a4bb21143be31188b9985793f9 /ghc/compiler/parser/syntax.c
parentfa6fb09e2e4e6918eebc79ed187f32c88817c9db (diff)
downloadhaskell-1fb1ab5d53a09607e7f6d2450806760688396387.tar.gz
[project @ 1997-03-14 07:52:06 by simonpj]
Major update to more-or-less 2.02
Diffstat (limited to 'ghc/compiler/parser/syntax.c')
-rw-r--r--ghc/compiler/parser/syntax.c23
1 files changed, 22 insertions, 1 deletions
diff --git a/ghc/compiler/parser/syntax.c b/ghc/compiler/parser/syntax.c
index 509145360a..a48b1198cb 100644
--- a/ghc/compiler/parser/syntax.c
+++ b/ghc/compiler/parser/syntax.c
@@ -13,6 +13,7 @@
#include "constants.h"
#include "utils.h"
#include "tree.h"
+#include "list.h"
#include "hsparser.tab.h"
@@ -108,6 +109,9 @@ expORpat(int wanted, tree e)
expORpat(wanted, glazyp(e));
break;
+ case plusp:
+ break;
+
case lit:
switch (tliteral(glit(e))) {
case integer:
@@ -556,7 +560,7 @@ splittyconapp(app, tyc, tys)
break;
default:
- hsperror("panic: splittyconap: bad tycon application (no tycon)");
+ hsperror("bad left argument to constructor op");
}
}
@@ -701,3 +705,20 @@ checkprec(exp,qfn,right)
#endif /* 0 */
+
+
+/* Reverse a list, in place */
+
+list reverse_list( l )
+ list l;
+{
+ list temp, acc = Lnil;
+
+ while (tlist( l ) != lnil) {
+ temp = ltl( l );
+ ltl( l ) = acc;
+ acc = l;
+ l = temp;
+ }
+ return( acc );
+}