summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJoey Hess2016-06-02 18:27:23 -0400
committerJoey Hess2016-06-02 18:27:23 -0400
commit432cbefafb4145525639acb20984d7c1beb33c0d (patch)
tree409ce96063ff2a5be836ce73cf864e074dc0925e
parentfa5a0ec4f6ff52a91163821c2bb92158e5e2c158 (diff)
comment
-rw-r--r--doc/forum/functions_that_yield_properties/comment_2_1abdc8ae6e1a00f02fa0130d845ec236._comment23
-rw-r--r--doc/forum/recent_propellor_snapshots_cause_ghc_OOMs/comment_10_f64dc6112a27f5f9a0b6ccf379c7a0e2._comment18
2 files changed, 41 insertions, 0 deletions
diff --git a/doc/forum/functions_that_yield_properties/comment_2_1abdc8ae6e1a00f02fa0130d845ec236._comment b/doc/forum/functions_that_yield_properties/comment_2_1abdc8ae6e1a00f02fa0130d845ec236._comment
new file mode 100644
index 00000000..34a14616
--- /dev/null
+++ b/doc/forum/functions_that_yield_properties/comment_2_1abdc8ae6e1a00f02fa0130d845ec236._comment
@@ -0,0 +1,23 @@
+[[!comment format=mdwn
+ username="joey"
+ subject="""comment 2"""
+ date="2016-06-02T22:21:52Z"
+ content="""
+Another, simpler approach that I often use in my config.hs:
+
+ foo :: Host
+ foo = host "foo.example.com" $ props
+ & User.accountFor myacc
+ & Sudo.enabledFor myacc
+ where
+ myacc = "joey"
+
+You can also bundle up a bunch of properties that
+each need a User into a single combined
+`User -> Property DebianLike`
+
+ myAccountIs :: User -> Property DebianLike
+ myAccountIs u = propertyList ("my user is " ++ u) $ props
+ & User.accountFor u
+ & Sudo.enabledFor u
+"""]]
diff --git a/doc/forum/recent_propellor_snapshots_cause_ghc_OOMs/comment_10_f64dc6112a27f5f9a0b6ccf379c7a0e2._comment b/doc/forum/recent_propellor_snapshots_cause_ghc_OOMs/comment_10_f64dc6112a27f5f9a0b6ccf379c7a0e2._comment
new file mode 100644
index 00000000..8067ba99
--- /dev/null
+++ b/doc/forum/recent_propellor_snapshots_cause_ghc_OOMs/comment_10_f64dc6112a27f5f9a0b6ccf379c7a0e2._comment
@@ -0,0 +1,18 @@
+[[!comment format=mdwn
+ username="joey"
+ subject="""comment 10"""
+ date="2016-06-02T22:14:23Z"
+ content="""
+Mistakes in the parameters of properties (leaving out a parameter, wrong type
+parameter, etc) don't cause these super-long error messages, even when the
+property is in the middle of a big block of other properties.
+
+The problem occurs only when a lot of properties have
+been combined together using `&` and used in an ill-typed way; in this situation
+ghc can't infer the a simple type for the combined properties, due to the use
+of type level functions to combine them.
+
+So, at least in this case, it doesn't seem to be a problem users are likely
+to hit except during the propellor 3.0 ugrade or if they forget to use
+`props` at some other time.
+"""]]