This is a proposal for a syntax sugar for module imports that I think would fix most (all?) of the pain points in importing modules as well as potentially enable a decent solution to purescript#2437. Pain Points Module names are very long. Modules are imported as unqualified by default. At the moment it wouldn’t make sense to qualify modules by default because of the point above - module names are too long, they need to be explicitly shortened anyway if you plan on using them in a qualified se...
mind the use of dot - compared to Rust, it may be good idea to differentiate between naming modules and their contents, otherwise we would allow for new, ambiguous situations to arise
I wanted to be able to make nix packages with purescript so I made this tool. It’s a simple CLI that generates a nix expression that can easily be imported into a flake.nix/default.nix to create your nix package. It’s written in purescript and packaged using itself. Enjoy 🙂 (I was not aware of spago2nix before I made this. I assume it can be used to accomplish the same thing, but I have no experience with it.)
thoughts? https://discourse.purescript.org/t/module-import-syntax-sugar-proposal/1761
Someone mentioned Rust below the comment - and taking inspiration from Rust could be one way of doing this:
mind the use of dot - compared to Rust, it may be good idea to differentiate between naming modules and their contents, otherwise we would allow for new, ambiguous situations to arise
Once we have such sugar, it may be tempting to allow using it in nested way - either with nested
from
or something likeor possibly
https://discourse.purescript.org/t/enjoy-point-free-style-check-out-this-new-package/1777
https://discourse.purescript.org/t/purescript-nix-packager/1940