From e656c6e3aaa827c51cd39c9cd9f0a6461db1d4c2 Mon Sep 17 00:00:00 2001 From: "simonpj@microsoft.com" Date: Thu, 10 Aug 2006 12:08:28 +0000 Subject: [PATCH] Egregious bug in tcLHsConResTy This terrible bug in tcLHsConTy is pretty much guaranteed to show up on an program involving a GADT with more than one type parameter. This bug isn't present in the STABLE branch. Manuel: it is *not* necesary to merge this patch into the FC branch; just ignore it. --- compiler/typecheck/TcHsType.lhs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/compiler/typecheck/TcHsType.lhs b/compiler/typecheck/TcHsType.lhs index d906381..b7e5b0b 100644 --- a/compiler/typecheck/TcHsType.lhs +++ b/compiler/typecheck/TcHsType.lhs @@ -561,8 +561,8 @@ tcLHsConResTy res_ty get_largs (L _ ty) args = get_args ty args get_args (HsAppTy fun arg) args = get_largs fun (arg:args) get_args (HsParTy ty) args = get_largs ty args - get_args (HsOpTy ty1 (L span tc) ty2) args = get_args (HsTyVar tc) (ty1:ty2:args) - get_args ty args = (ty, reverse args) + get_args (HsOpTy ty1 (L span tc) ty2) args = (HsTyVar tc, ty1:ty2:args) + get_args ty args = (ty, args) gadtResCtxt ty = hang (ptext SLIT("In the result type of a data constructor:")) -- 1.7.10.4