summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--doc/forum/Formatting_struggle_with_Apt.backportSuite.mdwn9
-rw-r--r--doc/forum/Formatting_struggle_with_Apt.backportSuite/comment_1_9d4f41976824ef29381bbd2bbb3eaf39._comment27
-rw-r--r--doc/forum/Formatting_struggle_with_Apt.backportSuite/comment_2_e4d9c8315d20dae1f0fd38c2eea208cb._comment8
-rw-r--r--doc/todo/type_level_port_conflict_detection.mdwn35
4 files changed, 73 insertions, 6 deletions
diff --git a/doc/forum/Formatting_struggle_with_Apt.backportSuite.mdwn b/doc/forum/Formatting_struggle_with_Apt.backportSuite.mdwn
new file mode 100644
index 00000000..350f03c9
--- /dev/null
+++ b/doc/forum/Formatting_struggle_with_Apt.backportSuite.mdwn
@@ -0,0 +1,9 @@
+I have tried what seems like all permutations possible to make
+
+ & Apt.backportSuite "Stable "jessie""
+
+work (square brackets, normal brackets, escape, combinations of all that...) but no success so far.
+
+It seems there should go a string after backportSuite, which according to what I read should be double-quoted. However, the release also needs to be double-quoted.
+
+What is the right way of doing this?
diff --git a/doc/forum/Formatting_struggle_with_Apt.backportSuite/comment_1_9d4f41976824ef29381bbd2bbb3eaf39._comment b/doc/forum/Formatting_struggle_with_Apt.backportSuite/comment_1_9d4f41976824ef29381bbd2bbb3eaf39._comment
new file mode 100644
index 00000000..99dccf58
--- /dev/null
+++ b/doc/forum/Formatting_struggle_with_Apt.backportSuite/comment_1_9d4f41976824ef29381bbd2bbb3eaf39._comment
@@ -0,0 +1,27 @@
+[[!comment format=mdwn
+ username="joey"
+ subject="""comment 1"""
+ date="2016-04-26T15:02:03Z"
+ content="""
+Well, `backportSuite` takes a `DebianSuite` data type, and `Stable`
+is a constructor for it. So, you don't quote the data constructor,
+but only quote the release name string passed to it:
+
+ (Stable "jessie")
+
+But, `backportSuite` is not a property, so you can't add it to a host
+with `&` anyway.
+
+If you're trying to set up a sources.list that can install backports, the
+way to do it is:
+
+ & osDebian (Stable "jessie") "amd64"
+ & Apt.stdSourcesList
+
+The standard sources.list configuration includes backports when
+the `DebianSuite` part of the host's OS is a stable release.
+
+There's also a property to install packages from backports:
+
+ & Apt.installedBackport ["somepackage"]
+"""]]
diff --git a/doc/forum/Formatting_struggle_with_Apt.backportSuite/comment_2_e4d9c8315d20dae1f0fd38c2eea208cb._comment b/doc/forum/Formatting_struggle_with_Apt.backportSuite/comment_2_e4d9c8315d20dae1f0fd38c2eea208cb._comment
new file mode 100644
index 00000000..2159ef24
--- /dev/null
+++ b/doc/forum/Formatting_struggle_with_Apt.backportSuite/comment_2_e4d9c8315d20dae1f0fd38c2eea208cb._comment
@@ -0,0 +1,8 @@
+[[!comment format=mdwn
+ username="frederik@ffbea6a549cb3f460d110386c0f634c1ddc6a68a"
+ nickname="frederik"
+ subject="comment 2"
+ date="2016-04-27T12:21:58Z"
+ content="""
+Thanks!
+"""]]
diff --git a/doc/todo/type_level_port_conflict_detection.mdwn b/doc/todo/type_level_port_conflict_detection.mdwn
index 67f63e03..09d22a02 100644
--- a/doc/todo/type_level_port_conflict_detection.mdwn
+++ b/doc/todo/type_level_port_conflict_detection.mdwn
@@ -9,7 +9,7 @@ but it is not yet integrated into the Property types. --[[Joey]]
[[!tag user/joey]]
-> On `typed-os-requirements` branch, I have the UsingPort 80 singleton
+> On the `typed-os-requirements` branch, I have the UsingPort 80 singleton
> implemented. As soon as I tried to apply it to some apache properties
> though, I realized a problem -- If multiple apache vhosts are defined
> each as its own property, then each of those properties can't have
@@ -42,10 +42,10 @@ but it is not yet integrated into the Property types. --[[Joey]]
> > So, we'd start with a property definition that does not use any ports:
> >
> > virtualHost :: Domain -> WebRoot -> RevertableProperty DebianLike DebianLike
-> > virtualHost domain docroot =
-> > let self = property "vhost" (go (usedPorts (getMetaTypes self)))
-> > in self
-> > where
+> > virtualHost domain docroot =
+> > let self = property "vhost" (go (usedPorts (getMetaTypes self)))
+> > in self
+> > where
> > go [] = error "No ports specified"
> > go ports = ...
> >
@@ -58,9 +58,32 @@ but it is not yet integrated into the Property types. --[[Joey]]
> > Maybe make a `using` that changes the metatypes of a property,
> > adding a resource. That shortens what needs to be written some:
> >
-> > & virtualHost "example.com" "/var/www" `using` (port :: Port 80)
+> > & virtualHost "example.com" "/var/www" `using` (port :: UsingPort 80)
> >
> > (`port` here is just an alias for `sing`, possibly constrained to only
> > 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]]