Replace ad-hoc isLeft by import from Data.Either
This commit is contained in:
@@ -7,6 +7,7 @@
|
||||
module Database.PostgreSQL.OpiumSpec (spec) where
|
||||
|
||||
import Data.ByteString (ByteString)
|
||||
import Data.Either (isLeft)
|
||||
import Data.Functor.Identity (Identity (..))
|
||||
import Data.Proxy (Proxy (..))
|
||||
import Data.Text (Text)
|
||||
@@ -53,10 +54,6 @@ newtype Only a = Only
|
||||
|
||||
instance Opium.FromField a => Opium.FromRow (Only a) where
|
||||
|
||||
isLeft :: Either a b -> Bool
|
||||
isLeft (Left _) = True
|
||||
isLeft _ = False
|
||||
|
||||
shouldHaveColumns
|
||||
:: Opium.FromRow a
|
||||
=> Proxy a
|
||||
|
||||
Reference in New Issue
Block a user