Commit 27bc02eb authored by Andrey Mokhov's avatar Andrey Mokhov
Browse files

Add Eq instances.

parent a5a8d53e
......@@ -29,7 +29,7 @@ data Builder = Ar
| Gcc Stage
| Ghc Stage
| GhcPkg Stage
deriving Show
deriving (Show, Eq)
instance ShowArg Builder where
showArg builder = toStandard <$> do
......
......@@ -4,7 +4,6 @@ module Package.Base (
module Ways,
module Util,
module Oracles,
module Settings,
Package (..), Settings (..), TodoItem (..),
defaultSettings, library, customise, updateSettings,
commonCcArgs, commonLdArgs, commonCppArgs, commonCcWarninigArgs,
......@@ -21,7 +20,6 @@ import Base
import Ways
import Util
import Oracles
import Settings
import qualified System.Directory as S
data Settings = Settings
......@@ -72,6 +70,9 @@ data Package = Package
pkgTodo :: [TodoItem] -- [(Stage1, "dist-install", defaultSettings)]
}
instance Eq Package where
(==) = (==) `on` pkgName
updateSettings :: (Settings -> Settings) -> Package -> Package
updateSettings update (Package name path cabal todo) =
Package name path cabal (map updateTodo todo)
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment