For a symbol interpreted function f, returns a sequence (n,i,c,j,d,k,e) describing the location of the definition in the source code:
i1 : locate needs o1 = (/usr/share/Macaulay2/Core/Core.m2, 116, 17, 118, 47, 116, 20) o1 : Sequence |
i2 : code needs o2 = /usr/share/Macaulay2/Core/Core.m2:116:18-118:48: --source code: needs = filename -> if not filesLoaded#?filename then load filename else ( (filepath, filetime) := filesLoaded#filename; if filetime < fileTime filepath then load filepath) |
If f is a sequence, then lookup is applied first, and the location of the resulting function is provided.
i3 : locate(resolution, Module) o3 = (/usr/share/Macaulay2/Core/res.m2, 279, 42, 306, 64, 279, 47) o3 : Sequence |
In particular, the output of methods can be used as an input to locate.
i4 : locate methods resolution o4 = {0 => (/usr/share/Macaulay2/Core/res.m2, 308, 41, 310, 51, 308, 46) } {1 => (/usr/share/Macaulay2/Core/res.m2, 312, 45, 313, 67, 312, 50) } {2 => (/usr/share/Macaulay2/Core/res.m2, 279, 42, 306, 64, 279, 47) } {3 => (/usr/share/Macaulay2/Core/monideal.m2, 175, 49, 175, 74, 175, 54)} o4 : NumberedVerticalList |
i5 : methods doc o5 = {0 => (doc, String)} o5 : NumberedVerticalList |
i6 : locate 0 o6 = (/usr/share/Macaulay2/SimpleDoc.m2, 35, 18, 43, 13, ------------------------------------------------------------------------ 36, 56) o6 : Sequence |
The object locate is a method function with a single argument.