summaryrefslogtreecommitdiff
path: root/doc/todo/type_level_OS_requirements
diff options
context:
space:
mode:
authorJoey Hess2016-03-19 14:48:37 -0400
committerJoey Hess2016-03-19 14:48:37 -0400
commit8ecaa473156a847c343b7356c5a7a146d7a73176 (patch)
tree87849c1d1cede6600c523ee5076609196a18cca7 /doc/todo/type_level_OS_requirements
parentc5282cc38c1891580fe1ecd751c2d8e4d841a291 (diff)
comment
Diffstat (limited to 'doc/todo/type_level_OS_requirements')
-rw-r--r--doc/todo/type_level_OS_requirements/comment_9_8d2153620518295f33b83f1506441fdd._comment23
1 files changed, 23 insertions, 0 deletions
diff --git a/doc/todo/type_level_OS_requirements/comment_9_8d2153620518295f33b83f1506441fdd._comment b/doc/todo/type_level_OS_requirements/comment_9_8d2153620518295f33b83f1506441fdd._comment
new file mode 100644
index 00000000..6f4128e2
--- /dev/null
+++ b/doc/todo/type_level_OS_requirements/comment_9_8d2153620518295f33b83f1506441fdd._comment
@@ -0,0 +1,23 @@
+[[!comment format=mdwn
+ username="joey"
+ subject="""comment 9"""
+ date="2016-03-19T18:35:20Z"
+ content="""
+I'm currently using a simple sum type to describe the target OS:
+
+ data OS = OSDebian | OSBuntish | OSFreeBSD
+
+This could in theory specify much more information about the
+OS version and architecture.
+Even type-level strings could be used to include release names.
+
+But, the old version of ghc being targeted doesn't have the nice
+Data.Type.Equality stuff; I had to implement my own clumsily
+and it would quickly hit a combinatorial explosion with more data.
+
+(There may be a better way than the way I found which works back to ghc 7.6.3.)
+
+Of course, we can always add more detail later. Since type aliases are
+used, `Propety Debian` which only specifies `OSDebian` now, could easily
+be changed at some point to specify `OSDebian AnyVersion AnyArch`.
+"""]]