Implemented an &imports: option to load: to clarify the prelude's use of import:from:.
[cslatevm.git] / src / mobius / prelude.slate
blobe17b28ff4ed0f72f24a4281248dc1523754694b3
1 "This file exists so that the build-up of the full standard image may be
2 customized without requiring a full bootstrap. This is loaded by post-bootstrap
3 code which is compiled in to the kernel image."
5 here load: 'src/mobius/map.slate'.
7 #(numerics load: _) `er for: {
8   'src/lib/fraction.slate'.
9   'src/lib/complex.slate'.
12 numerics load: 'src/lib/numericMixin.slate' &imports: {Mixins -> #Mixins}.
14 #(collections load: _) `er for: {
15   'src/lib/linkedlist.slate'. "Collection ExtensibleSequence"
16   'src/lib/cord.slate'. "Sequence"
17   'src/lib/sortedSet.slate'.
20 collections load: 'src/lib/traversal.slate' &imports:
21   {streams -> #ReadStream. prototypes -> #Root}. "Collection Sequence IdentitySet Stack"
23 prototypes load: 'src/lib/lookup.slate'.
25 _@prototypes lobby [here].
26 _@prototypes Syntax [Syntax].
27 prototypes import: #nodes from: here.
28 prototypes load: 'src/lib/path.slate' &imports:
29   {streams -> #ReadStream. collections -> #TraversalStream}. "lobby IdentitySet"
30 prototypes load: 'src/lib/tokenizer.slate'.
32 collections load: 'src/lib/subsequence.slate' &imports:
33   {streams -> #WriteStream. Mixins -> #PrettyPrinterMixin. prototypes -> #Root}.
34 #(collections load: _) `er for: {
35   'src/lib/bag.slate'. "ExtensibleCollection Dictionary Collection PrettyPrinterMixin"
36   'src/lib/queue.slate'. "ArrayBacked Sequence"
38 collections load: 'src/lib/repetition.slate' &imports:
39   {Mixins -> #PrettyPrinterMixin. prototypes -> #Root}.
40 mappings load: 'src/lib/mapping-epilogue.slate' &imports: {collections -> #Set}.
41 collections load: 'src/lib/ringbuffer.slate'. "Queue"
42 streams load: 'src/lib/buffer.slate' &imports:
43   {collections -> {#RingBuffer. #Sequence}}. "Stream BufferStream WriteStream ReadStream"
44 _@collections Nil [Nil].
45 collections load: 'src/lib/multi-dimensional.slate' &imports:
46   {mappings -> #Mapping.
47    streams -> {#ReadStream. #WriteStream. #PositionableStream}.
48    numerics -> #Integer.
49    prototypes -> {#Method. #Boolean}.
50 }. "also Range"
52 Syntax load: 'src/lib/precedence.slate' &imports: {collections -> #Stack}.
54 #(here load: _) `er for: {
55 'src/lib/inspect.slate'.
56 'src/lib/directory.slate'.
57 'src/lib/time.slate'.
58 'src/lib/concurrency.slate'.
59 'src/lib/observer.slate'.
60 'src/lib/method.slate'.
61 'src/mobius/role.slate'.
62 'src/lib/image.slate'.
63 'src/lib/method-query.slate'.
64 'src/mobius/memory.slate'.
65 'src/mobius/disassemble.slate'.
66 'src/mobius/primitive-method.slate'.
67 'src/mobius/types.slate'.
68 'src/lib/repl.slate'.
71 prototypes load: 'src/lib/extlib.slate' &imports: {Types -> #C}.
72 prototypes load: 'src/lib/devsupport.slate'.
74 prototypes load: 'src/lib/platform.slate' &imports: {globals -> #Image}.
76 "Totally optional, makes for pretty source output and enables C code output."
77 load: 'src/syntax/writer.slate'.
79 "Loads AutoLoader definitions from the standard file database."
80 load: 'src/lib/module.slate'.
81 AutoLoader readStorage.
83 "Print the greeting banner and start a REPL - or whatever else you want."
84 inform: 'Hi, there!'.
85 inform: 'Please save your image now, (eg. "Image saveNamed: \'slate.image\'.") to avoid repeating this initialization.'.
87 "Define the REPL as the primary setup for this image. This is called by the
88 bootstrap method."
89 _@lobby start [REPL start].