module Hasql.Postgres.Prelude
(
module Exports,
bug,
bottom,
partial,
)
where
import BasePrelude as Exports
import MTLPrelude as Exports hiding (shift)
import Control.Monad.Morph as Exports
import ListT as Exports (ListT)
import Data.Hashable as Exports (Hashable(..))
import Data.Text as Exports (Text)
import Data.ByteString as Exports (ByteString)
import Data.Decimal as Exports (Decimal, DecimalRaw)
import Data.Scientific as Exports (Scientific)
import Data.Time as Exports
import System.Locale as Exports
import Data.Vector as Exports (Vector)
import Development.Placeholders as Exports
import qualified Debug.Trace.LocationTH
bug = [e| $(Debug.Trace.LocationTH.failure) . (msg <>) |]
where
msg = "A \"hasql-postgres\" package bug: " :: String
bottom = [e| $bug "Bottom evaluated" |]
partial :: Alternative f => (a -> Bool) -> a -> f a
partial p x =
if p x then pure x else empty