ddc-core-0.4.1.3: Disciplined Disciple Compiler core language and type checker.

Safe HaskellSafe-Inferred

DDC.Type.Subsumes

Synopsis

Documentation

subsumesT :: Ord n => Kind n -> Type n -> Type n -> BoolSource

Check whether the first type subsumes the second.

Both arguments are converted to sums, and we check that every element of the second sum is equivalent to an element in the first.

This only works for well formed types of effect and closure kind. Other types will yield False.