Safe Haskell | None |
---|---|
Language | Haskell2010 |
- type CommuteFn p1 p2 = forall wX wY. (p1 :> p2) wX wY -> Maybe ((p2 :> p1) wX wY)
- commuterIdFL :: CommuteFn p1 p2 -> CommuteFn p1 (FL p2)
- commuterFLId :: CommuteFn p1 p2 -> CommuteFn (FL p1) p2
- commuterIdRL :: CommuteFn p1 p2 -> CommuteFn p1 (RL p2)
- commuterRLId :: CommuteFn p1 p2 -> CommuteFn (RL p1) p2
- type MergeFn p1 p2 = forall wX wY. (p1 :\/: p2) wX wY -> (p2 :/\: p1) wX wY
- mergerIdFL :: MergeFn p1 p2 -> MergeFn p1 (FL p2)
- type TotalCommuteFn p1 p2 = forall wX wY. (p1 :> p2) wX wY -> (p2 :> p1) wX wY
- totalCommuterIdFL :: TotalCommuteFn p1 p2 -> TotalCommuteFn p1 (FL p2)
- totalCommuterFLId :: TotalCommuteFn p1 p2 -> TotalCommuteFn (FL p1) p2
- totalCommuterFLFL :: TotalCommuteFn p1 p2 -> TotalCommuteFn (FL p1) (FL p2)
Documentation
type CommuteFn p1 p2 = forall wX wY. (p1 :> p2) wX wY -> Maybe ((p2 :> p1) wX wY) Source
CommuteFn is the basis of a general framework for building up commutation operations between different patch types in a generic manner. Unfortunately type classes are not well suited to the problem because of the multiple possible routes by which the commuter for (FL p1, FL p2) can be built out of the commuter for (p1, p2) - and more complicated problems when we start building multiple constructors on top of each other. The type class resolution machinery really can't cope with selecting some route, because it doesn't know that all possible routes should be equivalent.
commuterIdFL :: CommuteFn p1 p2 -> CommuteFn p1 (FL p2) Source
commuterFLId :: CommuteFn p1 p2 -> CommuteFn (FL p1) p2 Source
commuterIdRL :: CommuteFn p1 p2 -> CommuteFn p1 (RL p2) Source
commuterRLId :: CommuteFn p1 p2 -> CommuteFn (RL p1) p2 Source
mergerIdFL :: MergeFn p1 p2 -> MergeFn p1 (FL p2) Source
type TotalCommuteFn p1 p2 = forall wX wY. (p1 :> p2) wX wY -> (p2 :> p1) wX wY Source
totalCommuterIdFL :: TotalCommuteFn p1 p2 -> TotalCommuteFn p1 (FL p2) Source
totalCommuterFLId :: TotalCommuteFn p1 p2 -> TotalCommuteFn (FL p1) p2 Source
totalCommuterFLFL :: TotalCommuteFn p1 p2 -> TotalCommuteFn (FL p1) (FL p2) Source