Skip to content
This repository was archived by the owner on Aug 17, 2022. It is now read-only.
This repository was archived by the owner on Aug 17, 2022. It is now read-only.

Should we allow inline export syntax for modules and instances? #48

@Pyrolistical

Description

@Pyrolistical

As its not possible to define func in adapter modules, it it illegal to write (func (export "exp")). However since we are allowed to define modules and instances, the inline export syntax would make sense. But should we allow it?

Allowed

(adapter module
  (module $M
    (func)
  )
  (export "exp" (module $M))
)
(adapter module
  (module $M)
  (instance $i
    (instantiate $M)
  )
  (export "exp" (instance $i))
)

Should we allow?

(adapter module
  (module $M (export "exp")
    (func)
  )
)
(adapter module
  (module $M)
  (instance $i (export "exp")
    (instantiate $M)
  )
)

I vote no, as it this breaks the design constraint of not requiring special processing of core modules and this would break that. And simply for consistency, we don't allow this for instances either, as it would be the strange odd one out.

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