|Age||Commit message (Collapse)||Author|
Code from Joey by private e-mail.
Turns out that with ghc 8.2.2, the instructions given on the page don't
work. And the cppless variant that I had compiles, but into effectively
mappend = mappend so it loops.
The only way I can see to make it work without cpp is to use
mappend = (Sem.<>)
which is ugly and a land mine waiting to explode if someone changes it
to a nicer mappend = (<>) with a newer version of ghc which will compile
it and work ok, while breaking it with 8.2.2. Sigh.
I posted to haskell-cafe about this.
Fix build with ghc 8.4, which broke due to the Semigroup Monoid change.
Dropped support for building propellor with ghc 7 (as in debian
oldstable), to avoid needing to depend on the semigroups transitional
package, but also because it's just too old to be worth supporting.
If we indeed drop ghc 7 support entirely, some code to support "jessie"
can be removed; concurrent-output can be de-embedded, and the Singletons
code can be simplified.
This commit was sponsored by Jack Hill on Patreon.
* Added Monoid instances for Property and RevertableProperty.
* Removed applyToList. Instead, use mconcat. (API change)
Eg, if you had: applyToList accountFor [User "joey", User "root"]
use instead: mconcat (map accountFor [User "joey", User "root"])
mappend x y is basically the same as x `before` y. In particular, if x
fails to be ensured, it won't ensure y. This seems to make sense, since
applyToList had that behavior, and so does the Monoid for Propellor
Result. The alternative would be to try to ensure both and combine
the results. However, I don't see any reason to do it that way.
It would be nice if the description of both properties were displayed when
ensuring the combination. But then, it would need to display eg:
ensuring x and ensuring y..failed
Without a way to get rid of that redundant last line, I don't want to do
Note that the haddocks for the Monoid instances need a really wide screen
to display! This is IMHO an infelicity in haddock, and I can't do anything
about it really.
This commit was sponsored by Fernando Jimenez on Patreon.
* Property types changed to use a Maybe (Propellor Result). (API change)
* When Nothing needs to be done to ensure a property, propellor
will avoid displaying its description at all. The doNothing property
is an example of such a property.
This is mostly in preparation for Monoid instances for Property types, but
is's also nice that anything that uses doNothing will avoid printing out
any message at all. At least, I think it probably is. It might potentially
be confusing for something that sometimes takes an action and sometimes
resolves to doNothing and in either case has a description set to not
always show the description. If this did turn out to be confusing, the
change to doNothing could be reverted.
This commit was sponsored by Boyd Stephen Smith Jr. on Patreon.