From 3383d008c7df57e6b5dd066fa1dfa80ac39cdd8e Mon Sep 17 00:00:00 2001 From: Joey Hess Date: Sun, 27 Mar 2016 18:37:02 -0400 Subject: propellor spin --- src/Propellor.hs | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) (limited to 'src/Propellor.hs') diff --git a/src/Propellor.hs b/src/Propellor.hs index 9c5a85a9..e6a52948 100644 --- a/src/Propellor.hs +++ b/src/Propellor.hs @@ -14,13 +14,14 @@ -- > main = defaultMain hosts -- > -- > hosts :: [Host] --- > hosts = --- > [ host "example.com" +-- > 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: -- cgit v1.2.3 From d36fd00e1f42ed3adc1892baff6f12fe6ed946fb Mon Sep 17 00:00:00 2001 From: Joey Hess Date: Mon, 28 Mar 2016 03:15:06 -0400 Subject: update --- src/Propellor.hs | 2 +- src/Propellor/Property.hs | 10 +++------- 2 files changed, 4 insertions(+), 8 deletions(-) (limited to 'src/Propellor.hs') diff --git a/src/Propellor.hs b/src/Propellor.hs index e6a52948..a371ea44 100644 --- a/src/Propellor.hs +++ b/src/Propellor.hs @@ -39,7 +39,6 @@ module Propellor ( , (&) , (!) -- * Propertries - , describe -- | Properties are often combined together in your propellor -- configuration. For example: -- @@ -48,6 +47,7 @@ module Propellor ( , requires , before , onChange + , describe , module Propellor.Property -- | Everything you need to build your own properties, -- and useful property combinators diff --git a/src/Propellor/Property.hs b/src/Propellor/Property.hs index 10730710..111756ff 100644 --- a/src/Propellor/Property.hs +++ b/src/Propellor/Property.hs @@ -269,13 +269,9 @@ isNewerThan x y = do -- If neither input property supports the targeted OS, calls -- `unsupportedOS`. Using the example above on a Fedora system would -- fail that way. --- --- (It would be better if this constrained its return type to the Union --- of the targets of the inputs, but that does not seems to currently --- be possible with ghc.) -{- For some reason, ghc does not like this type signature, or indeed the - - version of this that it emits. But this does compile! Until a type - - signature can be written down, cannot add the Union constraint. +{- I have not yet managed to write down a type signature for this + - that ghc will accept. Until a type signature can be written down, + - cannot add the Union constraint. - http://stackoverflow.com/questions/36256557/what-is-the-type-of-matches-m-s-m-fromsing-s pickOS :: -- cgit v1.2.3