ML-style module systems are lots of fun haha
Conversation
it’s super useful. i also like haskell’s approach where libraries can specify an interface and the application author just specifies a module that satisfies that interface. i’ve never used it but i think it would get me 95% of the way there
2
2
Are you referring to Backpack?
1
1
yeah
1
1
Ahh yeah I've not yet seen it used much in the wild, but it seemed neat? Apparently it was confined to cabal so folks using stack couldn't take advantage?
1
1
Trouble with retrofitting this stuff onto Haskell or Rust is that typeclasses and traits already take up so much room in the language already :(
1
1
2
yeah :( i love them but i’m starting to think traits were a mistake. unison opens up a possible approach actually that I think solves coherence. basically on disk typeclass records are passed explicitly, and when rendering the code you can pick an instance to pass implicitly
2
1
that strategy could work for modules too and give the best of both worlds i think
1
Replying to
Is this the idea to use abilities for type class stuff? Do you have any links to up to date stuff on this?
Replying to
no, this was a proposal from a couple years ago, I have no idea what they’re actually working on
1

