Skip to content

Commit 8703863

Browse files
author
Your Name
committed
Drop old commentary
1 parent 23c35e5 commit 8703863

1 file changed

Lines changed: 0 additions & 22 deletions

File tree

src/Hell.hs

Lines changed: 0 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -2641,26 +2641,6 @@ data Ty a
26412641
-- Below: Needed for FD.freeVar (note for myself, not audience)
26422642
deriving instance FD.Unifiable Ty
26432643

2644-
-- WIP: At this point we want, preferably, a function that goes
2645-
-- from an (IRep IMetaVar) to SomeTypeRep in one go, which inferExp can
2646-
-- use to traverse f iterm to get UTerm SomeTypeRep. Or it receives the expr
2647-
-- to traverse over, due to the ST monadness.
2648-
--
2649-
-- Some key ingredients:
2650-
--
2651-
-- to_sometyperep :: Fix Ty -> Either ZonkError SomeTypeRep
2652-
-- irep_to_uterm :: IRep v -> FD.UTerm Ty v
2653-
-- FD.applyBindings :: UTerm t v -> em m (UTerm t v)
2654-
--
2655-
-- I'd say we want to:
2656-
--
2657-
-- 1) Convert the IRep IMetaVar to UTerm t v using the (Map IMetaVar (STVar ..)) map.
2658-
-- 2) Apply bindings to fully flesh out the type.
2659-
-- 3) Zonk it, going directly from FD.UTerm Ty straight to SomeTypeRep
2660-
-- (tweak to_sometyperep to work with UTerm Ty rather than Fix Ty)
2661-
--
2662-
-- That should be all that's needed?
2663-
26642644
-- Unify all the constraints in @equalities@, zonk and update the term and return it.
26652645
st_unify :: Traversable t
26662646
=> StatsEnabled
@@ -2736,14 +2716,12 @@ stize_imetavar = \v -> do
27362716
modify' (Map.insert v stv)
27372717
pure stv
27382718

2739-
-- <bijection>
27402719
irep_to_uterm :: IRep v -> FD.UTerm Ty v
27412720
irep_to_uterm = \case
27422721
IVar v -> FD.UVar v
27432722
IApp f x -> FD.UTerm (TyApp (irep_to_uterm f) (irep_to_uterm x))
27442723
IFun f x -> FD.UTerm (TyFun (irep_to_uterm f) (irep_to_uterm x))
27452724
ICon t -> FD.UTerm $ TyCon t
2746-
-- </bijection>
27472725

27482726
-- | (unification-fd edition)
27492727
-- A complete implementation of conversion from the inferer's type

0 commit comments

Comments
 (0)