diff options
| author | Félix Sipma <felix.sipma@no-log.org> | 2016-05-24 12:57:44 +0200 |
|---|---|---|
| committer | Joey Hess <joeyh@joeyh.name> | 2016-06-13 23:24:16 -0400 |
| commit | 6b4432c5884d7187140d5fde771444f7c8301438 (patch) | |
| tree | 602119ae6d239e59fc9b6679c9dc4d7308aea0e6 /src/Propellor/Property/FreeBSD | |
| parent | a0ef4e9e957cd11c53df66ce2e8c3f8e716f5501 (diff) | |
convert Architecture to a sumtype
TODO: remove ANDROID (used in GitAnnexBuilder)
TODO: add other architectures
TODO: rename ARMHF
TODO: rename ARMEL
(cherry picked from commit 6f36f6cade4e1d8b15c714565e223562c6573099)
Diffstat (limited to 'src/Propellor/Property/FreeBSD')
| -rw-r--r-- | src/Propellor/Property/FreeBSD/Poudriere.hs | 11 |
1 files changed, 5 insertions, 6 deletions
diff --git a/src/Propellor/Property/FreeBSD/Poudriere.hs b/src/Propellor/Property/FreeBSD/Poudriere.hs index fcad9e87..58477468 100644 --- a/src/Propellor/Property/FreeBSD/Poudriere.hs +++ b/src/Propellor/Property/FreeBSD/Poudriere.hs @@ -9,7 +9,6 @@ module Propellor.Property.FreeBSD.Poudriere where import Propellor.Base import Propellor.Types.Info import Data.List -import Data.String (IsString(..)) import qualified Propellor.Property.FreeBSD.Pkg as Pkg import qualified Propellor.Property.ZFS as ZFS @@ -27,7 +26,7 @@ poudriereConfigured :: PoudriereConfigured -> Bool poudriereConfigured (PoudriereConfigured _) = True setConfigured :: Property (HasInfo + FreeBSD) -setConfigured = tightenTargets $ +setConfigured = tightenTargets $ pureInfoProperty "Poudriere Configured" (PoudriereConfigured "") poudriere :: Poudriere -> Property (HasInfo + FreeBSD) @@ -106,10 +105,10 @@ instance Show PoudriereArch where show I386 = "i386" show AMD64 = "amd64" -instance IsString PoudriereArch where - fromString "i386" = I386 - fromString "amd64" = AMD64 - fromString _ = error "Not a valid Poudriere architecture." +fromArchitecture :: Architecture -> PoudriereArch +fromArchitecture X86_64 = AMD64 +fromArchitecture X86_32 = I386 +fromArchitecture _ = error "Not a valid Poudriere architecture." yesNoProp :: Bool -> String yesNoProp b = if b then "yes" else "no" |
