News for hackers. Stuff that matters.
Re:Vmap in Haskell by fmakunbound on Friday January 31, 2020 @11:49AM (#22203118)
> We're going to need a few language extensions, so let's get this out of the way first: {-# LANGUAGE RankNTypes, GADTs, MultiParamTypeClasses, KindSignatures, TypeApplications, FunctionalDependencies, FlexibleContexts, FlexibleInstances, UndecidableInstances, IncoherentInstances #-}

Dang, how do you know to use that?

Re:Vmap in Haskell by lalaithion on Friday January 31, 2020 @11:52AM (#22203146)
There's a bunch here that are sort of "We need X so we also must enable Y and Z". For instance, FunctionalDependencies requires MultiParamTypeClasses and IncoherentInstances requires UndecideableInstances and FlexibleInstances.
Re:Vmap in Haskell by kryptiskt on Friday January 31, 2020 @12:16PM (#22203402)
Quite often the error messages will tell you what extension to enable to use that construct.
Re:Vmap in Haskell by whateveracct on Friday January 31, 2020 @01:13PM (#22203924)
The same way you know to import a library? It's just importable language features, mostly in existence to not force trade-offs or backwards incompatibility on everyone willy nilly.

I thought it was weird when I moved from Scala to Haskell but now I am unimpeded by it thanks to practice.

Re:Vmap in Haskell by hopia on Friday January 31, 2020 @12:53PM (#22203746)
This feels absurd indeed. Like half of the GHC extensions introduce only some trivial syntactical convenience whereas the other half each introduce practically a whole new language.

This list aligns more with the latter description.

Re:Vmap in Haskell by tome on Friday January 31, 2020 @01:15PM (#22203935)
All of those extensions match the description of "things one thought that Haskell should have been able to do anyway" (some more tenuously than others, granted).
Re:Vmap in Haskell by dllthomas on Friday January 31, 2020 @03:19PM (#22205216)
IncoherentInstances?
Re:Vmap in Haskell by gowld on Friday January 31, 2020 @01:55PM (#22204407)
I wish C++ features had that level of transparency and control.
Re:Vmap in Haskell by choeger on Friday January 31, 2020 @12:53PM (#22203750)
This is Haskell's equivalent of node.js' dependency hell.
Re:Vmap in Haskell by mcbuilder on Friday January 31, 2020 @01:13PM (#22203927)
Hardly, Cabal Hell is the Haskell equivalent. You can enable all these extensions module wide by putting them in your project file. This is more a case of having to learn a plethora of advanced Haskell extensions, and when to use them.
Re:Vmap in Haskell by whateveracct on Friday January 31, 2020 @01:15PM (#22203942)
And cabal is vastly improved nowadays anyways. I'm not familiar with npm, but does it have anything like cabal's Nix-style builds?
Re:Vmap in Haskell by gowld on Friday January 31, 2020 @01:53PM (#22204389)
No, it's equivalent to python's "from __future__ import foo"
Re:Vmap in Haskell by skainswoo on Friday January 31, 2020 @04:03AM (#22200175)
vmap is by far my favorite feature in JAX. Very cool to see that you can get the same thing straight out of haskell.