summaryrefslogtreecommitdiff
path: root/doc/todo/RevertableProperty_with_NoInfo.mdwn
diff options
context:
space:
mode:
authorJoey Hess2015-01-25 14:45:14 -0400
committerJoey Hess2015-01-25 14:47:57 -0400
commite9d5d9aff1cc2046149d3e5dcd9f4ef0f2a334a1 (patch)
tree24b5bc62ac3851c317023d79080eb0ed8176cdba /doc/todo/RevertableProperty_with_NoInfo.mdwn
parent334abae31277b9f47b85813d7b2fd783e5b3b12d (diff)
remove toSimpleProp
It didn't do what I thought it did with a RevertableProperty; it always returned Nothing because even if the input properties to <!> are NoInfo, it casts them to HasInfo. Even if it had worked, it lost type safety. Better to export the Property NoInfo that is used in a RevertableProperty, so it can be used directly.
Diffstat (limited to 'doc/todo/RevertableProperty_with_NoInfo.mdwn')
-rw-r--r--doc/todo/RevertableProperty_with_NoInfo.mdwn18
1 files changed, 18 insertions, 0 deletions
diff --git a/doc/todo/RevertableProperty_with_NoInfo.mdwn b/doc/todo/RevertableProperty_with_NoInfo.mdwn
new file mode 100644
index 00000000..3b4a61a9
--- /dev/null
+++ b/doc/todo/RevertableProperty_with_NoInfo.mdwn
@@ -0,0 +1,18 @@
+Currently, a RevertableProperty's Properties always both HasInfo. This
+means that if a Property NoInfo is updated to be a RevertableProperty, and
+someplace called ensureProperty on it, that will refuse to compile.
+
+The workaround is generally to export the original NoInfo property under
+a different name, so it can still be used with ensureProperty.
+
+This could be fixed:
+
+ data RevertableProperty i1 i2 where
+ RProp :: Property i1 -> Property i2 -> RevertableProperty i1 i2
+
+However, needing to write "RevertableProperty HasInfo NoInfo" is quite
+a mouthful!
+
+Since only 2 places in the propellor source code currently need to deal
+with this, it doesn't currently seem worth making the change, unless a less
+intrusive way can be found.