Skip to content

Commit

Permalink
Use Reduction instead of pairs
Browse files Browse the repository at this point in the history
  • Loading branch information
facundominguez committed Nov 3, 2023
1 parent 8e390a1 commit 0b5fc21
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 2 deletions.
2 changes: 2 additions & 0 deletions liquidhaskell-boot/src-ghc/Liquid/GHC/API.hs
Original file line number Diff line number Diff line change
Expand Up @@ -318,6 +318,8 @@ import GHC.Core.Make as Ghc
, pAT_ERROR_ID
)
import GHC.Core.Predicate as Ghc (getClassPredTys_maybe, getClassPredTys, isEvVarType, isEqPrimPred, isEqPred, isClassPred, isDictId, mkClassPred)
import GHC.Core.Reduction as Ghc
( Reduction(Reduction) )
import GHC.Core.Subst as Ghc (deShadowBinds, emptySubst, extendCvSubst)
import GHC.Core.TyCo.Rep as Ghc
( AnonArgFlag(VisArg)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -1721,8 +1721,8 @@ deepSplitProductType :: FamInstEnvs -> Type -> Maybe DataConAppContext
-- Why do we return the strictness of the data-con arguments?
-- Answer: see Note [Record evaluated-ness in worker/wrapper]
deepSplitProductType fam_envs ty
| let (co, ty1) = topNormaliseType_maybe fam_envs ty
`orElse` (mkRepReflCo ty, ty)
| let Reduction co ty1 = topNormaliseType_maybe fam_envs ty
`orElse` Reduction (mkRepReflCo ty) ty
, Just (tc, tc_args) <- splitTyConApp_maybe ty1
, Just con <- tyConSingleDataCon_maybe tc
, let arg_tys = dataConInstArgTys con tc_args
Expand Down

0 comments on commit 0b5fc21

Please sign in to comment.