Skip to content

Commit a92eb8d

Browse files
committed
remove: redundant legacy functions for sum folding
1 parent 40514f3 commit a92eb8d

File tree

1 file changed

+1
-35
lines changed
  • lambda-buffers-compiler/src/LambdaBuffers/Compiler

1 file changed

+1
-35
lines changed

lambda-buffers-compiler/src/LambdaBuffers/Compiler/KindCheck.hs

Lines changed: 1 addition & 35 deletions
Original file line numberDiff line numberDiff line change
@@ -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-
357348
tyAbsLHS2Type ::
358349
forall eff.
359350
PC.TyAbs ->
@@ -373,31 +364,6 @@ tyArgs2Type = \case
373364
tyArg2Var :: PC.TyArg -> Variable
374365
tyArg2Var = 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-
401367
constructor2Type ::
402368
forall eff.
403369
Members '[Reader ModName, Err] eff =>

0 commit comments

Comments
 (0)