-
Notifications
You must be signed in to change notification settings - Fork 4
2016 002 Addition of COMPILER_META module
Author: Matt Rice
Managing editor: Some Editor
Last revised: September 6, 2016
Status: proposed
Discussion: issue #18
signature COMPILER_META
structure CompilerMeta :> COMPILER_META
[Provide Smackage a means to query basis implementation]
This module provides a means for writing a portable program which smackage to write a portable program which ensures its provides/requires mechanism extends beyond whole libraries and covers modules as well
type module_info = {
name : string option,
optional : bool,
module_group : string,
standard : string,
implemented : bool
}
val compilerName : string
val compilerVersion : string
val basisModules : module_info list
-
type module
Is a record containing information about the modules that come with the compiler, their name, and the group they belong to; e.g., Posix, Unix. If a module'sname
isNONE
and the module group is implemented all modules in the group must be implemented. -
compilerName
Contains the compiler name in a vendor specific format. -
compilerVersion
Contains the compiler version in a vendor specific -
basisModules
A list containing module information as implemented by the compiler.
Modules that the compiler implements are not limited to the modules defined by the basis.
Definers of modules should specify their unique string that exists in the definedBy
field
Possible alternatives are requiring a smackage file rather than generating one from a portable program. I could not tell if smackage could handle libraries such as the basis which define optional modules. Extending it is perhaps necessary.
Adding this module will not affect existing code.
Operating systems such as Genode, have had success by defining an OS API Implementing that API on Posix platforms, even though the eventual target platform is very different. This allows developers of applications to target an API, run it on POSIX, or a subset of POSIX.
Such emerging standards are caught in a catch-22, this attempts to allow such emerging standards a route to success where upon defining an API compiler vendors can choose to implement it and application vendors can query for availability.
At the same time dealing with the existing problem of querying implementation status of optional components within the basis.
- [2016-09-6] Proposed