newtype FreeJoinSemilattice a = FreeJoinSemilattice
{ unFreeJoinSemilattice :: forall j. JoinSemiLattice j =>
(a -> j) -> j
}
liftFreeJoinSemilattice :: a -> FreeJoinSemilattice a
liftFreeJoinSemilattice a = FreeJoinSemilattice (\inj -> inj a)
lowerFreeJoinSemilattice
:: JoinSemiLattice b
=> FreeJoinSemilattice a -> (a -> b) -> b
lowerFreeJoinSemilattice (FreeJoinSemilattice f) = f
instance Join (FreeJoinSemilattice a) where
join (FreeJoinSemilattice f) (FreeJoinSemilattice g) =
FreeJoinSemilattice (\inj -> f inj \/ g inj)
Things such as