Skip to content

Commit

Permalink
Move to "iproute" from "network-ip" for the "inet" datatype
Browse files Browse the repository at this point in the history
  • Loading branch information
nikita-volkov committed Jun 24, 2024
1 parent b57e400 commit 377aed7
Show file tree
Hide file tree
Showing 5 changed files with 13 additions and 6 deletions.
4 changes: 4 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
# 1.8

- Move to "iproute" from "network-ip" for the "inet" datatype (#163).

# 1.7

- Decidable instance on `Encoders.Params` removed. It was useless and limited the design.
Expand Down
3 changes: 3 additions & 0 deletions cabal.project
Original file line number Diff line number Diff line change
@@ -1 +1,4 @@
packages: .
allow-newer:
, *:base
, *:template-haskell
4 changes: 2 additions & 2 deletions hasql.cabal
Original file line number Diff line number Diff line change
Expand Up @@ -140,9 +140,9 @@ library
dlist >=0.8 && <0.9 || >=1 && <2,
hashable >=1.2 && <2,
hashtables >=1.1 && <2,
iproute >=1.7 && <1.8,
mtl >=2 && <3,
network-ip >=0.3.0.3 && <0.4,
postgresql-binary >=0.13.1 && <0.14,
postgresql-binary >=0.14 && <0.15,
postgresql-libpq ==0.10.1.0,
profunctors >=5.1 && <6,
scientific >=0.3 && <0.4,
Expand Down
4 changes: 2 additions & 2 deletions library/Hasql/Decoders/All.hs
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
module Hasql.Decoders.All where

import Data.Aeson qualified as Aeson
import Data.IP qualified as Iproute
import Data.Vector.Generic qualified as GenericVector
import Hasql.Decoders.Array qualified as Array
import Hasql.Decoders.Composite qualified as Composite
Expand All @@ -12,7 +13,6 @@ import Hasql.Decoders.Row qualified as Row
import Hasql.Decoders.Value qualified as Value
import Hasql.Prelude hiding (bool, maybe)
import Hasql.Prelude qualified as Prelude
import Network.IP.Addr qualified as NetworkIp
import PostgreSQL.Binary.Decoding qualified as A

-- * Result
Expand Down Expand Up @@ -255,7 +255,7 @@ uuid = Value (Value.decoder (const A.uuid))
-- |
-- Decoder of the @INET@ values.
{-# INLINEABLE inet #-}
inet :: Value (NetworkIp.NetAddr NetworkIp.IP)
inet :: Value Iproute.IPRange
inet = Value (Value.decoder (const A.inet))

-- |
Expand Down
4 changes: 2 additions & 2 deletions library/Hasql/Encoders/All.hs
Original file line number Diff line number Diff line change
Expand Up @@ -4,13 +4,13 @@ module Hasql.Encoders.All where

import Data.Aeson qualified as Aeson
import Data.ByteString.Lazy qualified as LazyByteString
import Data.IP qualified as Iproute
import Hasql.Encoders.Array qualified as Array
import Hasql.Encoders.Params qualified as Params
import Hasql.Encoders.Value qualified as Value
import Hasql.PostgresTypeInfo qualified as PTI
import Hasql.Prelude hiding (bool)
import Hasql.Prelude qualified as Prelude
import Network.IP.Addr qualified as NetworkIp
import PostgreSQL.Binary.Encoding qualified as A
import Text.Builder qualified as C

Expand Down Expand Up @@ -209,7 +209,7 @@ uuid = Value (Value.unsafePTIWithShow PTI.uuid (const A.uuid))
-- |
-- Encoder of @INET@ values.
{-# INLINEABLE inet #-}
inet :: Value (NetworkIp.NetAddr NetworkIp.IP)
inet :: Value Iproute.IPRange
inet = Value (Value.unsafePTIWithShow PTI.inet (const A.inet))

-- |
Expand Down

0 comments on commit 377aed7

Please sign in to comment.