From 44fed137c50043f87e97996aa32f3353f9a2eeb0 Mon Sep 17 00:00:00 2001 From: Gregor Kleen Date: Sat, 23 Jan 2016 12:46:20 +0000 Subject: Removed persistent instances & dep from spec --- spec/src/Thermoprint/Printout.hs | 13 ------------- spec/thermoprint-spec.cabal | 1 - spec/thermoprint-spec.nix | 7 +++---- 3 files changed, 3 insertions(+), 18 deletions(-) (limited to 'spec') diff --git a/spec/src/Thermoprint/Printout.hs b/spec/src/Thermoprint/Printout.hs index aae71aa..2be0a83 100644 --- a/spec/src/Thermoprint/Printout.hs +++ b/spec/src/Thermoprint/Printout.hs @@ -33,9 +33,6 @@ import Data.Aeson.Types (typeMismatch) import Data.Proxy (Proxy(..)) -import Database.Persist.Class (PersistField(..)) -import Database.Persist.Sql (PersistFieldSql(..)) - import Test.QuickCheck.Arbitrary (Arbitrary(..), CoArbitrary, genericShrink) import Test.QuickCheck.Modifiers (NonNegative(..)) import Test.QuickCheck.Gen (oneof, scale) @@ -58,9 +55,6 @@ import Data.Function (on) import Data.Foldable (toList, fold) -import Data.Bifunctor -import Control.Monad ((<=<)) - import Data.Encoding (encodeLazyByteStringExplicit, decodeLazyByteString) import Data.Encoding.UTF8 import qualified Data.ByteString.Base64.Lazy as Base64 (encode, decode) @@ -71,13 +65,6 @@ import Prelude hiding (fold) -- | A 'Printout' is a sequence of visually seperated 'Paragraph's type Printout = Seq Paragraph -instance PersistField Printout where - toPersistValue = toPersistValue . LBS.toStrict . JSON.encode - fromPersistValue = first T.pack . JSON.eitherDecodeStrict' <=< fromPersistValue - -instance PersistFieldSql Printout where - sqlType _ = sqlType (Proxy :: Proxy Strict.ByteString) - -- | A 'Paragraph' is a non-seperated sequence of 'Chunk's type Paragraph = Seq Chunk diff --git a/spec/thermoprint-spec.cabal b/spec/thermoprint-spec.cabal index 942cbe4..da79ee8 100644 --- a/spec/thermoprint-spec.cabal +++ b/spec/thermoprint-spec.cabal @@ -44,7 +44,6 @@ library , aeson >=0.9.0 && <1 , base64-bytestring >=1.0.0 && <2 , encoding >=0.8 && <1 - , persistent >=2.2 && <3 -- hs-source-dirs: default-language: Haskell2010 diff --git a/spec/thermoprint-spec.nix b/spec/thermoprint-spec.nix index 6d94ef6..1825ddd 100644 --- a/spec/thermoprint-spec.nix +++ b/spec/thermoprint-spec.nix @@ -1,7 +1,6 @@ { mkDerivation, aeson, base, base64-bytestring, bytestring, Cabal , cabal-test-quickcheck, containers, deepseq, encoding, hspec -, persistent, QuickCheck, quickcheck-instances, servant, stdenv -, text +, QuickCheck, quickcheck-instances, servant, stdenv, text }: mkDerivation { pname = "thermoprint-spec"; @@ -9,8 +8,8 @@ mkDerivation { src = ./.; libraryHaskellDepends = [ aeson base base64-bytestring bytestring Cabal cabal-test-quickcheck - containers deepseq encoding persistent QuickCheck - quickcheck-instances servant text + containers deepseq encoding QuickCheck quickcheck-instances servant + text ]; testHaskellDepends = [ aeson base hspec QuickCheck quickcheck-instances -- cgit v1.2.3