cryptol/tests/modsys
Iavor Diatchki 34b1d87df3 Implementation of nested modules.
* Limitations:
    Does not work in combination parameterized modules, as I am
    about to redo how that works.

  * General refeactorings:
    * Namespaces:
      - We have an explicit type for namespaces, see `Cryptol.Util.Ident`
      - Display environments should now be aware of the namespace of the
        name being displayed.

    * Renamer:
      - Factor out the renamer monad and error type into separate modules
      - All name resultion is done through a single function `resolveName`
      - The renamer now computes the dependencies between declarations,
         orders things in dependency order, and checks for bad recursion.

    * Typechecker: Redo checking of declarations (both top-level and local).
      Previously we used a sort of CPS to add things in scope.   Now we use
      a state monad and add things to the state.  We assume that the renamer
      has been run, which means that declarations are ordered in dependency
      order, and things have unique name, so we don't need to worry about
      scoping too much.

  * Change specific to nested modules:
    - We have a new namespace for module names
    - The interface file of a module contains the interfaces for nested modules
    - Most of the changes related to nested modules in the renamer are
      in `ModuleSystem.NamingEnv` and `ModuleSystem.Rename`
        - There is some trickiness when resolving module names when importing
          submodules (seed `processOpen` and `openLoop`)
    - There are some changes to the representation of modules in the typechecked
      syntax, in particular:
        - During type-checking we "flatten" nested module declarations into
          a single big declaration.  Hopefully, this means that passes after
          the type checker don't need to worry about nested modules
        - There is a new field containing the interfaces of the nested modules,
          this is needed so that when we import the module we know we have the
          nested structure
        - Declarations in functor/parameterzied modules do not appear in the
          flattened list of declarations.  Instead thouse modules are collected
          in a separate field, and the plan is that they would be used from
          there when we implmenet functor instantiation.
2021-03-12 09:55:56 -08:00
..
nested Implementation of nested modules. 2021-03-12 09:55:56 -08:00
T1 Refactor module system things; better loading of `A modules. 2017-10-23 15:12:12 -07:00
T2 Add some tests. 2017-10-18 14:33:41 -07:00
T3 Add some tests. 2017-10-18 14:33:41 -07:00
T4 Add some tests. 2017-10-18 14:33:41 -07:00
T5 Add some tests. 2017-10-18 14:33:41 -07:00
T6 Add some tests. 2017-10-18 14:33:41 -07:00
T7 Add some tests. 2017-10-18 14:33:41 -07:00
T8 Add some tests. 2017-10-24 14:04:41 -07:00
T9 Use a record for all module parameters at the value level. Also improve PP 2017-10-25 16:39:29 -07:00
T10 Add some tests. 2017-10-24 14:04:41 -07:00
T11 Add another test. 2017-11-28 14:26:12 -08:00
T12 Add a test 2017-12-01 09:51:43 -08:00
T13 Rename type synonyms properly. 2017-12-01 10:29:42 -08:00
T14 Enforce that includes are UTF8 2020-06-09 09:02:22 -07:00
T1.icry Add some tests. 2017-10-18 14:33:41 -07:00
T1.icry.stdout Make :m work the same way as :l 2020-07-07 15:34:03 -07:00
T2.icry Add some tests. 2017-10-18 14:33:41 -07:00
T2.icry.stdout Make :m work the same way as :l 2020-07-07 15:34:03 -07:00
T3.icry Add some tests. 2017-10-18 14:33:41 -07:00
T3.icry.stdout Make :m work the same way as :l 2020-07-07 15:34:03 -07:00
T4.icry Add some tests. 2017-10-18 14:33:41 -07:00
T4.icry.stdout Make :m work the same way as :l 2020-07-07 15:34:03 -07:00
T5.icry Add some tests. 2017-10-18 14:33:41 -07:00
T5.icry.stdout Make :m work the same way as :l 2020-07-07 15:34:03 -07:00
T6.icry Add some tests. 2017-10-18 14:33:41 -07:00
T6.icry.stdout Make :m work the same way as :l 2020-07-07 15:34:03 -07:00
T7.icry Add some tests. 2017-10-18 14:33:41 -07:00
T7.icry.stdout Make :m work the same way as :l 2020-07-07 15:34:03 -07:00
T8.icry Add some tests. 2017-10-24 14:04:41 -07:00
T8.icry.stdout Make :m work the same way as :l 2020-07-07 15:34:03 -07:00
T9.icry Fix test. 2019-01-25 10:20:40 -08:00
T9.icry.stdout Make :m work the same way as :l 2020-07-07 15:34:03 -07:00
T10.icry Add some tests. 2017-10-24 14:04:41 -07:00
T10.icry.stdout Make :m work the same way as :l 2020-07-07 15:34:03 -07:00
T11.icry Add another test. 2017-11-28 14:26:12 -08:00
T11.icry.stdout Make :m work the same way as :l 2020-07-07 15:34:03 -07:00
T12.icry Add a test 2017-12-01 09:51:43 -08:00
T12.icry.stdout Make :m work the same way as :l 2020-07-07 15:34:03 -07:00
T13.icry Rename type synonyms properly. 2017-12-01 10:29:42 -08:00
T13.icry.stdout Make :m work the same way as :l 2020-07-07 15:34:03 -07:00
T14.icry Enforce that includes are UTF8 2020-06-09 09:02:22 -07:00
T14.icry.stdout Enforce that includes are UTF8 2020-06-09 09:02:22 -07:00