| Safe Haskell | None |
|---|---|
| Language | Haskell2010 |
Propellor
Description
When propellor runs on a Host, it ensures that its Properties are satisfied, taking action as necessary when a Property is not currently satisfied.
A simple propellor program example:
import Propellor
import qualified Propellor.Property.File as File
import qualified Propellor.Property.Apt as Apt
main :: IO ()
main = defaultMain hosts
hosts :: [Host]
hosts = [example]
example :: Host
example = host "example.com" $ props
& Apt.installed ["mydaemon"]
& "/etc/mydaemon.conf" `File.containsLine` "secure=1"
`onChange` cmdProperty "service" ["mydaemon", "restart"]
! Apt.installed ["unwantedpackage"]See config.hs for a more complete example, and clone Propellor's git repository for a deployable system using Propellor: git clone git://git.joeyh.name/propellor
Synopsis
- data Host = Host {
- hostName :: HostName
- hostProperties :: [ChildProperty]
- hostInfo :: Info
- data Property metatypes
- data RevertableProperty setupmetatypes undometatypes
- module Propellor.Types
- defaultMain :: [Host] -> IO ()
- host :: HostName -> Props metatypes -> Host
- (&) :: forall {a} p (y :: [a]) (x :: [a]). (IsProp p, MetaTypes y ~ GetMetaTypes p, CheckCombinableNote x y (NoteFor ('Text "&"))) => Props (MetaTypes x) -> p -> Props (MetaTypes (Combine x y))
- (!) :: forall {a} {k} (x :: [a]) (z :: [a]) (y :: k). CheckCombinableNote x z (NoteFor ('Text "!")) => Props (MetaTypes x) -> RevertableProperty (MetaTypes y) (MetaTypes z) -> Props (MetaTypes (Combine x z))
- requires :: Combines x y => x -> y -> CombinedType x y
- before :: Combines x y => x -> y -> CombinedType x y
- onChange :: Combines x y => x -> y -> CombinedType x y
- describe :: IsProp p => p -> Desc -> p
- module Propellor.Property
- module Propellor.Property.Cmd
- module Propellor.Info
- module Propellor.Property.List
- module Propellor.Types.PrivData
- class Semigroup a => Monoid a where
- fromString :: IsString a => String -> a
- newtype Any = Any {
- getAny :: Bool
- (<>) :: Semigroup a => a -> a -> a
- newtype Ap (f :: k -> Type) (a :: k) = Ap {
- getAp :: f a
- newtype First a = First {}
- newtype Last a = Last {}
- newtype All = All {
- getAll :: Bool
- newtype Alt (f :: k -> Type) (a :: k) = Alt {
- getAlt :: f a
- newtype Dual a = Dual {
- getDual :: a
- newtype Endo a = Endo {
- appEndo :: a -> a
- newtype Product a = Product {
- getProduct :: a
- newtype Sum a = Sum {
- getSum :: a
Core data types
Everything Propellor knows about a system: Its hostname, properties and their collected info.
Constructors
| Host | |
Fields
| |
Instances
| Show Host Source # | |
| IsContainer Host Source # | |
Defined in Propellor.Container Methods containerProperties :: Host -> [ChildProperty] Source # containerInfo :: Host -> Info Source # setContainerProperties :: Host -> [ChildProperty] -> Host Source # | |
| Conductable Host Source # | |
| MonadReader Host Propellor Source # | |
| Conductable [Host] Source # | |
data Property metatypes Source #
The core data type of Propellor, this represents a property that the system should have, with a description, and an action to ensure it has the property.
There are different types of properties that target different OS's, and so have different metatypes. For example: "Property DebianLike" and "Property FreeBSD".
Also, some properties have associated Info, which is indicated in
their type: "Property (HasInfo + DebianLike)"
There are many associated type families, which are mostly used internally, so you needn't worry about them.
Instances
data RevertableProperty setupmetatypes undometatypes Source #
A property that can be reverted. The first Property is run normally and the second is run when it's reverted.
See Versioned
for a way to use RevertableProperty to define different
versions of a host.
Instances
module Propellor.Types
Config file
defaultMain :: [Host] -> IO () Source #
Runs propellor on hosts, as controlled by command-line options.
host :: HostName -> Props metatypes -> Host Source #
Defines a host and its properties.
host "example.com" $ props & someproperty ! oldproperty & otherproperty
(&) :: forall {a} p (y :: [a]) (x :: [a]). (IsProp p, MetaTypes y ~ GetMetaTypes p, CheckCombinableNote x y (NoteFor ('Text "&"))) => Props (MetaTypes x) -> p -> Props (MetaTypes (Combine x y)) infixl 1 Source #
Adds a property to a Props.
Can add Properties and RevertableProperties
(!) :: forall {a} {k} (x :: [a]) (z :: [a]) (y :: k). CheckCombinableNote x z (NoteFor ('Text "!")) => Props (MetaTypes x) -> RevertableProperty (MetaTypes y) (MetaTypes z) -> Props (MetaTypes (Combine x z)) infixl 1 Source #
Adds a property in reverted form.
Propertries
Properties are often combined together in your propellor configuration. For example:
"/etc/foo/config" `File.containsLine` "bar=1" `requires` File.dirExists "/etc/foo"
requires :: Combines x y => x -> y -> CombinedType x y Source #
Indicates that the first property depends on the second, so before the first is ensured, the second must be ensured.
The combined property uses the description of the first property.
before :: Combines x y => x -> y -> CombinedType x y Source #
Combines together two properties, resulting in one property that ensures the first, and if the first succeeds, ensures the second.
The combined property uses the description of the first property.
onChange :: Combines x y => x -> y -> CombinedType x y Source #
Whenever a change has to be made for a Property, causes a hook Property to also be run, but not otherwise.
module Propellor.Property
Everything you need to build your own properties, and useful property combinators
module Propellor.Property.Cmd
Properties to run shell commands
module Propellor.Info
Properties that set Info
module Propellor.Property.List
Combining a list of properties into a single property
module Propellor.Types.PrivData
Private data access for properties
class Semigroup a => Monoid a where #
Instances
fromString :: IsString a => String -> a #
Instances
| NFData Any | |||||
Defined in Control.DeepSeq | |||||
| Monoid Any | |||||
| Semigroup Any | |||||
| Bounded Any | |||||
Defined in GHC.Internal.Data.Semigroup.Internal | |||||
| Generic Any | |||||
Defined in GHC.Internal.Data.Semigroup.Internal Associated Types
| |||||
| Read Any | |||||
Defined in GHC.Internal.Data.Semigroup.Internal | |||||
| Show Any | |||||
| Eq Any | |||||
| Ord Any | |||||
| type MEmpty | |||||
Defined in Fcf.Class.Monoid type MEmpty = 'Any 'False | |||||
| type Rep Any | |||||
Defined in GHC.Internal.Data.Semigroup.Internal | |||||
| type ('Any a :: Any) <> ('Any b :: Any) | |||||
newtype Ap (f :: k -> Type) (a :: k) #
Instances
| Generic1 (Ap f :: k -> Type) | |||||
Defined in GHC.Internal.Data.Monoid Associated Types
| |||||
| Foldable1 f => Foldable1 (Ap f) | |||||
Defined in Data.Foldable1 Methods fold1 :: Semigroup m => Ap f m -> m foldMap1 :: Semigroup m => (a -> m) -> Ap f a -> m foldMap1' :: Semigroup m => (a -> m) -> Ap f a -> m toNonEmpty :: Ap f a -> NonEmpty a maximum :: Ord a => Ap f a -> a minimum :: Ord a => Ap f a -> a foldrMap1 :: (a -> b) -> (a -> b -> b) -> Ap f a -> b foldlMap1' :: (a -> b) -> (b -> a -> b) -> Ap f a -> b foldlMap1 :: (a -> b) -> (b -> a -> b) -> Ap f a -> b foldrMap1' :: (a -> b) -> (a -> b -> b) -> Ap f a -> b | |||||
| Alternative f => Alternative (Ap f) | |||||
| Applicative f => Applicative (Ap f) | |||||
| Functor f => Functor (Ap f) | |||||
| Monad f => Monad (Ap f) | |||||
| MonadPlus f => MonadPlus (Ap f) | |||||
| MonadFail f => MonadFail (Ap f) | |||||
Defined in GHC.Internal.Data.Monoid | |||||
| Foldable f => Foldable (Ap f) | |||||
Defined in GHC.Internal.Data.Foldable Methods fold :: Monoid m => Ap f m -> m foldMap :: Monoid m => (a -> m) -> Ap f a -> m foldMap' :: Monoid m => (a -> m) -> Ap f a -> m foldr :: (a -> b -> b) -> b -> Ap f a -> b foldr' :: (a -> b -> b) -> b -> Ap f a -> b foldl :: (b -> a -> b) -> b -> Ap f a -> b foldl' :: (b -> a -> b) -> b -> Ap f a -> b foldr1 :: (a -> a -> a) -> Ap f a -> a foldl1 :: (a -> a -> a) -> Ap f a -> a elem :: Eq a => a -> Ap f a -> Bool maximum :: Ord a => Ap f a -> a | |||||
| Traversable f => Traversable (Ap f) | |||||
| (Applicative f, Monoid a) => Monoid (Ap f a) | |||||
| (Applicative f, Semigroup a) => Semigroup (Ap f a) | |||||
| (Applicative f, Bounded a) => Bounded (Ap f a) | |||||
Defined in GHC.Internal.Data.Monoid | |||||
| Enum (f a) => Enum (Ap f a) | |||||
Defined in GHC.Internal.Data.Monoid | |||||
| Generic (Ap f a) | |||||
Defined in GHC.Internal.Data.Monoid Associated Types
| |||||
| (Applicative f, Num a) => Num (Ap f a) | |||||
| Read (f a) => Read (Ap f a) | |||||
Defined in GHC.Internal.Data.Monoid | |||||
| Show (f a) => Show (Ap f a) | |||||
| Eq (f a) => Eq (Ap f a) | |||||
| Ord (f a) => Ord (Ap f a) | |||||
| type Rep1 (Ap f :: k -> Type) | |||||
Defined in GHC.Internal.Data.Monoid | |||||
| type Rep (Ap f a) | |||||
Defined in GHC.Internal.Data.Monoid | |||||
Instances
| MonadZip First | |||||
| NFData1 First | |||||
Defined in Control.DeepSeq | |||||
| Applicative First | |||||
| Functor First | |||||
| Monad First | |||||
| Foldable First | |||||
Defined in GHC.Internal.Data.Foldable Methods fold :: Monoid m => First m -> m foldMap :: Monoid m => (a -> m) -> First a -> m foldMap' :: Monoid m => (a -> m) -> First a -> m foldr :: (a -> b -> b) -> b -> First a -> b foldr' :: (a -> b -> b) -> b -> First a -> b foldl :: (b -> a -> b) -> b -> First a -> b foldl' :: (b -> a -> b) -> b -> First a -> b foldr1 :: (a -> a -> a) -> First a -> a foldl1 :: (a -> a -> a) -> First a -> a elem :: Eq a => a -> First a -> Bool maximum :: Ord a => First a -> a | |||||
| Traversable First | |||||
| Generic1 First | |||||
Defined in GHC.Internal.Data.Monoid Associated Types
| |||||
| NFData a => NFData (First a) | |||||
Defined in Control.DeepSeq | |||||
| Monoid (First a) | |||||
| Semigroup (First a) | |||||
| Generic (First a) | |||||
Defined in GHC.Internal.Data.Monoid Associated Types
| |||||
| Read a => Read (First a) | |||||
Defined in GHC.Internal.Data.Monoid | |||||
| Show a => Show (First a) | |||||
| Eq a => Eq (First a) | |||||
| Ord a => Ord (First a) | |||||
| type Rep1 First | |||||
Defined in GHC.Internal.Data.Monoid | |||||
| type Rep (First a) | |||||
Defined in GHC.Internal.Data.Monoid | |||||
Instances
| MonadZip Last | |||||
| NFData1 Last | |||||
Defined in Control.DeepSeq | |||||
| Applicative Last | |||||
| Functor Last | |||||
| Monad Last | |||||
| Foldable Last | |||||
Defined in GHC.Internal.Data.Foldable Methods fold :: Monoid m => Last m -> m foldMap :: Monoid m => (a -> m) -> Last a -> m foldMap' :: Monoid m => (a -> m) -> Last a -> m foldr :: (a -> b -> b) -> b -> Last a -> b foldr' :: (a -> b -> b) -> b -> Last a -> b foldl :: (b -> a -> b) -> b -> Last a -> b foldl' :: (b -> a -> b) -> b -> Last a -> b foldr1 :: (a -> a -> a) -> Last a -> a foldl1 :: (a -> a -> a) -> Last a -> a elem :: Eq a => a -> Last a -> Bool maximum :: Ord a => Last a -> a | |||||
| Traversable Last | |||||
| Generic1 Last | |||||
Defined in GHC.Internal.Data.Monoid Associated Types
| |||||
| NFData a => NFData (Last a) | |||||
Defined in Control.DeepSeq | |||||
| Monoid (Last a) | |||||
| Semigroup (Last a) | |||||
| Generic (Last a) | |||||
Defined in GHC.Internal.Data.Monoid Associated Types
| |||||
| Read a => Read (Last a) | |||||
Defined in GHC.Internal.Data.Monoid | |||||
| Show a => Show (Last a) | |||||
| Eq a => Eq (Last a) | |||||
| Ord a => Ord (Last a) | |||||
| type Rep1 Last | |||||
Defined in GHC.Internal.Data.Monoid | |||||
| type Rep (Last a) | |||||
Defined in GHC.Internal.Data.Monoid | |||||
Instances
| NFData All | |||||
Defined in Control.DeepSeq | |||||
| Monoid All | |||||
| Semigroup All | |||||
| Bounded All | |||||
Defined in GHC.Internal.Data.Semigroup.Internal | |||||
| Generic All | |||||
Defined in GHC.Internal.Data.Semigroup.Internal Associated Types
| |||||
| Read All | |||||
Defined in GHC.Internal.Data.Semigroup.Internal | |||||
| Show All | |||||
| Eq All | |||||
| Ord All | |||||
| type MEmpty | |||||
Defined in Fcf.Class.Monoid type MEmpty = 'All 'True | |||||
| type Rep All | |||||
Defined in GHC.Internal.Data.Semigroup.Internal | |||||
| type ('All a :: All) <> ('All b :: All) | |||||
newtype Alt (f :: k -> Type) (a :: k) #
Instances
| Generic1 (Alt f :: k -> Type) | |||||
Defined in GHC.Internal.Data.Semigroup.Internal Associated Types
| |||||
| MonadZip f => MonadZip (Alt f) | |||||
| Foldable1 f => Foldable1 (Alt f) | |||||
Defined in Data.Foldable1 Methods fold1 :: Semigroup m => Alt f m -> m foldMap1 :: Semigroup m => (a -> m) -> Alt f a -> m foldMap1' :: Semigroup m => (a -> m) -> Alt f a -> m toNonEmpty :: Alt f a -> NonEmpty a maximum :: Ord a => Alt f a -> a minimum :: Ord a => Alt f a -> a foldrMap1 :: (a -> b) -> (a -> b -> b) -> Alt f a -> b foldlMap1' :: (a -> b) -> (b -> a -> b) -> Alt f a -> b foldlMap1 :: (a -> b) -> (b -> a -> b) -> Alt f a -> b foldrMap1' :: (a -> b) -> (a -> b -> b) -> Alt f a -> b | |||||
| Contravariant f => Contravariant (Alt f) | |||||
| Alternative f => Alternative (Alt f) | |||||
| Applicative f => Applicative (Alt f) | |||||
| Functor f => Functor (Alt f) | |||||
| Monad f => Monad (Alt f) | |||||
| MonadPlus f => MonadPlus (Alt f) | |||||
| Foldable f => Foldable (Alt f) | |||||
Defined in GHC.Internal.Data.Foldable Methods fold :: Monoid m => Alt f m -> m foldMap :: Monoid m => (a -> m) -> Alt f a -> m foldMap' :: Monoid m => (a -> m) -> Alt f a -> m foldr :: (a -> b -> b) -> b -> Alt f a -> b foldr' :: (a -> b -> b) -> b -> Alt f a -> b foldl :: (b -> a -> b) -> b -> Alt f a -> b foldl' :: (b -> a -> b) -> b -> Alt f a -> b foldr1 :: (a -> a -> a) -> Alt f a -> a foldl1 :: (a -> a -> a) -> Alt f a -> a elem :: Eq a => a -> Alt f a -> Bool maximum :: Ord a => Alt f a -> a | |||||
| Traversable f => Traversable (Alt f) | |||||
| Alternative f => Monoid (Alt f a) | |||||
| Alternative f => Semigroup (Alt f a) | |||||
| Enum (f a) => Enum (Alt f a) | |||||
Defined in GHC.Internal.Data.Semigroup.Internal | |||||
| Generic (Alt f a) | |||||
Defined in GHC.Internal.Data.Semigroup.Internal Associated Types
| |||||
| Num (f a) => Num (Alt f a) | |||||
| Read (f a) => Read (Alt f a) | |||||
Defined in GHC.Internal.Data.Semigroup.Internal | |||||
| Show (f a) => Show (Alt f a) | |||||
| Eq (f a) => Eq (Alt f a) | |||||
| Ord (f a) => Ord (Alt f a) | |||||
Defined in GHC.Internal.Data.Semigroup.Internal | |||||
| type Rep1 (Alt f :: k -> Type) | |||||
Defined in GHC.Internal.Data.Semigroup.Internal | |||||
| type Rep (Alt f a) | |||||
Defined in GHC.Internal.Data.Semigroup.Internal | |||||
Instances
| MonadZip Dual | |||||
| Foldable1 Dual | |||||
Defined in Data.Foldable1 Methods fold1 :: Semigroup m => Dual m -> m foldMap1 :: Semigroup m => (a -> m) -> Dual a -> m foldMap1' :: Semigroup m => (a -> m) -> Dual a -> m toNonEmpty :: Dual a -> NonEmpty a maximum :: Ord a => Dual a -> a minimum :: Ord a => Dual a -> a foldrMap1 :: (a -> b) -> (a -> b -> b) -> Dual a -> b foldlMap1' :: (a -> b) -> (b -> a -> b) -> Dual a -> b foldlMap1 :: (a -> b) -> (b -> a -> b) -> Dual a -> b foldrMap1' :: (a -> b) -> (a -> b -> b) -> Dual a -> b | |||||
| NFData1 Dual | |||||
Defined in Control.DeepSeq | |||||
| Applicative Dual | |||||
| Functor Dual | |||||
| Monad Dual | |||||
| Foldable Dual | |||||
Defined in GHC.Internal.Data.Foldable Methods fold :: Monoid m => Dual m -> m foldMap :: Monoid m => (a -> m) -> Dual a -> m foldMap' :: Monoid m => (a -> m) -> Dual a -> m foldr :: (a -> b -> b) -> b -> Dual a -> b foldr' :: (a -> b -> b) -> b -> Dual a -> b foldl :: (b -> a -> b) -> b -> Dual a -> b foldl' :: (b -> a -> b) -> b -> Dual a -> b foldr1 :: (a -> a -> a) -> Dual a -> a foldl1 :: (a -> a -> a) -> Dual a -> a elem :: Eq a => a -> Dual a -> Bool maximum :: Ord a => Dual a -> a | |||||
| Traversable Dual | |||||
| Generic1 Dual | |||||
Defined in GHC.Internal.Data.Semigroup.Internal Associated Types
| |||||
| NFData a => NFData (Dual a) | |||||
Defined in Control.DeepSeq | |||||
| Monoid a => Monoid (Dual a) | |||||
| Semigroup a => Semigroup (Dual a) | |||||
| Bounded a => Bounded (Dual a) | |||||
Defined in GHC.Internal.Data.Semigroup.Internal | |||||
| Generic (Dual a) | |||||
Defined in GHC.Internal.Data.Semigroup.Internal Associated Types
| |||||
| Read a => Read (Dual a) | |||||
Defined in GHC.Internal.Data.Semigroup.Internal | |||||
| Show a => Show (Dual a) | |||||
| Eq a => Eq (Dual a) | |||||
| Ord a => Ord (Dual a) | |||||
| type Rep1 Dual | |||||
Defined in GHC.Internal.Data.Semigroup.Internal | |||||
| type Rep (Dual a) | |||||
Defined in GHC.Internal.Data.Semigroup.Internal | |||||
Instances
| Monoid (Endo a) | |||||
| Semigroup (Endo a) | |||||
| Generic (Endo a) | |||||
Defined in GHC.Internal.Data.Semigroup.Internal Associated Types
| |||||
| type Rep (Endo a) | |||||
Defined in GHC.Internal.Data.Semigroup.Internal | |||||
Constructors
| Product | |
Fields
| |
Instances
| MonadZip Product | |||||
| Foldable1 Product | |||||
Defined in Data.Foldable1 Methods fold1 :: Semigroup m => Product m -> m foldMap1 :: Semigroup m => (a -> m) -> Product a -> m foldMap1' :: Semigroup m => (a -> m) -> Product a -> m toNonEmpty :: Product a -> NonEmpty a maximum :: Ord a => Product a -> a minimum :: Ord a => Product a -> a foldrMap1 :: (a -> b) -> (a -> b -> b) -> Product a -> b foldlMap1' :: (a -> b) -> (b -> a -> b) -> Product a -> b foldlMap1 :: (a -> b) -> (b -> a -> b) -> Product a -> b foldrMap1' :: (a -> b) -> (a -> b -> b) -> Product a -> b | |||||
| NFData1 Product | |||||
Defined in Control.DeepSeq | |||||
| Applicative Product | |||||
| Functor Product | |||||
| Monad Product | |||||
| Foldable Product | |||||
Defined in GHC.Internal.Data.Foldable Methods fold :: Monoid m => Product m -> m foldMap :: Monoid m => (a -> m) -> Product a -> m foldMap' :: Monoid m => (a -> m) -> Product a -> m foldr :: (a -> b -> b) -> b -> Product a -> b foldr' :: (a -> b -> b) -> b -> Product a -> b foldl :: (b -> a -> b) -> b -> Product a -> b foldl' :: (b -> a -> b) -> b -> Product a -> b foldr1 :: (a -> a -> a) -> Product a -> a foldl1 :: (a -> a -> a) -> Product a -> a elem :: Eq a => a -> Product a -> Bool maximum :: Ord a => Product a -> a minimum :: Ord a => Product a -> a | |||||
| Traversable Product | |||||
| Generic1 Product | |||||
Defined in GHC.Internal.Data.Semigroup.Internal Associated Types
| |||||
| NFData a => NFData (Product a) | |||||
Defined in Control.DeepSeq | |||||
| Num a => Monoid (Product a) | |||||
| Num a => Semigroup (Product a) | |||||
| Bounded a => Bounded (Product a) | |||||
Defined in GHC.Internal.Data.Semigroup.Internal | |||||
| Generic (Product a) | |||||
Defined in GHC.Internal.Data.Semigroup.Internal Associated Types
| |||||
| Num a => Num (Product a) | |||||
Defined in GHC.Internal.Data.Semigroup.Internal | |||||
| Read a => Read (Product a) | |||||
Defined in GHC.Internal.Data.Semigroup.Internal | |||||
| Show a => Show (Product a) | |||||
| Eq a => Eq (Product a) | |||||
| Ord a => Ord (Product a) | |||||
Defined in GHC.Internal.Data.Semigroup.Internal | |||||
| type Rep1 Product | |||||
Defined in GHC.Internal.Data.Semigroup.Internal | |||||
| type Rep (Product a) | |||||
Defined in GHC.Internal.Data.Semigroup.Internal | |||||
Instances
| MonadZip Sum | |||||
| Foldable1 Sum | |||||
Defined in Data.Foldable1 Methods fold1 :: Semigroup m => Sum m -> m foldMap1 :: Semigroup m => (a -> m) -> Sum a -> m foldMap1' :: Semigroup m => (a -> m) -> Sum a -> m toNonEmpty :: Sum a -> NonEmpty a maximum :: Ord a => Sum a -> a minimum :: Ord a => Sum a -> a foldrMap1 :: (a -> b) -> (a -> b -> b) -> Sum a -> b foldlMap1' :: (a -> b) -> (b -> a -> b) -> Sum a -> b foldlMap1 :: (a -> b) -> (b -> a -> b) -> Sum a -> b foldrMap1' :: (a -> b) -> (a -> b -> b) -> Sum a -> b | |||||
| NFData1 Sum | |||||
Defined in Control.DeepSeq | |||||
| Applicative Sum | |||||
| Functor Sum | |||||
| Monad Sum | |||||
| Foldable Sum | |||||
Defined in GHC.Internal.Data.Foldable Methods fold :: Monoid m => Sum m -> m foldMap :: Monoid m => (a -> m) -> Sum a -> m foldMap' :: Monoid m => (a -> m) -> Sum a -> m foldr :: (a -> b -> b) -> b -> Sum a -> b foldr' :: (a -> b -> b) -> b -> Sum a -> b foldl :: (b -> a -> b) -> b -> Sum a -> b foldl' :: (b -> a -> b) -> b -> Sum a -> b foldr1 :: (a -> a -> a) -> Sum a -> a foldl1 :: (a -> a -> a) -> Sum a -> a elem :: Eq a => a -> Sum a -> Bool maximum :: Ord a => Sum a -> a | |||||
| Traversable Sum | |||||
| Generic1 Sum | |||||
Defined in GHC.Internal.Data.Semigroup.Internal Associated Types
| |||||
| NFData a => NFData (Sum a) | |||||
Defined in Control.DeepSeq | |||||
| Num a => Monoid (Sum a) | |||||
| Num a => Semigroup (Sum a) | |||||
| Bounded a => Bounded (Sum a) | |||||
Defined in GHC.Internal.Data.Semigroup.Internal | |||||
| Generic (Sum a) | |||||
Defined in GHC.Internal.Data.Semigroup.Internal Associated Types
| |||||
| Num a => Num (Sum a) | |||||
| Read a => Read (Sum a) | |||||
Defined in GHC.Internal.Data.Semigroup.Internal | |||||
| Show a => Show (Sum a) | |||||
| Eq a => Eq (Sum a) | |||||
| Ord a => Ord (Sum a) | |||||
| type Rep1 Sum | |||||
Defined in GHC.Internal.Data.Semigroup.Internal | |||||
| type Rep (Sum a) | |||||
Defined in GHC.Internal.Data.Semigroup.Internal | |||||