| ... | ... | @@ -54,3 +54,21 @@ It is anoying that \<n\> must be a constant and \<type\> must be a builtin, but |
|
|
|
|
|
|
|
|
|
|
|
A possible extension would be to allow implementations to derive instances of Storable and allow types with such derived instances be used in foreign space declarations too.
|
|
|
|
|
|
|
|
|
|
|
|
another possibility is the definition of 'manifestly constant' data. which is defined as declarations of the form
|
|
|
|
|
|
|
|
```wiki
|
|
|
|
name :: built-in-type
|
|
|
|
name = <constant>
|
|
|
|
|
|
|
|
or sizeof a builtin
|
|
|
|
|
|
|
|
or 'foo <op> bar' where foo and bar are manifestly constant and op is a basic operation.
|
|
|
|
```
|
|
|
|
|
|
|
|
|
|
|
|
then allow such manifestly constant values for n and allow types whose sizeof is manifestly constant to be used in foreign space declarations.
|
|
|
|
|
|
|
|
|
|
|
|
however, this is probably a lot of work for a problem that has better workarounds unless other uses for manifestly constant data are found. |