mirror of
https://github.com/hasura/graphql-engine.git
synced 2024-12-15 01:12:56 +03:00
Remove incoherent pragmas in Network.URI.Extended
PR-URL: https://github.com/hasura/graphql-engine-mono/pull/8179 GitOrigin-RevId: 66a1c8d26ef2a4eecba8a49f906582e5f9eb871c
This commit is contained in:
parent
dd24a29419
commit
a8f1af21ca
@ -12,16 +12,16 @@ import Data.Text qualified as T
|
||||
import Hasura.Prelude
|
||||
import Network.URI
|
||||
|
||||
instance {-# INCOHERENT #-} FromJSON URI where
|
||||
instance FromJSON URI where
|
||||
parseJSON (String uri) = do
|
||||
let mUrl = parseURI $ T.unpack uri
|
||||
onNothing mUrl (fail "not a valid URI")
|
||||
parseJSON _ = fail "not a valid URI"
|
||||
|
||||
instance {-# INCOHERENT #-} ToJSON URI where
|
||||
instance ToJSON URI where
|
||||
toJSON = String . tshow
|
||||
|
||||
instance {-# INCOHERENT #-} ToJSONKey URI where
|
||||
instance ToJSONKey URI where
|
||||
toJSONKey = toJSONKeyText tshow
|
||||
|
||||
instance Hashable URI where
|
||||
|
Loading…
Reference in New Issue
Block a user