Skip to content
This repository was archived by the owner on Sep 20, 2021. It is now read-only.

Derive Functor for MigrationResult #14

Merged
merged 2 commits into from
Jan 24, 2017
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 6 additions & 1 deletion src/Database/PostgreSQL/Simple/Migration.hs
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,9 @@
-- For usage, see Readme.markdown.

{-# LANGUAGE CPP #-}
{-# LANGUAGE DeriveFoldable #-}
{-# LANGUAGE DeriveFunctor #-}
{-# LANGUAGE DeriveTraversable #-}
{-# LANGUAGE LambdaCase #-}
{-# LANGUAGE OverloadedStrings #-}

Expand Down Expand Up @@ -41,6 +44,8 @@ import Control.Monad (void, when)
import qualified Crypto.Hash.MD5 as MD5 (hash)
import qualified Data.ByteString as BS (ByteString, readFile)
import qualified Data.ByteString.Base64 as B64 (encode)
import Data.Foldable (Foldable)
import Data.Traversable (Traversable)
import Data.List (isPrefixOf, sort)
#if __GLASGOW_HASKELL__ < 710
import Data.Monoid (mconcat)
Expand Down Expand Up @@ -242,7 +247,7 @@ data MigrationResult a
-- ^ There was an error in script migration.
| MigrationSuccess
-- ^ All scripts have been executed successfully.
deriving (Show, Eq, Read, Ord)
deriving (Show, Eq, Read, Ord, Functor, Foldable, Traversable)

-- | The 'MigrationContext' provides an execution context for migrations.
data MigrationContext = MigrationContext
Expand Down