Skip to content

Commit

Permalink
Warnings cleanup
Browse files Browse the repository at this point in the history
  • Loading branch information
snoyberg committed Feb 1, 2018
1 parent bac4b73 commit 462de25
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 9 deletions.
1 change: 0 additions & 1 deletion persistent-test/src/PersistentTest.hs
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,6 @@ import Database.Persist.MongoDB (toInsertDoc, docToEntityThrow, collectionName,

import Database.Persist.TH (mkDeleteCascade, mkSave)
import qualified Data.Text as T
import qualified Control.Exception as E

# ifdef WITH_POSTGRESQL
import Data.List (sort)
Expand Down
14 changes: 6 additions & 8 deletions persistent/Database/Persist/Class/PersistEntity.hs
Original file line number Diff line number Diff line change
Expand Up @@ -175,15 +175,13 @@ data Filter record = forall typ. PersistField typ => Filter
data Entity record =
Entity { entityKey :: Key record
, entityVal :: record }
deriving Typeable

deriving instance (PersistEntity record, Generic (Key record), Generic record) => Generic (Entity record)
deriving instance (PersistEntity record, Eq (Key record), Eq record) => Eq (Entity record)
deriving instance (PersistEntity record, Ord (Key record), Ord record) => Ord (Entity record)
deriving instance (PersistEntity record, Show (Key record), Show record) => Show (Entity record)
deriving instance (PersistEntity record, Read (Key record), Read record) => Read (Entity record)
#if MIN_VERSION_base(4,7,0)
deriving instance Typeable Entity
#endif
deriving instance (Generic (Key record), Generic record) => Generic (Entity record)
deriving instance (Eq (Key record), Eq record) => Eq (Entity record)
deriving instance (Ord (Key record), Ord record) => Ord (Entity record)
deriving instance (Show (Key record), Show record) => Show (Entity record)
deriving instance (Read (Key record), Read record) => Read (Entity record)

-- | Get list of values corresponding to given entity.
entityValues :: PersistEntity record => Entity record -> [PersistValue]
Expand Down

0 comments on commit 462de25

Please sign in to comment.