diff options
| author | Gregor Kleen <gkleen@yggdrasil.li> | 2016-01-23 12:46:20 +0000 | 
|---|---|---|
| committer | Gregor Kleen <gkleen@yggdrasil.li> | 2016-01-23 12:46:20 +0000 | 
| commit | 44fed137c50043f87e97996aa32f3353f9a2eeb0 (patch) | |
| tree | 84acb8148a46fd30309eec93606dddbfca66cd81 /spec/src | |
| parent | 5273512b68c67eff2c8e869f84dad1c4d69e16a8 (diff) | |
| download | thermoprint-44fed137c50043f87e97996aa32f3353f9a2eeb0.tar thermoprint-44fed137c50043f87e97996aa32f3353f9a2eeb0.tar.gz thermoprint-44fed137c50043f87e97996aa32f3353f9a2eeb0.tar.bz2 thermoprint-44fed137c50043f87e97996aa32f3353f9a2eeb0.tar.xz thermoprint-44fed137c50043f87e97996aa32f3353f9a2eeb0.zip | |
Removed persistent instances & dep from spec
Diffstat (limited to 'spec/src')
| -rw-r--r-- | spec/src/Thermoprint/Printout.hs | 13 | 
1 files changed, 0 insertions, 13 deletions
| 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) | |||
| 33 | 33 | ||
| 34 | import Data.Proxy (Proxy(..)) | 34 | import Data.Proxy (Proxy(..)) | 
| 35 | 35 | ||
| 36 | import Database.Persist.Class (PersistField(..)) | ||
| 37 | import Database.Persist.Sql (PersistFieldSql(..)) | ||
| 38 | |||
| 39 | import Test.QuickCheck.Arbitrary (Arbitrary(..), CoArbitrary, genericShrink) | 36 | import Test.QuickCheck.Arbitrary (Arbitrary(..), CoArbitrary, genericShrink) | 
| 40 | import Test.QuickCheck.Modifiers (NonNegative(..)) | 37 | import Test.QuickCheck.Modifiers (NonNegative(..)) | 
| 41 | import Test.QuickCheck.Gen (oneof, scale) | 38 | import Test.QuickCheck.Gen (oneof, scale) | 
| @@ -58,9 +55,6 @@ import Data.Function (on) | |||
| 58 | 55 | ||
| 59 | import Data.Foldable (toList, fold) | 56 | import Data.Foldable (toList, fold) | 
| 60 | 57 | ||
| 61 | import Data.Bifunctor | ||
| 62 | import Control.Monad ((<=<)) | ||
| 63 | |||
| 64 | import Data.Encoding (encodeLazyByteStringExplicit, decodeLazyByteString) | 58 | import Data.Encoding (encodeLazyByteStringExplicit, decodeLazyByteString) | 
| 65 | import Data.Encoding.UTF8 | 59 | import Data.Encoding.UTF8 | 
| 66 | import qualified Data.ByteString.Base64.Lazy as Base64 (encode, decode) | 60 | import qualified Data.ByteString.Base64.Lazy as Base64 (encode, decode) | 
| @@ -71,13 +65,6 @@ import Prelude hiding (fold) | |||
| 71 | -- | A 'Printout' is a sequence of visually seperated 'Paragraph's | 65 | -- | A 'Printout' is a sequence of visually seperated 'Paragraph's | 
| 72 | type Printout = Seq Paragraph | 66 | type Printout = Seq Paragraph | 
| 73 | 67 | ||
| 74 | instance PersistField Printout where | ||
| 75 | toPersistValue = toPersistValue . LBS.toStrict . JSON.encode | ||
| 76 | fromPersistValue = first T.pack . JSON.eitherDecodeStrict' <=< fromPersistValue | ||
| 77 | |||
| 78 | instance PersistFieldSql Printout where | ||
| 79 | sqlType _ = sqlType (Proxy :: Proxy Strict.ByteString) | ||
| 80 | |||
| 81 | -- | A 'Paragraph' is a non-seperated sequence of 'Chunk's | 68 | -- | A 'Paragraph' is a non-seperated sequence of 'Chunk's | 
| 82 | type Paragraph = Seq Chunk | 69 | type Paragraph = Seq Chunk | 
| 83 | 70 | ||
