@@ -90,38 +90,32 @@ makePrisms ''Payload
9090
9191instance ToIsoparsec Payload ByteString where
9292 toIsoparsec =
93− try
94− ( _DisconnectPayload
95− <.> specific DisconnectMsg
96− &&& auto @DisconnectReasonCode
97− &&& (tokensWhile (const True) >>> ftu8)
98− )
99− <+> try
100− ( _ServiceRequest <.> specific ServiceRequestMsg
101− &&& auto @SSHString
102− )
103− <+> try
104− ( _VersionPayload <.> utf8 "SSH-2.0-"
105− &&& ( ( try (takeUntil "\r\n" >>> check (BS.all (not . W8.isSpace)))
106− <+> ((takeUntil " " &&& (takeUntil "\r\n" >>> badTsnok "")) >>% morphed)
93+ ( _DisconnectPayload
94+ <.> specific DisconnectMsg
95+ &&& auto @DisconnectReasonCode
96+ &&& (tokensWhile (const True) >>> ftu8)
97+ )
98+ <+> ( _ServiceRequest <.> specific ServiceRequestMsg
99+ &&& auto @SSHString
100+ )
101+ <+> ( _VersionPayload <.> utf8 "SSH-2.0-"
102+ &&& ( ( (takeUntil "\r\n" >>> check (BS.all (not . W8.isSpace)))
103+ <+> ((takeUntil " " &&& (takeUntil "\r\n" >>> badTsnok "")) >>% morphed)
104+ )
105+ >>> ftu8
107106 )
108− >>> ftu8
109− )
110− )
111− <+> try (_IgnorePayload <.> specific IgnoreMsg &&& tokensWhile (const True))
112− <+> try
113− ( _DebugPayload <.> specific DebugMsg
114− &&& auto @AlwaysDisplay
115− &&& auto @SSHString
116− )
117− <+> try
118− ( _UnimplementedPayload <.> specific UnimplementedMsg
119− &&& auto @PacketSequenceNumber
120− )
121− <+> try
122− ( _ServiceAccept <.> specific ServiceAcceptMsg
123− &&& auto @SSHString
124− )
107+ )
108+ <+> (_IgnorePayload <.> specific IgnoreMsg &&& tokensWhile (const True))
109+ <+> ( _DebugPayload <.> specific DebugMsg
110+ &&& auto @AlwaysDisplay
111+ &&& auto @SSHString
112+ )
113+ <+> ( _UnimplementedPayload <.> specific UnimplementedMsg
114+ &&& auto @PacketSequenceNumber
115+ )
116+ <+> ( _ServiceAccept <.> specific ServiceAcceptMsg
117+ &&& auto @SSHString
118+ )
125119
126120newtype Padding = Padding {unPadding :: ByteString}
127121 deriving (Eq, Ord, Show, Generic, Arbitrary)