@@ -521,14 +521,14 @@ public class Machine<S: StateType, E: EventType>
521521infix operator <-! : AdditionPrecedence
522522
523523@discardableResult
524- public func <-! < S: StateType , E: EventType > ( machine: Machine < S , E > , event: E ) -> Machine < S , E >
524+ public func <-! < S, E> ( machine: Machine < S , E > , event: E ) -> Machine < S , E >
525525{
526526 machine. tryEvent ( event)
527527 return machine
528528}
529529
530530@discardableResult
531- public func <-! < S: StateType , E: EventType > ( machine: Machine < S , E > , tuple: ( E , Any ? ) ) -> Machine < S , E >
531+ public func <-! < S, E> ( machine: Machine < S , E > , tuple: ( E , Any ? ) ) -> Machine < S , E >
532532{
533533 machine. tryEvent ( tuple. 0 , userInfo: tuple. 1 )
534534 return machine
@@ -541,7 +541,7 @@ public func <-! <S: StateType, E: EventType>(machine: Machine<S, E>, tuple: (E,
541541/// Precedence for registered handlers (higher number is called later).
542542public typealias HandlerOrder = UInt8
543543
544- internal let _defaultOrder : HandlerOrder = 100
544+ public let _defaultOrder : HandlerOrder = 100
545545
546546//--------------------------------------------------
547547// MARK: - Internal
@@ -557,7 +557,7 @@ internal func _createUniqueString() -> String
557557 return uniqueString
558558}
559559
560- internal func _validTransitions< S: StateType > ( fromState: S , toState: S ) -> [ Transition < S > ]
560+ internal func _validTransitions< S> ( fromState: S , toState: S ) -> [ Transition < S > ]
561561{
562562 return [
563563 fromState => toState,
@@ -567,12 +567,12 @@ internal func _validTransitions<S: StateType>(fromState: S, toState: S) -> [Tran
567567 ]
568568}
569569
570- internal func _canPassCondition< S: StateType , E: EventType > ( _ condition: Machine < S , E > . Condition ? , forEvent event: E ? , fromState: S , toState: S , userInfo: Any ? ) -> Bool
570+ internal func _canPassCondition< S: StateType , E: EventType > ( _ condition: Machine < S , E > . Condition ? , forEvent event: E ? , fromState: S , toState: S , userInfo: Any ? ) -> Bool
571571{
572572 return condition ? ( ( event, fromState, toState, userInfo) ) ?? true
573573}
574574
575- internal func _insertHandlerIntoArray< S: StateType , E: EventType > ( _ handlerInfos: inout [ _HandlerInfo < S , E > ] , newHandlerInfo: _HandlerInfo < S , E > )
575+ internal func _insertHandlerIntoArray< S, E> ( _ handlerInfos: inout [ _HandlerInfo < S , E > ] , newHandlerInfo: _HandlerInfo < S , E > )
576576{
577577 var index = handlerInfos. count
578578
@@ -586,7 +586,7 @@ internal func _insertHandlerIntoArray<S: StateType, E: EventType>(_ handlerInfos
586586 handlerInfos. insert ( newHandlerInfo, at: index)
587587}
588588
589- internal func _removeHandlerFromArray< S: StateType , E: EventType > ( _ handlerInfos: inout [ _HandlerInfo < S , E > ] , removingHandlerID: _HandlerID < S , E > ) -> Bool
589+ internal func _removeHandlerFromArray< S, E> ( _ handlerInfos: inout [ _HandlerInfo < S , E > ] , removingHandlerID: _HandlerID < S , E > ) -> Bool
590590{
591591 for i in 0 ..< handlerInfos. count {
592592 if handlerInfos [ i] . key == removingHandlerID. key {
0 commit comments