Skip to content

Commit

Permalink
Fix incomplete pattern warning
Browse files Browse the repository at this point in the history
  • Loading branch information
fendor committed Sep 23, 2024
1 parent 110c232 commit c4c6fc5
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion lib/haskell/web-service/src/Server.hs
Original file line number Diff line number Diff line change
Expand Up @@ -558,7 +558,10 @@ instance ToJSON Function where

instance FromJSON Function where
parseJSON = Aeson.withObject "Function" $ \o -> do
"function" :: Text <- o .: "type"
fnType <- o .: "type"
case fnType :: Text of
"function" -> pure ()
e -> fail $ "Expected \"function\" but got" <> Text.unpack e
props <- o .: "function"
Aeson.withObject
"function body"
Expand Down

0 comments on commit c4c6fc5

Please sign in to comment.