diff options
| author | Joey Hess <joeyh@joeyh.name> | 2016-03-08 18:00:00 -0400 |
|---|---|---|
| committer | Joey Hess <joeyh@joeyh.name> | 2016-03-08 18:00:00 -0400 |
| commit | f7b095b855d4be32fb2591fa9c06292d300081eb (patch) | |
| tree | 77b22060eb8331748145057d5d520dd3aa3c3f53 /doc | |
| parent | ee0e6f1969b242e714fae55c750ff2a6897e10e3 (diff) | |
update
Diffstat (limited to 'doc')
| -rw-r--r-- | doc/todo/type_level_OS_requirements.mdwn | 7 | ||||
| -rw-r--r-- | doc/todo/type_level_OS_requirements/comment_5_35dbd3a2eb073f4c456ac567aec569bd._comment | 16 |
2 files changed, 18 insertions, 5 deletions
diff --git a/doc/todo/type_level_OS_requirements.mdwn b/doc/todo/type_level_OS_requirements.mdwn index 65e6099f..784f69fb 100644 --- a/doc/todo/type_level_OS_requirements.mdwn +++ b/doc/todo/type_level_OS_requirements.mdwn @@ -12,10 +12,7 @@ yields a `Property i '[Debian]` -- the intersection of the OS's supported by the combined properties. And, combining two properties that demand different OS's would need to be a -type error. Can a type level function combine two types successfully, and -fail to combine two others somehow? Don't know. Maybe combine to an -IncoherentOS and don't allow a `Property i IncoherentOS` to be used in a -Host? +type error. Another kind of property combination would be to glue two properties that support different OS's together, yielding a property that supports both, @@ -35,7 +32,7 @@ the OS of the Host is indeterminite. Which would be fixed by using the `os` property to specify. On the other hand, if a Host's list of properties yields a single OS -(or perhaps no OS requirement), the type needs to be just `Host`. +the type needs to be just `Host`. After all, propellor operates on a `[Host]`; if we had `Host OS`, the list couldn't contain host's with different OS's. diff --git a/doc/todo/type_level_OS_requirements/comment_5_35dbd3a2eb073f4c456ac567aec569bd._comment b/doc/todo/type_level_OS_requirements/comment_5_35dbd3a2eb073f4c456ac567aec569bd._comment new file mode 100644 index 00000000..e95a88c8 --- /dev/null +++ b/doc/todo/type_level_OS_requirements/comment_5_35dbd3a2eb073f4c456ac567aec569bd._comment @@ -0,0 +1,16 @@ +[[!comment format=mdwn + username="joey" + subject="""comment 5""" + date="2016-03-08T21:56:26Z" + content=""" +I got it to throw a nice type error when intersection of two OS lists +yields an empty list: + + Couldn't match type ‘'CannotCombineOS’ with ‘'CanCombineOS’ + Expected type: 'CanCombineOS + Actual type: CannotCombineOS '['OSDebian] '['OSFreeBSD] '[] + In the expression: intersectSupportedOS debian freeBSD + +I think the next step would be actually adding the OSList to Property +and making combining properties combine their OS lists at the type level. +"""]] |
