Skip to content

Multiple modules #489

Description

@brendanzab

It would be nice to support breaking up fathom files into multiple modules, especially as files like opentype.fathom get larger.

I’d imagine imports could go at the top of a file:

module opentype;

import fathom.{ u32be, ... etc ... };

import opentype.common.{ unknown_table, optional_table };
import opentype.tables;

And later:

            cvt <- optional_table "cvt " tables.cvt,
            fpgm <- optional_table "fpgm" unknown_table,

Imports should be qualified by default, and form a DAG.

Some questions:

  • what import syntax should we use?
  • how do we find new modules relative to an existing module?
  • how do we dump multiple modules for snapshot testing?
  • how doe we represent modules in the elaborator/evaluator(s)/etc.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions