I think the only thing that needs to be done is to come up with a clever type class that does some flipping for you, based on the arguments. It’s not entirely trivial but might work. #haskell
@Jose_A_Alonso Hmm, interesting. To me, the benchmarks especially so. If it was only for normalisation, it's pretty clear that NbE is and always will be the winner. But if I understand correctly, NbE has limits; for example it would not be so simple to implement a transformation pass like GHC's Simplifier using NbE, where you apply peephole optimisations such as case-of-case, inlining etc. to the program while traversing it. I wonder if @AndrasKovacs has tried NbE for such a pass?
Removing the reexports from mtl was, while I really like it conceptually, quite the breaking change, apparently it had become a habit in my team to just import Control.Monad.Except to get access to Control.Monad and Control.Monad.IO.Class… On that note: why’s there no Control.Monad.IO, why do I have to type .Class all the time.
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.
@koz Not quite your case, but “The next 500 module systems” paper gives a nice overview of the problem, bridging modules, type classes and records (and scopes!).
One of the great #lua modules provided by LuaX is F.
F is inspired by some #haskell modules (List and Map) and implements functional programming functions to deal with Lua tables.
I recently came across https://simplex.chat. I really liked it just by reading how it works. But I took a look at the source code today, and I was like: “Oh coool it's in #haskell. Oh, daaaamn they're using #nix quite heavily. I love it. 😍 “
I like programming sounds with #pd, #maxmsp and hardware synths, DAW's, etc. But tools don't matter in the end as you probably know, aesthetics do -- and reverb algorithms. Do you know any?
I spent too much time with #linux and #haskell. I reaaaally don't like commercial ads. After all, is the internet post-modern?
My favorite emoticon is the smiling face with tear.