mirror of
https://github.com/Start9Labs/registry.git
synced 2026-03-26 02:11:53 +00:00
remove postgresql-simple dependency
This commit is contained in:
@@ -40,7 +40,6 @@ dependencies:
|
||||
- persistent
|
||||
- persistent-postgresql
|
||||
- persistent-template
|
||||
- postgresql-simple
|
||||
- process
|
||||
- protolude
|
||||
- shakespeare
|
||||
|
||||
@@ -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
|
||||
Reference in New Issue
Block a user