gfngfn / SATySFi

A statically-typed, functional typesetting system
GNU Lesser General Public License v3.0
1.16k stars 83 forks source link

Feature request: module open #79

Closed nekketsuuu closed 5 years ago

nekketsuuu commented 6 years ago

I want to introduce a new primitive to open a module.

For example, you can open a module in OCaml:

module M = struct let f () = 42 end
open M
(* We can use `f` here, instead of `M.f` *)

Unlike OCaml, SATySFi does not create a module per a file (at least now). So the necessity of open is less for SATySFi, but we sometimes need this (e.g., when using a signature to hide implementation).

nekketsuuu commented 5 years ago

It seems that this feature was implemented around this commit https://github.com/gfngfn/SATySFi/commit/85361ce0c98bec6de4c5d4dc5ba1c2fa2775bae8. Many thanks to gfn-san!