From 8461be3622ca13871500cbdb788d6f2f562dbf8d Mon Sep 17 00:00:00 2001
From: sof <unknown>
Date: Mon, 26 May 1997 04:28:46 +0000
Subject: [PATCH] [project @ 1997-05-26 04:28:46 by sof] Conversion of let
 blocks inside do blocks fixed up

---
 ghc/compiler/parser/hsparser.y | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/ghc/compiler/parser/hsparser.y b/ghc/compiler/parser/hsparser.y
index 4ca10ea9f05a..4abf92699a9d 100644
--- a/ghc/compiler/parser/hsparser.y
+++ b/ghc/compiler/parser/hsparser.y
@@ -1009,9 +1009,11 @@ kexp	:  kexpL
 	|  kexpLno
 	;
 
+/* kexpL = a let expression */
 kexpL	:  letdecls IN exp			{ $$ = mklet($1,$3); }
 	;
 
+/* kexpLno = any other expression more tightly binding than operator application */
 kexpLno	:  LAMBDA
 		{ hsincindent();        /* push new context for FN = NULL;        */
 		  FN = NULL; 	        /* not actually concerned about indenting */
@@ -1199,7 +1201,7 @@ stmts	:  stmt					{ $$ = $1; }
 
 stmt	:  /* empty */				{ $$ = Lnil; }
 	|  letdecls				{ $$ = lsing(mkseqlet($1)); }
-	|  expL					{ $$ = lsing($1); }
+	|  expL					{ $$ = lsing(mkdoexp($1,hsplineno)); }
 	|  {inpat=TRUE;} expLno {inpat=FALSE;} leftexp
 		{ if ($4 == NULL) {
 		      expORpat(LEGIT_EXPR,$2);
-- 
GitLab