remove postgresql-simple dependency

This commit is contained in:
Keagan McClelland
2021-09-29 12:55:21 -06:00
parent 46c079fe25
commit fab634698f
2 changed files with 3 additions and 12 deletions

View File

@@ -40,7 +40,6 @@ dependencies:
- persistent
- persistent-postgresql
- persistent-template
- postgresql-simple
- process
- protolude
- shakespeare

View File

@@ -9,12 +9,10 @@ import Startlude
import Data.Aeson
import qualified Data.Attoparsec.Text as Atto
import Lib.Types.Emver
import Database.Persist.Sql
import qualified Data.Text as T
import Control.Monad.Fail ( MonadFail(fail) )
import Database.PostgreSQL.Simple.FromField
import Database.PostgreSQL.Simple.ToField
import qualified Data.Text as T
import Database.Persist.Sql
import Lib.Types.Emver
instance FromJSON Version where
parseJSON = withText "Emver Version" $ either fail pure . Atto.parseOnly parseVersion
@@ -35,9 +33,3 @@ instance PersistField VersionRange where
fromPersistValue = first T.pack . Atto.parseOnly parseRange <=< fromPersistValue
instance PersistFieldSql VersionRange where
sqlType _ = SqlString
instance FromField Version where
fromField a = fromJSONField a
instance FromField [Version] where
fromField a = fromJSONField a
instance ToField [Version] where
toField a = toJSONField a