From aa07c5df4eebf995c257ebd6e60eae7d8b90d9fd Mon Sep 17 00:00:00 2001 From: Joey Hess Date: Sat, 2 Apr 2016 15:49:30 -0400 Subject: format --- doc/forum/upgrading_to_propellor_3.0.mdwn | 19 +++++++++++++++++-- 1 file changed, 17 insertions(+), 2 deletions(-) (limited to 'doc') 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 -- cgit v1.2.3