Add a few node- and path-related functions

This commit is contained in:
Joscha 2020-02-08 23:09:49 +00:00
parent 4a0c3e13d5
commit 580b3b3209
2 changed files with 38 additions and 2 deletions

View file

@ -50,7 +50,7 @@ instance FromJSON Node where
newtype Path = Path
{ pathElements :: [NodeId]
} deriving (Show, Eq, ToJSON, FromJSON)
} deriving (Show, Eq, Ord, ToJSON, FromJSON)
parsePacket :: Value -> T.Text -> (Object -> Parser a) -> Parser a
parsePacket value packetType parser = parseJSON value >>= \o -> do