Safe Haskell | None |
---|---|
Language | Haskell2010 |
Singletons to work with MuxMode
kind.
Synopsis
- data SingMuxMode (mode :: Mode) where
- data SingHasInitiator (mode :: Mode) where
- SingHasInitiator :: forall (mode :: Mode). HasInitiator mode ~ 'True => SingHasInitiator mode
- SingNoInitiator :: forall (mode :: Mode). HasInitiator mode ~ 'False => SingHasInitiator mode
- hasInitiatorMode :: forall (mode :: Mode). SingMuxMode mode -> SingHasInitiator mode
- data WithMuxMode (mode :: Mode) a b where
- WithInitiatorMode :: forall a b. a -> WithMuxMode 'InitiatorMode a b
- WithResponderMode :: forall b a. b -> WithMuxMode 'ResponderMode a b
- WithInitiatorResponderMode :: forall a b. a -> b -> WithMuxMode 'InitiatorResponderMode a b
- type WithMuxTuple (mode :: Mode) a = WithMuxMode mode a a
- withInitiatorMode :: forall (mode :: Mode) a b. HasInitiator mode ~ 'True => WithMuxMode mode a b -> a
- withResponderMode :: forall (mode :: Mode) a b. HasResponder mode ~ 'True => WithMuxMode mode a b -> b
- data InResponderMode (mode :: Mode) a where
- InResponderMode :: forall (mode :: Mode) a. HasResponder mode ~ 'True => a -> InResponderMode mode a
- NotInResponderMode :: forall (mode :: Mode) a. InResponderMode mode a
Documentation
data SingMuxMode (mode :: Mode) where Source #
Singletons for matching the MuxMode
at term level.
data SingHasInitiator (mode :: Mode) where Source #
Singleton for to match the
constraint.HasInitiator
mode ~ True
SingHasInitiator :: forall (mode :: Mode). HasInitiator mode ~ 'True => SingHasInitiator mode | |
SingNoInitiator :: forall (mode :: Mode). HasInitiator mode ~ 'False => SingHasInitiator mode |
hasInitiatorMode :: forall (mode :: Mode). SingMuxMode mode -> SingHasInitiator mode Source #
data WithMuxMode (mode :: Mode) a b where Source #
WithInitiatorMode :: forall a b. a -> WithMuxMode 'InitiatorMode a b | |
WithResponderMode :: forall b a. b -> WithMuxMode 'ResponderMode a b | |
WithInitiatorResponderMode :: forall a b. a -> b -> WithMuxMode 'InitiatorResponderMode a b |
type WithMuxTuple (mode :: Mode) a = WithMuxMode mode a a Source #
withInitiatorMode :: forall (mode :: Mode) a b. HasInitiator mode ~ 'True => WithMuxMode mode a b -> a Source #
withResponderMode :: forall (mode :: Mode) a b. HasResponder mode ~ 'True => WithMuxMode mode a b -> b Source #
data InResponderMode (mode :: Mode) a where Source #
InResponderMode :: forall (mode :: Mode) a. HasResponder mode ~ 'True => a -> InResponderMode mode a | |
NotInResponderMode :: forall (mode :: Mode) a. InResponderMode mode a |