From 48ee5587b574105a231072999b06aa56c37292c4 Mon Sep 17 00:00:00 2001 From: Ryan Scott Date: Fri, 19 Jan 2018 04:44:02 -0500 Subject: Fix #732 (#733) --- haddock-api/src/Haddock/GhcUtils.hs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'haddock-api/src') diff --git a/haddock-api/src/Haddock/GhcUtils.hs b/haddock-api/src/Haddock/GhcUtils.hs index 4963d2f8..17c92688 100644 --- a/haddock-api/src/Haddock/GhcUtils.hs +++ b/haddock-api/src/Haddock/GhcUtils.hs @@ -169,8 +169,8 @@ getGADTConType (ConDeclGADT { con_forall = has_forall tau_ty = case args of RecCon flds -> noLoc (HsFunTy (noLoc (HsRecTy (unLoc flds))) res_ty) - PrefixCon pos_args -> foldr (\ a b -> noLoc (HsFunTy a b)) res_ty pos_args - InfixCon {} -> panic "InfixCon for GADT" + PrefixCon pos_args -> foldr nlHsFunTy res_ty pos_args + InfixCon arg1 arg2 -> arg1 `nlHsFunTy` (arg2 `nlHsFunTy` res_ty) getGADTConType (ConDeclH98 {}) = panic "getGADTConType" -- Should only be called on ConDeclGADT -- cgit v1.2.3