mirror of
https://github.com/simplex-chat/simplex-chat.git
synced 2026-04-05 04:36:03 +00:00
change data familiy to type family
This commit is contained in:
@@ -90,12 +90,16 @@ data (<==>) (rs :: ConnectionState) (bs :: ConnectionState) :: Type where
|
||||
-> Sing bs
|
||||
-> rs <==> bs
|
||||
|
||||
data family (<==|) rb (ss :: ConnectionState)
|
||||
data instance (<==|) (rs <==> bs) ss :: Type where
|
||||
data AllConnState (rs :: ConnectionState)
|
||||
(bs :: ConnectionState)
|
||||
(ss :: ConnectionState) where
|
||||
(:<==|) :: Prf HasState 'Sender ss
|
||||
=> rs <==> bs
|
||||
-> Sing ss
|
||||
-> rs <==> bs <==| ss
|
||||
-> AllConnState rs bs ss
|
||||
|
||||
type family (<==|) rb ss where
|
||||
(rs <==> bs) <==| (ss :: ConnectionState) = AllConnState rs bs ss
|
||||
|
||||
-- recipient <==> broker <==| sender
|
||||
st2 :: 'Pending <==> 'New <==| 'Confirmed
|
||||
|
||||
Reference in New Issue
Block a user