Ticket #5016: Tests.hs

File Tests.hs, 611 bytes (added by guest, 3 years ago)

working file that dump_splices replacing makes not work

Line 
1{-# LANGUAGE QuasiQuotes #-}
2{-# LANGUAGE TemplateHaskell #-}
3{-# LANGUAGE TypeFamilies #-}
4{-# LANGUAGE GeneralizedNewtypeDeriving #-}
5module Tests where
6
7import Database.Persist
8import Database.Persist.TH
9
10mkPersist [$persist|
11  Person
12    name String Update Eq Ne Desc
13    age Int Update "Asc" Desc Lt "some ignored -- attribute" Eq Add
14    color String Maybe Eq Ne -- this is a comment sql=foobarbaz
15    PersonNameKey name -- this is a comment sql=foobarbaz
16  Pet
17    owner PersonId Eq
18    name String
19    type PetType
20|]
21
22data PetType = Cat | Dog
23    deriving (Show, Read, Eq)
24derivePersistField "PetType"