From 957b53760e50d072accc17c77948f18a10a4bb53 Mon Sep 17 00:00:00 2001 From: Sylvain Henry Date: Tue, 12 Jan 2021 19:30:55 +0100 Subject: Core: introduce Alt/AnnAlt/IfaceAlt datatypes Alt, AnnAlt and IfaceAlt were using triples. This patch makes them use dedicated types so that we can try to make some fields strict (for example) in the future. --- compiler/GHC/HsToCore/ListComp.hs | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'compiler/GHC/HsToCore/ListComp.hs') diff --git a/compiler/GHC/HsToCore/ListComp.hs b/compiler/GHC/HsToCore/ListComp.hs index 1c7cee081e..ea10cdaf39 100644 --- a/compiler/GHC/HsToCore/ListComp.hs +++ b/compiler/GHC/HsToCore/ListComp.hs @@ -295,8 +295,8 @@ deBindComp pat core_list1 quals core_list2 = do let rhs = Lam u1 $ Case (Var u1) u1 res_ty - [(DataAlt nilDataCon, [], core_list2), - (DataAlt consDataCon, [u2, u3], core_match)] + [Alt (DataAlt nilDataCon) [] core_list2 + ,Alt (DataAlt consDataCon) [u2, u3] core_match] -- Increasing order of tag return (Let (Rec [(h, rhs)]) letrec_body) @@ -423,8 +423,8 @@ mkZipBind elt_tys = do mk_case (as, a', as') rest = Case (Var as) as elt_tuple_list_ty - [(DataAlt nilDataCon, [], mkNilExpr elt_tuple_ty), - (DataAlt consDataCon, [a', as'], rest)] + [ Alt (DataAlt nilDataCon) [] (mkNilExpr elt_tuple_ty) + , Alt (DataAlt consDataCon) [a', as'] rest] -- Increasing order of tag -- cgit v1.2.1