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

Commit 442ff21

Browse files
authored
Merge pull request #14 from expipiplus1/patch-1
Derive Functor for MigrationResult
2 parents 41e0ac9 + 8b2af91 commit 442ff21

File tree

1 file changed

+6
-1
lines changed

1 file changed

+6
-1
lines changed

src/Database/PostgreSQL/Simple/Migration.hs

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,9 @@
1212
-- For usage, see Readme.markdown.
1313

1414
{-# LANGUAGE CPP #-}
15+
{-# LANGUAGE DeriveFoldable #-}
16+
{-# LANGUAGE DeriveFunctor #-}
17+
{-# LANGUAGE DeriveTraversable #-}
1518
{-# LANGUAGE LambdaCase #-}
1619
{-# LANGUAGE OverloadedStrings #-}
1720

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

247252
-- | The 'MigrationContext' provides an execution context for migrations.
248253
data MigrationContext = MigrationContext

0 commit comments

Comments
 (0)