-
Notifications
You must be signed in to change notification settings - Fork 4
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Discussion for proposal 2016-2 #18
Comments
I think that such a mechanism is part of the build system (e.g., CM or MLB). In SML/NJ's CM tool, we have some support for conditional compilation (you can even test if a given module is defined), but MLB is lacking such a mechanism. [EDIT] I see now that you are asking for a smackage hook. |
There are a few places where this proposal could use some clarification:
|
Sorry about closing the issue; that was a click on the wrong button. |
While I think that a standard mechanism to support packaging and portability of code across implementations is a good idea, it is not obvious to me that such a mechanism should be embedded in the Basis Library. Taking that approach has a few of disadvantages:
I think that a better approach would probably be to standardize on some packaging tool, like smackage. |
Thanks for the comments John, I will try and edit the proposal, and work on a prototype,
That the record should be taken as reflecting upon the entire module_group. It was intended to provide a simplified single record in the case that you implement every module specified by the module_group, you could just provide one record covering the entire module group.
If the optional field is false, and the implemented field is false, this would reflect non-conformance or partial conformance, (some portion of the module group is implemented, but this portion is not)
Ahh, sorry I believe this was superseeded by the 'standard' field but got left in the proposal.
Entirely agree, this was more of an RFC, to spur discussion on how we can make module/library level packaging better, taking into account that some libraries, like the Basis, and smlnj-lib, are usually/sometimes provided by the compiler. And whether any of it belongs in the basis (E.g. should the basis provide the signature for the record, and relegate the value portions, to a basis-meta library, and smlnj-lib-meta library? Or does the entire thing belong outside of the basis.
The main thought was that, while they need to compile/run bits in SML, the module query program could be written once... I suppose you are recommending doing that, but using an external file format that basis libraries could provide, rather than SML records?
Will work on it.
Indeed, its a bit tricky, since e.g. MLB I know, has multiple versions of the basis to choose from as well. |
Thanks for the info. Here are a are more questions: Presumably for the module-group mechanism to be useful, there would have to be an agreed specification of what modules belong in a given group? Likewise, for a partially implemented group, is it correct that records for all modules in the group would have to be provided (even if some would have the SML/NJ also supports multiple versions of the Basis Library as of a couple of releases ago. Perhaps there should also be a "version" field in the records? CM supports a library versioning mechanism (although it hasn't been put to much use). If you stick with this API, you should change the |
I also have comments about the general problem. The design should be driven by an understanding of what kind of mechanisms are needed by a tool, such as smackage, to aid distribution. Providing one or two small example scenarios would help a lot. Without such motivating examples, I don't think that the resulting design will be useful. Based on my own experience of writing autoconf tests for MLton and SML/NJ, I suspect that what we really need is a mechanism to query (perhaps from the command line) whether a given library or module is available, and, perhaps what version is available. It would also be nice to be able to query properties of the implementation, such as the size of the default integer type. The main difficulty with these kinds of tests right now is that they are implementation dependent hacks. For example, here is how I determine if MLton is 32 or 64-bits in a
This test only works for MLton and might break if the internals are changed. |
Sorry, I kind of closed the wrong bug report (#20), but I don't think that one can really make any progress until this one is hammered out. Like i said there, I see this overlapping to some extent with Matthias Blume's "Portable library descriptions for standard ML", e.g. If the basis library comes with a companion library which implements the Portable library description, and Compilers/distributors of Basis implementations generate a library description from their implementation of basis, A tool could then be written to compare the two library implementations for differences. What you bring up, The desire for e.g. size of the default integer type, I'm unsure if that as-is would currently handle constant symbols, or if it would need some modification. |
It'd be nice to define the ways we query external standards and basis defined optional modules
The text was updated successfully, but these errors were encountered: