From 6e09ae96c03ebc589ae9bb647e30de19fbe2f2e7 Mon Sep 17 00:00:00 2001 From: Joey Hess Date: Wed, 27 Apr 2016 16:09:18 -0400 Subject: layout --- doc/todo/type_level_port_conflict_detection.mdwn | 46 ++++++++++++------------ 1 file changed, 23 insertions(+), 23 deletions(-) (limited to 'doc') diff --git a/doc/todo/type_level_port_conflict_detection.mdwn b/doc/todo/type_level_port_conflict_detection.mdwn index 8aa8d026..09d22a02 100644 --- a/doc/todo/type_level_port_conflict_detection.mdwn +++ b/doc/todo/type_level_port_conflict_detection.mdwn @@ -64,26 +64,26 @@ 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! -> > > -> > > Well then, let's require a parameter. -> > > -> > > virtualHost :: Domain -> WebRoot -> Resource port -> RevertableProperty DebianLike DebianLike -> > > -> > > Make `Resource` only able to be constructed by `using`, -> > > so the user must say: -> > > -> > > & virtualHost "example.com" "/var/www" `using` (port :: UsingPort 80) -> > > -> > > So the type of `using` would be something like: -> > > -> > > using :: (Resource r -> Property proptype) -> r -> Property (r + proptype) -> > > -> > > (Complicated some as it needs to also support RevertableProperty.) -> > > -> > > --[[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! +> > +> > Well then, let's require a parameter. +> > +> > virtualHost :: Domain -> WebRoot -> Resource port -> RevertableProperty DebianLike DebianLike +> > +> > Make `Resource` only able to be constructed by `using`, +> > so the user must say: +> > +> > & virtualHost "example.com" "/var/www" `using` (port :: UsingPort 80) +> > +> > So the type of `using` would be something like: +> > +> > using :: (Resource r -> Property proptype) -> r -> Property (r + proptype) +> > +> > (Complicated some as it needs to also support RevertableProperty.) +> > +> > --[[Joey]] -- cgit v1.2.3