Someone who knows #Haskell and ML: is there a writeup somewhere explaining how first-class modules (a la ML) can do similar things to Haskell type classes? I'm finding it hard to figure that out.
To give a more concrete case: suppose I wanted to write something like Control.Applicative, which provides an 'interface' Applicative with some methods, as well as functions that work for any Applicative. How would I do this with ML-style first-class modules?
@koz I would like to see such a comparison post too. In the meantime I found this stackoverflow question which contains a way to do it using an ML functor: https://stackoverflow.com/questions/48989663/monads-and-sml-modules. The obvious downside is that you have to explicitly state which monad to use at some point.
Another lesser known difference is that I believe you can't instantiate an ML signature with a polymorphic type. For example you can't write an instance of that MAPPABLE signature for a type like Map k v. At least not such that it is still polymorphic over the key type k.
Wouter and Joachim interview Arseny Seroka, CEO of Serokell. Arseny got into Haskell because of a bet over Pizza, fell for it because it means fewer steps between his soul and his work, and founded Serokell because he could not get a Haskell job. He speaks about the business side of a Haskell company, about the need for more...
Issue 420 :: Haskell Weekly newsletter (haskellweekly.news)
News about the Haskell programming language from 2024-05-16.
Type Theory Forall Podcast: David Christiansen (www.typetheoryforall.com)
In this episode we talk with David Christiansen, he wrote the books Functional Programming in Lean and the Little Typer....
Issue 422 :: Haskell Weekly newsletter (haskellweekly.news)
News about the Haskell programming language from 2024-05-30.
Haskell Interlude Podcast 49: Arseniy Seroka (haskell.foundation)
Wouter and Joachim interview Arseny Seroka, CEO of Serokell. Arseny got into Haskell because of a bet over Pizza, fell for it because it means fewer steps between his soul and his work, and founded Serokell because he could not get a Haskell job. He speaks about the business side of a Haskell company, about the need for more...
Issue 421 :: Haskell Weekly newsletter (haskellweekly.news)