Skip to content

Commit

Permalink
Write some instances
Browse files Browse the repository at this point in the history
  • Loading branch information
cidkidnix committed Jul 17, 2023
1 parent e6839e0 commit f60d4f9
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 2 deletions.
4 changes: 2 additions & 2 deletions beam-migrate/Database/Beam/Haskell/Syntax.hs
Original file line number Diff line number Diff line change
Expand Up @@ -1038,5 +1038,5 @@ instance Hashable (Hs.CName ())
instance Hashable (Hs.DerivStrategy ())
instance Hashable (Hs.MaybePromotedName ())
#endif
instance Hashable a => Hashable (S.Set a) where
hashWithSalt s a = hashWithSalt s (S.toList a)
--instance Hashable a => Hashable (S.Set a) where
-- hashWithSalt s a = hashWithSalt s (S.toList a)
6 changes: 6 additions & 0 deletions beam-postgres/Database/Beam/Postgres/PgSpecific.hs
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@
{-# LANGUAGE TypeApplications #-}
{-# LANGUAGE ScopedTypeVariables #-}
{-# LANGUAGE PolyKinds #-}
{-# LANGUAGE StandaloneDeriving #-}
{-# LANGUAGE CPP #-}

-- | Postgres-specific types, functions, and operators
Expand Down Expand Up @@ -445,6 +446,8 @@ data PgBoundType
deriving (Show, Generic)
instance Hashable PgBoundType

deriving instance Eq PgBoundType

lBound :: PgBoundType -> ByteString
lBound Inclusive = "["
lBound Exclusive = "("
Expand Down Expand Up @@ -476,6 +479,9 @@ data PgRange (n :: *) a
| PgRange (PgRangeBound a) (PgRangeBound a)
deriving (Show, Generic)

deriving instance Eq a => Eq (PgRangeBound a)
deriving instance Eq a => Eq (PgRange n a)

instance Hashable a => Hashable (PgRangeBound a)

instance Hashable a => Hashable (PgRange n a)
Expand Down

0 comments on commit f60d4f9

Please sign in to comment.