The hash table LAYOUT is a translation table from symbolic names to directory paths, which are to interpreted relative to the path stored in prefixDirectory. Some of the entries are strings: these provide paths to various types of files associated with the main Macaulay 2 system. The remaining entries are functions. These provide paths to various types of files associated with packages, and accept a string containing the name of the package as argument. Finally, for convenience, many Macaulay 2 files are regarded as being associated with a special package called Core, and the corresponding documentation files are part of the package Macaulay2.
i1 : LAYOUT
o1 = HashTable{bin => bin/ }
cache => lib/Macaulay2/Core/cache/
data => share/
datam2 => share/Macaulay2/
doc => share/doc/
docm2 => share/doc/Macaulay2/
docm2rel => share/doc/Macaulay2/Core/
docpackages => share/doc/Macaulay2/
emacs => share/emacs/site-lisp/
emacsdoc => share/doc/Macaulay2/Core/emacs/
images => share/doc/Macaulay2/Core/images/
info => share/info/
lib => lib/
libm2 => lib/Macaulay2/Core/
libraries => lib/Macaulay2/Core/
m2 => share/Macaulay2/Core/m2/
man => share/man/
man1 => share/man/man1/
man3 => share/man/man3/
packagecache => {*Function[layout.m2:24:36-24:67]*}
packagedoc => {*Function[layout.m2:20:34-20:71]*}
packageexampleoutput => {*Function[layout.m2:25:44-25:81]*}
packagehtml => {*Function[layout.m2:23:35-23:72]*}
packageimages => {*Function[layout.m2:21:37-21:74]*}
packages => share/Macaulay2/
packagesrc => {*Function[layout.m2:19:34-19:67]*}
packagetests => {*Function[layout.m2:22:36-22:73]*}
share => share/Macaulay2/Core/
style => share/doc/Macaulay2/Core/style/
o1 : HashTable
|
Let's apply the functions above to the name of a fictional package named "FOO" to see what paths are returned.
i2 : applyValues (LAYOUT, f -> if instance(f,Function) then f "FOO" else f)
o2 = HashTable{bin => bin/ }
cache => lib/Macaulay2/Core/cache/
data => share/
datam2 => share/Macaulay2/
doc => share/doc/
docm2 => share/doc/Macaulay2/
docm2rel => share/doc/Macaulay2/Core/
docpackages => share/doc/Macaulay2/
emacs => share/emacs/site-lisp/
emacsdoc => share/doc/Macaulay2/Core/emacs/
images => share/doc/Macaulay2/Core/images/
info => share/info/
lib => lib/
libm2 => lib/Macaulay2/Core/
libraries => lib/Macaulay2/Core/
m2 => share/Macaulay2/Core/m2/
man => share/man/
man1 => share/man/man1/
man3 => share/man/man3/
packagecache => lib/Macaulay2/FOO/cache/
packagedoc => share/doc/Macaulay2/FOO/
packageexampleoutput => share/doc/Macaulay2/FOO/example-output/
packagehtml => share/doc/Macaulay2/FOO/html/
packageimages => share/doc/Macaulay2/FOO/images/
packages => share/Macaulay2/
packagesrc => share/Macaulay2/FOO/
packagetests => share/doc/Macaulay2/FOO/tests/
share => share/Macaulay2/Core/
style => share/doc/Macaulay2/Core/style/
o2 : HashTable
|
The object LAYOUT is a hash table.