summaryrefslogtreecommitdiff
path: root/doc/forum/upgrading_to_propellor_3.0.mdwn
diff options
context:
space:
mode:
authorJoey Hess2016-04-02 15:49:30 -0400
committerJoey Hess2016-04-02 15:49:30 -0400
commitaa07c5df4eebf995c257ebd6e60eae7d8b90d9fd (patch)
tree7d9c91a544c516ab7c9e74fce03475bd9ed49c19 /doc/forum/upgrading_to_propellor_3.0.mdwn
parent36e2fb3763962d4bf18c82d078c4fb7c6810a9c2 (diff)
format
Diffstat (limited to 'doc/forum/upgrading_to_propellor_3.0.mdwn')
-rw-r--r--doc/forum/upgrading_to_propellor_3.0.mdwn19
1 files changed, 17 insertions, 2 deletions
diff --git a/doc/forum/upgrading_to_propellor_3.0.mdwn b/doc/forum/upgrading_to_propellor_3.0.mdwn
index af54e938..cc5ebd6e 100644
--- a/doc/forum/upgrading_to_propellor_3.0.mdwn
+++ b/doc/forum/upgrading_to_propellor_3.0.mdwn
@@ -16,8 +16,17 @@ then you can re-run propellor --spin.)
Now, the transition guide as far as your config.hs goes:
-* Change "host name & foo & bar"
- to "host name $ props & foo & bar"
+* Add `props` to host definitions.
+
+ host name
+ & foo
+ & bar
+
+ Becomes
+
+ host name $ props
+ & foo
+ & bar"
* Similarly, `propertyList` and `combineProperties` need `props`
to be used to combine together properties; they no longer accept
lists of properties. (If you have such a list, use `toProps`.)
@@ -49,12 +58,16 @@ Additional things you need to do if you've written your own properties:
signatures tend to be needed when using it. For example, this will
fail to type check, because the type checker cannot guess what type
you intend the intermediate property "go" to have:
+
foo :: Property UnixLike
foo = go `requires` bar
where
go = property "foo" (return NoChange)
+
To fix, specify the type of go:
+
go :: Property UnixLike
+
* `ensureProperty` now needs to be passed a witness to the type of the
property it's used in.
change this: foo = property desc $ ... ensureProperty bar
@@ -63,8 +76,10 @@ Additional things you need to do if you've written your own properties:
When using that to run a command only available on Debian, you can
tighten the type to only the OS that your more specific property works on.
For example:
+
upgraded :: Property Debian
upgraded = tightenTargets (cmdProperty "apt-get" ["upgrade"])
+
* Several utility functions have been renamed:
getInfo to fromInfo
propertyInfo to getInfo