-
Notifications
You must be signed in to change notification settings - Fork 7
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Clarificaiton on relation between Inigo namespaces and Idris module names #5
Comments
Actually, my main point of confusion is how module names work, which may be more of an issue with my understanding of Idris modules, because doing e.g. doesn't work:
However, it seems like "." is supported in module names in the docs: I think the issue is that the file |
It's a design choice that I'm happy to reconsider. The hope is that you could build a package like module JSON
public export
parse : String -> Maybe JSONDoc
parse =
-- ... as opposed to:
which I felt would feel like a strange experience from a user's perspective building packages. You publish a package to It was hard to convince Idris to properly namespace packages automatically, and I had a requirement that I didn't want to require changes to Idris core for this project (at its inception). Happy to rethink this strategy, but the current idea is: Namespaces = "Single Non-Dotted Word with a Capital Letter" = E.g. "Base" or "Thomas" Once packages are posted (via Inigo.toml) they are pushed and pulled via namespace, but act independently of that once used in your project. Again, happy to discuss if this is right. FWIW, we do a little weirdness where we compile packages separately to enforce isolation (and allow them to live in the |
Thanks for the clarification! I don't want to jump the gun, so with this description in mind I'll continue to use it as-is for now, and post back here once I've had a chance to use it more (or you can feel free to close this for now). Your intuition may well be right; I'm just more used to the "."-delimited namespaces, but that doesn't mean it is better. |
From the examples, it looks as though the namespaces (e.g. "Base") is part of a module name, but it seems like this might not be ideal, since my understanding is there is a single user to single namespace relation, but multiple users may wish to upload packages to e.g. "Data" or "Control.Monad" for instance. I don't think this is actually the case, but just wanted to check to be sure. So as an example, say you were running
inigo init
for a packageControl.Monad.X
- how would you complete theinigo init
command?The text was updated successfully, but these errors were encountered: