Commit 31d88906 authored by Andrey Mokhov's avatar Andrey Mokhov
Browse files

Fix Show instances.

parent 552f6170
......@@ -85,10 +85,10 @@ setting key = askConfig $ case key of
settingList :: SettingList -> Action [String]
settingList key = fmap words $ askConfig $ case key of
ConfCcArgs stage -> "conf-cc-args-stage" ++ show stage
ConfCppArgs stage -> "conf-cpp-args-stage" ++ show stage
ConfGccLinkerArgs stage -> "conf-gcc-linker-args-stage" ++ show stage
ConfLdLinkerArgs stage -> "conf-ld-linker-args-stage" ++ show stage
ConfCcArgs stage -> "conf-cc-args-stage" ++ show (fromEnum stage)
ConfCppArgs stage -> "conf-cpp-args-stage" ++ show (fromEnum stage)
ConfGccLinkerArgs stage -> "conf-gcc-linker-args-stage" ++ show (fromEnum stage)
ConfLdLinkerArgs stage -> "conf-ld-linker-args-stage" ++ show (fromEnum stage)
GmpIncludeDirs -> "gmp-include-dirs"
GmpLibDirs -> "gmp-lib-dirs"
HsCppArgs -> "hs-cpp-args"
......
......@@ -5,10 +5,8 @@ import Base
import GHC.Generics (Generic)
-- TODO: explain stages
data Stage = Stage0 | Stage1 | Stage2 | Stage3 deriving (Eq, Enum, Generic)
instance Show Stage where
show = show . fromEnum
data Stage = Stage0 | Stage1 | Stage2 | Stage3
deriving (Show, Eq, Ord, Enum, Generic)
-- Instances for storing in the Shake database
instance Binary Stage
......
......@@ -37,7 +37,7 @@ instance Monoid a => Monoid (ReaderT Target Action a) where
-- PartialTarget is a partially constructed Target with fields Stage and
-- Package only. PartialTarget's are used for generating build rules.
data PartialTarget = PartialTarget Stage Package
data PartialTarget = PartialTarget Stage Package deriving Show
-- Convert PartialTarget to Target assuming that unknown fields won't be used.
fromPartial :: PartialTarget -> Target
......
......@@ -28,6 +28,7 @@ data WayUnit = Threaded
| GranSim
deriving (Eq, Enum)
-- TODO: get rid of non-derived Show instances
instance Show WayUnit where
show unit = case unit of
Threaded -> "thr"
......
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