Name -is:module
Gets the type constructor including the module
Gets the unqualified type constructor: drop *.*.*... before name
Computation
getProgName returns the name of the program as it
was invoked.
However, this is hard-to-impossible to implement on some non-Unix
OSes, so instead, for maximum portability, we just return the leafname
of the program as invoked. Even then there are some differences
between platforms: on Windows, for example, a program invoked as foo
is probably really
FOO.EXE, and that is what
getProgName will return.
The Haskell implementation with which the program was compiled or is
being interpreted.
An abstract name for an object, that supports equality and hashing.
Stable names have the following property:
- If sn1 :: StableName and sn2 :: StableName and
sn1 == sn2 then sn1 and sn2 were created by
calls to makeStableName on the same object.
The reverse is not necessarily true: if two stable names are not
equal, then the objects they name may still be equal. Note in
particular that
makeStableName may return a different
StableName after an object is evaluated.
Stable Names are similar to Stable Pointers
(
Foreign.StablePtr), but differ in the following ways:
- There is no freeStableName operation, unlike
Foreign.StablePtrs. Stable names are reclaimed by the runtime
system when they are no longer needed.
- There is no deRefStableName operation. You can't get back
from a stable name to the original Haskell object. The reason for this
is that the existence of a stable name for an object does not
guarantee the existence of the object itself; it can still be garbage
collected.
Equality on
StableName that does not require that the types of
the arguments match.
Convert a
StableName to an
Int. The
Int returned
is not necessarily unique; several
StableNames may map to the
same
Int (in practice however, the chances of this are small,
so the result of
hashStableName makes a good hash key).
The name of the constructor
The name of the datatype (unqualified)
The fully-qualified name of the module where the type is declared
The package name of the module where the type is declared