Search code examples
exportexplicitfrege

Explicit module exports in Frege


I am posting this after reading the Frege language specification and looking for examples using search engines. I hope I have not overlooked an obvious answer.

I am trying to port some Haskell code to Frege and I cannot find any documentation mentioning explicit module exports. So, in my Haskell code I have something like

module common.Timer(start, ...)
where
...

but this will give a compiler error in Frege, and I have to remove the export list:

module common.Timer
where
...

But in this way I cannot control which symbols defined in the module get exported.

Is it possible to define explicit module exports in Frege? If so, what is the syntax?


Solution

  • Your code looks ok. Before I dive deeper in what is possibly wrong, here is a quick workaround such that you can proceed working: all top-level symbols are exported by default unless it is marked private.

    Edit after discussion: This is a current deviation from that Haskell standard that we are about to resolve.