From 8ecaa473156a847c343b7356c5a7a146d7a73176 Mon Sep 17 00:00:00 2001 From: Joey Hess Date: Sat, 19 Mar 2016 14:48:37 -0400 Subject: comment --- ...ent_9_8d2153620518295f33b83f1506441fdd._comment | 23 ++++++++++++++++++++++ 1 file changed, 23 insertions(+) create mode 100644 doc/todo/type_level_OS_requirements/comment_9_8d2153620518295f33b83f1506441fdd._comment (limited to 'doc/todo/type_level_OS_requirements/comment_9_8d2153620518295f33b83f1506441fdd._comment') 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`. +"""]] -- cgit v1.2.3