@@ -162,6 +162,7 @@ runKindCheck = interpret $ \case
162162 InferImpossibleErr t ->
163163 throwError . PC. InternalError $ t
164164
165+ -- Gets the original term associated with the Variable.
165166 getTermType :: ModName -> PC. TyDef -> Variable -> Eff effs (Either PC. TyVar PC. TyRef )
166167 getTermType modName td va = do
167168 let termMap = snd . run . runWriter . runReader modName $ tyDef2Map td
@@ -344,16 +345,6 @@ pKind2Kind k =
344345-- =============================================================================
345346-- X To Canonical type conversion functions.
346347
347- {- Replaced with Constructor by Constructor check.
348- -- | TyDef to Kind Canonical representation.
349- tyDef2Type ::
350- forall eff.
351- Members '[Reader ModName, Err] eff =>
352- PC.TyDef ->
353- Eff eff Type
354- tyDef2Type tyde = tyAbsLHS2Type (tyde ^. #tyAbs) <*> tyAbsRHS2Type (tyde ^. #tyAbs)
355- -}
356-
357348tyAbsLHS2Type ::
358349 forall eff .
359350 PC. TyAbs ->
@@ -373,31 +364,6 @@ tyArgs2Type = \case
373364tyArg2Var :: PC. TyArg -> Variable
374365tyArg2Var = LocalRef . view (# argName . # name)
375366
376- {- Replaced with Constructor by Constructor check.
377- tyAbsRHS2Type ::
378- forall eff.
379- Members '[Reader ModName, Err] eff =>
380- PC.TyAbs ->
381- Eff eff Type
382- tyAbsRHS2Type tyab = tyBody2Type (tyab ^. #tyBody)
383-
384- tyBody2Type ::
385- forall eff.
386- Members '[Reader ModName, Err] eff =>
387- PC.TyBody ->
388- Eff eff Type
389- tyBody2Type = \case
390- PC.OpaqueI _ -> pure $ Var tyOpaque
391- PC.SumI s -> sum2Type s
392-
393- sum2Type ::
394- forall eff.
395- Members '[Reader ModName, Err] eff =>
396- PC.Sum ->
397- Eff eff Type
398- sum2Type su = foldWithSum <$> traverse constructor2Type (toList $ su ^. #constructors)
399- -}
400-
401367constructor2Type ::
402368 forall eff .
403369 Members '[Reader ModName , Err ] eff =>
0 commit comments