Rust learned a lot from Haskell, and now offers programmers something new that is nonetheless informed by other languages. So now I’m wondering, what can Haskell learn from Rust?
Conversation
Is it possible to fix? I would totally buy in to a Haskell2020 that offered `value.method` syntax with the required restriction on the composition operator. But I don’t have the sense the broader community would.
2
4
I think backpack is too much ceremony to be widely embraced as a fundamental part of using the language.
3
9
I'm not sure a module system that exists outside of the language itself will ever been nearly as usable as something integrated into the language (even if it's still not first-class).
1
2
What are you wanting to do with multiple "units" per file? IIUC, Idris calls this explicit namespaces
idris2.readthedocs.io/en/latest/tuto
I hardly ever use them but have a vague memory of finding it helpful in Coq and/or Agda.
1
2
This doesn’t really seem like what I think is being asked for – this is more a way of letting you disambiguate overloaded names? I think Deech might want the ability to define nested modules, like in Agda (even if they are not parameterised, or lack signatures).
Eg. In Rust you can define submodules without having to make a new file. It’s pretty handy! I’m pretty sure I saw a semi-recent proposal to add this to GHC… perhaps by Richard Eisenberg?
1
1
Ahh, found it: github.com/ghc-proposals/
2




