Commit e656c6e3 authored by's avatar
Browse files

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.
parent d69833a0
......@@ -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:"))
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment