X-Git-Url: http://git.megacz.com/?p=ghc-hetmet.git;a=blobdiff_plain;f=compiler%2Fvectorise%2FVectorise%2FType%2FPADict.hs;h=6c94ae0258776320d5be0e8e57e1408cd4e1bcb1;hp=6b67f66678614ba6bbbe3f7bb2e93d7ee6535086;hb=fff1f6194c3c39de53cd645bda9865fb131b1c68;hpb=ed333003733fd3f3a3de015998f59ee1a709230a diff --git a/compiler/vectorise/Vectorise/Type/PADict.hs b/compiler/vectorise/Vectorise/Type/PADict.hs index 6b67f66..6c94ae0 100644 --- a/compiler/vectorise/Vectorise/Type/PADict.hs +++ b/compiler/vectorise/Vectorise/Type/PADict.hs @@ -53,20 +53,11 @@ buildPADict vect_tc prepr_tc arr_tc repr $ Type inst_ty : map (method_call args) method_ids -- Build the type of the dictionary function. - pa_tc <- builtin paTyCon - let pa_opitems = [(id, NoDefMeth) | id <- method_ids] - let pa_cls = mkClass - (tyConName pa_tc) - tvs -- tyvars of class - [] -- fundeps - [] -- superclass predicates - [] -- superclass dict selectors - [] -- associated type families - pa_opitems -- class op items - pa_tc -- dictionary type constructor - - let dfun_ty = mkForAllTys tvs - $ mkFunTys (map varType args) (PredTy $ ClassP pa_cls [inst_ty]) + pa_tc <- builtin paTyCon + let Just pa_cls = tyConClass_maybe pa_tc + + let dfun_ty = mkForAllTys tvs + $ mkFunTys (map varType args) (PredTy $ ClassP pa_cls [inst_ty]) -- Set the unfolding for the inliner. raw_dfun <- newExportedVar dfun_name dfun_ty