TemplateTestImports.hs 314 B

123456789101112131415161718
  1. {-# LANGUAGE TemplateHaskell #-}
  2. module TemplateTestImports where
  3. import Data.Aeson.TH
  4. import Test.QuickCheck
  5. import Database.Persist.TH
  6. data Foo = Bar | Baz
  7. deriving (Show, Eq)
  8. deriveJSON defaultOptions ''Foo
  9. derivePersistFieldJSON "Foo"
  10. instance Arbitrary Foo where
  11. arbitrary = elements [Bar, Baz]