summaryrefslogtreecommitdiff
path: root/doc/todo/type_level_port_conflict_detection.mdwn
diff options
context:
space:
mode:
authorJoey Hess2016-04-27 15:52:56 -0400
committerJoey Hess2016-04-27 15:52:56 -0400
commitd1a442176259b6b8004b68450f28d72fccfa838f (patch)
tree4c659e3b9302ac46665f5ea9a3d5257952a78a92 /doc/todo/type_level_port_conflict_detection.mdwn
parenta31c8e3d5f7bb01db2364a36b64c322223f20ec6 (diff)
further thoughts
Diffstat (limited to 'doc/todo/type_level_port_conflict_detection.mdwn')
-rw-r--r--doc/todo/type_level_port_conflict_detection.mdwn24
1 files changed, 24 insertions, 0 deletions
diff --git a/doc/todo/type_level_port_conflict_detection.mdwn b/doc/todo/type_level_port_conflict_detection.mdwn
index 733e6e04..8209740e 100644
--- a/doc/todo/type_level_port_conflict_detection.mdwn
+++ b/doc/todo/type_level_port_conflict_detection.mdwn
@@ -64,3 +64,27 @@ but it is not yet integrated into the Property types. --[[Joey]]
> > construct port singletons.)
> >
> > --[[Joey]]
+
+> > > A further problem with this is that it's not clear from the
+> > > `virtualHost` type signature that it needs to have a port applied to
+> > > it to get a usable property. So in a way, by adding this advanced
+> > > type safety, we've lost the most fundamental type safety of all:
+> > > Functions must have the right parameters applied!
+> > >
+> > > So, it would perhaps be better to have
+> > >
+> > > virtualHost :: Domain -> WebRoot -> RevertableProperty (UsingPort 80 + DebianLike) DebianLike
+> > >
+> > > And then to make it use a different port, use `using`.
+> > >
+> > > This too has a problem; if the property is hard-coded to use port 80,
+> > > then `using` won't change it, and again the type signature doesn't
+> > > tell. Perhaps the thing to do is to indicate in the type when a port
+> > > can be changed:
+> > >
+> > > virtualHost :: Domain -> WebRoot -> RevertableProperty (Changable (UsingPort 80) + DebianLike) DebianLike
+> > >
+> > > And then `using` would need to only be able to be applied when it
+> > > changed a resource that is marked `Changable`.
+> > >
+> > > --[[Joey]]