| Age | Commit message (Collapse) | Author |
|
now that compatability with ghc 7 is no longer needed.
Data.Type.Bool contains effectively the same stuff that was implemented
here, so removed my code.
Tried to use Data.Type.Equality instead of my EqT, but it seems to be some
other type of (type level) equality, and didn't compile. Instead went with
the simpler EqT implementation that newer ghc versions allow.
The rest of the changes are simply better syntax for defining type
families.
And upon using that syntax, ghc noticed that `type family a + b`
does not have kind "ab" like I wrote before, but is kind *.
Tested on debian stable with ghc 8.0.1.
This commit was sponsored by John Pellman on Patreon.
|
|
Added Propellor.Property.Atomic, which can make a non-atomic property
that operates on a directory into an atomic property.
Also has a generic version that could be used for things other than
directories that can be updated atomically.
(Inspired by Vaibhav Sagar's talk on Functional Devops in a
Dysfunctional World at LCA 2018.)
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.
|
|
ghc 7 does not support -fno-warn-redundant-constraints so this can't be
done on a per-module basis.
It would be good to revert this commit when dropping support for ghc 7.
|
|
Only a couple of the constraints were really redundant. The rest are
essential to propellor's tracking of Info propigation, so I silenced the
warning for those.
It would be better to only silence the warning for the functions with the
extra constraints, but IIRC warnings can only be silenced on an entire file
basis.
This commit was sponsored by Andreas on Patreon.
|
|
|
|
|
|
|
|
|
|
|
|
I wanted to keep propertyList [foo, bar] working, but had some difficulty
making the type class approach work. Anyway, that's unlikely to be useful,
since foo and bar probably have different types, or could easiy have their
types updated breaking it.
|
|
Was wrong when there was a non-target in the MetaTypes list.
Also, rework to improve type checker errors.
|
|
|
|
|
|
Moved to its own module to keep everything related in one place.
|