Index: doc/proposals/modules.md
===================================================================
--- doc/proposals/modules.md	(revision 0bda8d707434c296565beb1edaff2d377450550c)
+++ doc/proposals/modules.md	(revision eaeba796aa6e1310797b8fc4f35f88d8d4a941a1)
@@ -192,2 +192,195 @@
 At the linker level, an extra step is necessary to perform a transitive closure across module dependences, i.e., build a "using" graph to know what order to run the module constructors.
 For example, the heap has to be initialized before any other code that uses it.
+
+=============================================================================
+
+From: Andrew James Beach <ajbeach@uwaterloo.ca>
+To: Peter Buhr <pabuhr@uwaterloo.ca>
+Subject: Re: A Module Proposal
+Date: Fri, 31 May 2024 20:32:49 +0000
+
+Ada uses several constructs for what you described:
+
+First the includes are handled by:
+with MODULE_NAME;
+
+(There is a separate "use" command that handles the name spacing part.)
+
+In the header file (.ads) you declare:
+package NAME is BODY end NAME;
+(NAME is the possibly qualified name of this module, BODY all the contents of the module. Which I think is everything except the with/use commands and whatever comments you would like.)
+
+In the source file (.adb) you declare:
+package body NAME is BODY end NAME;
+(Same rules on NAME and BODY.)
+
+Of course I say same rules for BODY, but obviously it isn't quite the same. You have something like the declaration / definition divide C uses about what goes where. You do seem to have to repeat some information as well.
+
+Anyways, I did some double checks, but mostly this is just me rattling off what I remember from earlier investigation of Ada.
+
+Andrew
+________________________________
+From: Peter A. Buhr <pabuhr@uwaterloo.ca>
+Sent: May 31, 2024 4:13 PM
+To: Andrew James Beach <ajbeach@uwaterloo.ca>
+Subject: Re: A Module Proposal
+
+    For the section on "file-links can be embedded in data creating a tree", I
+    don't know what that means.
+
+Think of a file system like a database, where a table can have data and links to
+other tables. For a program you might have.
+
+    for ( link to shared expression ) { link to shared for body }
+
+In smalltalk, I believe they have this kind of structure.
+
+    class X {
+        link to some code in another file
+        code code code
+        link to some code in another file
+    }
+
+    Then we two ways you can use modules in a language: Visibility and
+    initialization. I did say a few things about the first, but nothing on the
+    second.
+
+Agreed.
+
+    Is there any interaction between modules and local information hiding? None seem to be called out.
+
+It was just an outline. I need to look at Ada packets to get more details.
+
+    Now you have an example where you declare a module syntax:
+    What section of code does this wrap? Does this go in a header, a source file?
+    Is the module also a namespace?
+    Does the using clause actually trigger #include? How does it interact with #include directives?
+    Looking at the constructor: is the module a (real) type? If so what properties does it have?
+
+Let's see what Ada does with packages. It has to be VERY similar to what CFA
+needs.
+
+    How does this effect organization across translation units? You say it would
+    put Mike's work into one translation unit, how does it do that and what is
+    the gain there?
+
+module link-lists {
+    link-list stuff
+}
+module arrays {
+    array stuff
+}
+module strings {
+    string stuff
+}
+
+It is possible to import arrays and not other modules, so the compiler
+selectively reads the above translation unit for the modules it is looking for
+and does not have to parse modules it does not need. The code is nicely grouped
+and named.
+
+    "At the linker level", does this mean we also have to rewrite/wrap the compiler?
+
+The linker has a whole language that allows you to write complex instructions on
+what it is suppose to. I don't know how powerful the link language is.
+
+  https://ftp.gnu.org/old-gnu/Manuals/ld-2.9.1/html_chapter/ld_3.html
+
+
+
+From: Andrew James Beach <ajbeach@uwaterloo.ca>
+To: Peter Buhr <pabuhr@uwaterloo.ca>
+Subject: Re: A Module Proposal
+Date: Sun, 2 Jun 2024 19:53:56 +0000
+
+OK, down the list:
+
+> Why does CFA have include files? Why don't we use the Smalltalk for modules?
+
+It feels like the IDE is just the surface level of something else. After all, some people already develop Cforall embedded in an IDE (I think, it looks like that is what they are doing when they screen share). Maybe I'm misreading the situation, but it feels like we are talking about the amount of non-code configuration and/or a compile-time vs. runtime divide.
+
+> Think of a file system like a database, where a table can have data and links to other tables. For a program you might have.
+
+Do you mean includes and other uses of file paths?
+
+> In smalltalk, I believe they have this kind of structure.
+
+What kind of Smalltalk are we talking about? (Old Smalltalk as OS or something like the relatively modern GNU Smalltalk?)
+
+> Let's see what Ada does with packages. It has to be VERY similar to what CFA needs.
+
+I will not go over the whole thing again but Ada seems to have for constructs for this:
+with NAME; imports a qualified module.
+use NAME; can be used to rename a bunch of qualified names.
+package NAME is BODY end NAME; declares a module (package) interface.
+package body NAME is BODY end NAME; provides the implementation for the above.
+
+> It is possible to import arrays and not other modules, so the compiler selectively reads the above translation unit for the modules it is looking for and does not have to parse modules it does not need. The code is nicely grouped and named.
+
+Can't we already do that by putting them in separate files? Also, how do we get away with parsing only part of a file?
+
+Andrew
+________________________________
+From: Andrew James Beach <ajbeach@uwaterloo.ca>
+Sent: May 31, 2024 2:57 PM
+To: Peter Buhr <pabuhr@uwaterloo.ca>
+Subject: A Module Proposal
+
+I am working of folding the two sections of the proposal and I have some questions.
+
+The paragraph on IDE passed languages. What is it for? C and Cforall are not that type of language and you never bring it up again as a comparison.
+
+For the section on "file-links can be embedded in data creating a tree", I don't know what that means. For bit I thought you meant includes, but you talk about those separately. Maybe module names using with import statements. Could you go into more detail?
+
+Then we two ways you can use modules in a language: Visibility and initialization. I did say a few things about the first, but nothing on the second.
+
+Is there any interaction between modules and local information hiding? None seem to be called out.
+
+Now you have an example where you declare a module syntax:
+What section of code does this wrap? Does this go in a header, a source file?
+Is the module also a namespace?
+Does the using clause actually trigger #include? How does it interact with #include directives?
+Looking at the constructor: is the module a (real) type? If so what properties does it have?
+
+How does this effect organization across translation units? You say it would put Mike's work into one translation unit, how does it do that and what is the gain there?
+
+"At the linker level", does this mean we also have to rewrite/wrap the compiler?
+
+
+
+From: Michael Leslie Brooks <mlbrooks@uwaterloo.ca>
+To: Peter Buhr <pabuhr@uwaterloo.ca>,
+        Andrew James Beach
+	<ajbeach@uwaterloo.ca>,
+        Fangren Yu <f37yu@uwaterloo.ca>, Jiada Liang
+	<j82liang@uwaterloo.ca>
+Subject: Modules
+Date: Wed, 26 Jun 2024 20:25:23 +0000
+
+I wrote down some of what was said during our call with Bryan today...
+
+Peter's modules' intro
+
+fine - like cpp public-private
+med - when bits of several sources mash into a translation unit
+coarse - the translation unit
+
+
+Bryan's remarks
+
+Often a library will have
+external headers - what others include
+internal headers - what all the library's units need to know
+
+A points to B B can never get outside the library opportunity for object
+inlining
+
+Problem with pimpl pattern is after you do it, the compiler can't see that this
+is what you're doing, it only sees it's a another plain old object.  If it
+could benefit from a pragma-pimpl, be assured that the impl part can't leak
+out, then it could inline the impl.
+
+For a Friday discussion group, the team would be interested in an improvement
+in what C++ can do.
+
+
