From 3117652212e0ab3a3db7f5e8784f2620408a6149 Mon Sep 17 00:00:00 2001 From: Joey Hess Date: Sun, 26 Feb 2017 16:20:01 -0400 Subject: fix tabs for indentation --- src/Propellor/Types/ZFS.hs | 74 +++++++++++++++++++++++----------------------- 1 file changed, 37 insertions(+), 37 deletions(-) (limited to 'src/Propellor/Types/ZFS.hs') diff --git a/src/Propellor/Types/ZFS.hs b/src/Propellor/Types/ZFS.hs index 42ff74ec..22b848fa 100644 --- a/src/Propellor/Types/ZFS.hs +++ b/src/Propellor/Types/ZFS.hs @@ -34,27 +34,27 @@ toPropertyList = Set.foldr (\p l -> l ++ [toPair p]) [] fromPropertyList :: [(String, String)] -> ZFSProperties fromPropertyList props = - Set.fromList $ map fromPair props + Set.fromList $ map fromPair props zfsName :: ZFS -> String zfsName (ZFS (ZPool pool) dataset) = intercalate "/" [pool, show dataset] instance ConfigurableValue ZDataset where - val (ZDataset paths) = intercalate "/" paths + val (ZDataset paths) = intercalate "/" paths instance Show ZDataset where - show = val + show = val instance IsString ZDataset where - fromString s = ZDataset $ SU.split "/" s + fromString s = ZDataset $ SU.split "/" s instance IsString ZPool where - fromString p = ZPool p + fromString p = ZPool p class Value a where - toValue :: a -> String - fromValue :: (IsString a) => String -> a - fromValue = fromString + toValue :: a -> String + fromValue :: (IsString a) => String -> a + fromValue = fromString data ZFSYesNo = ZFSYesNo Bool deriving (Show, Eq, Ord) data ZFSOnOff = ZFSOnOff Bool deriving (Show, Eq, Ord) @@ -62,57 +62,57 @@ data ZFSSize = ZFSSize Integer deriving (Show, Eq, Ord) data ZFSString = ZFSString String deriving (Show, Eq, Ord) instance Value ZFSYesNo where - toValue (ZFSYesNo True) = "yes" - toValue (ZFSYesNo False) = "no" + toValue (ZFSYesNo True) = "yes" + toValue (ZFSYesNo False) = "no" instance Value ZFSOnOff where - toValue (ZFSOnOff True) = "on" - toValue (ZFSOnOff False) = "off" + toValue (ZFSOnOff True) = "on" + toValue (ZFSOnOff False) = "off" instance Value ZFSSize where - toValue (ZFSSize s) = show s + toValue (ZFSSize s) = show s instance Value ZFSString where - toValue (ZFSString s) = s + toValue (ZFSString s) = s instance IsString ZFSString where - fromString = ZFSString + fromString = ZFSString instance IsString ZFSYesNo where - fromString "yes" = ZFSYesNo True - fromString "no" = ZFSYesNo False - fromString _ = error "Not yes or no" + fromString "yes" = ZFSYesNo True + fromString "no" = ZFSYesNo False + fromString _ = error "Not yes or no" instance IsString ZFSOnOff where - fromString "on" = ZFSOnOff True - fromString "off" = ZFSOnOff False - fromString _ = error "Not on or off" + fromString "on" = ZFSOnOff True + fromString "off" = ZFSOnOff False + fromString _ = error "Not on or off" data ZFSACLInherit = AIDiscard | AINoAllow | AISecure | AIPassthrough deriving (Show, Eq, Ord) instance IsString ZFSACLInherit where - fromString "discard" = AIDiscard - fromString "noallow" = AINoAllow - fromString "secure" = AISecure - fromString "passthrough" = AIPassthrough - fromString _ = error "Not valid aclpassthrough value" + fromString "discard" = AIDiscard + fromString "noallow" = AINoAllow + fromString "secure" = AISecure + fromString "passthrough" = AIPassthrough + fromString _ = error "Not valid aclpassthrough value" instance Value ZFSACLInherit where - toValue AIDiscard = "discard" - toValue AINoAllow = "noallow" - toValue AISecure = "secure" - toValue AIPassthrough = "passthrough" + toValue AIDiscard = "discard" + toValue AINoAllow = "noallow" + toValue AISecure = "secure" + toValue AIPassthrough = "passthrough" data ZFSACLMode = AMDiscard | AMGroupmask | AMPassthrough deriving (Show, Eq, Ord) instance IsString ZFSACLMode where - fromString "discard" = AMDiscard - fromString "groupmask" = AMGroupmask - fromString "passthrough" = AMPassthrough - fromString _ = error "Invalid zfsaclmode" + fromString "discard" = AMDiscard + fromString "groupmask" = AMGroupmask + fromString "passthrough" = AMPassthrough + fromString _ = error "Invalid zfsaclmode" instance Value ZFSACLMode where - toValue AMDiscard = "discard" - toValue AMGroupmask = "groupmask" - toValue AMPassthrough = "passthrough" + toValue AMDiscard = "discard" + toValue AMGroupmask = "groupmask" + toValue AMPassthrough = "passthrough" data ZFSProperty = Mounted ZFSYesNo | Mountpoint ZFSString -- cgit v1.2.3