File tree 1 file changed +9
-6
lines changed
1 file changed +9
-6
lines changed Original file line number Diff line number Diff line change @@ -633,11 +633,18 @@ moduleToProb baseCC@CompConf {tempDirBase = baseTempDir, ..} mod_path mb_target
633
633
mkPropSig :: Set RdrName -> LIdP GhcPs -> LIdP GhcPs -> [Sig GhcPs ]
634
634
mkPropSig vars nfid ofid = prop_sig
635
635
where
636
+ alsoInferConstraints :: LHsType GhcPs -> LHsType GhcPs
637
+ alsoInferConstraints = noLocA . HsQualTy noExtField ctx
638
+ where ctx :: LHsContext GhcPs
639
+ ctx = noLocA $ [noLocA $ HsWildCardTy noExtField]
640
+
636
641
prop_sig = case snd <$> prog_sig (unLoc ofid) of
637
- -- We don't want to wrap wildcardTys any further
642
+ -- We don't want to wrap wildcardTys any further,
643
+ -- but we add the constraint inference.
638
644
Just (TypeSig e _ wt) ->
639
645
[ TypeSig e [nfid] $ case wt of
640
- HsWC _ (L _ (HsSig _ _ (L _ (HsWildCardTy _)))) -> wt
646
+ HsWC wx (L sl (HsSig sx sb t@ (L _ (HsWildCardTy _)))) ->
647
+ HsWC wx (L sl (HsSig sx sb $ alsoInferConstraints t))
641
648
_ -> toWrapSig wt
642
649
]
643
650
_ -> []
@@ -647,10 +654,6 @@ moduleToProb baseCC@CompConf {tempDirBase = baseTempDir, ..} mod_path mb_target
647
654
where
648
655
wtys :: [HsType GhcPs ]
649
656
wtys = replicate (length $ filter (`Set.member` vars) targets) (HsWildCardTy NoExtField )
650
- alsoInferConstraints :: LHsType GhcPs -> LHsType GhcPs
651
- alsoInferConstraints = noLocA . HsQualTy noExtField ctx
652
- where ctx :: LHsContext GhcPs
653
- ctx = noLocA $ [noLocA $ HsWildCardTy noExtField]
654
657
655
658
tyApps [] = t
656
659
tyApps (ty : tys) =
You can’t perform that action at this time.
0 commit comments