From 31d1c24e7e3908663f27a743a379d649d56fda2f Mon Sep 17 00:00:00 2001
From: andy <unknown>
Date: Thu, 5 Oct 2000 22:50:18 +0000
Subject: [PATCH] [project @ 2000-10-05 22:50:18 by andy] Fixing the order that
 labeled fields appear in datatypes. Currently they are reversed, which breaks
 the prelude badly.

[From Haskell report:

The arguments to the positional constructor occur in the same order as the labeled fields. For example, the declaration

  data C = F { f1,f2 :: Int, f3 :: Bool}

defines a type and constructor identical to the one produced by

  data C = F Int Int Bool

]
---
 ghc/compiler/parser/Parser.y | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/ghc/compiler/parser/Parser.y b/ghc/compiler/parser/Parser.y
index 7efc69364cda..53fcbd42504e 100644
--- a/ghc/compiler/parser/Parser.y
+++ b/ghc/compiler/parser/Parser.y
@@ -1,6 +1,6 @@
 {-
 -----------------------------------------------------------------------------
-$Id: Parser.y,v 1.38 2000/10/05 15:42:30 simonpj Exp $
+$Id: Parser.y,v 1.39 2000/10/05 22:50:18 andy Exp $
 
 Haskell grammar.
 
@@ -595,7 +595,7 @@ context :: { RdrNameContext }
 constr_stuff :: { (RdrName, RdrNameConDetails) }
 	: btype				{% mkVanillaCon $1 []		    }
 	| btype '!' atype satypes	{% mkVanillaCon $1 (Banged $3 : $4) }
-	| gtycon '{' fielddecls '}' 	{% mkRecCon $1 $3 }
+	| gtycon '{' fielddecls '}' 	{% mkRecCon $1 (reverse $3) }
 	| sbtype conop sbtype		{ ($2, InfixCon $1 $3) }
 
 satypes	:: { [RdrNameBangType] }
-- 
GitLab