简体   繁体   中英

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?

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.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM