| > Servant isn't the "simplest" way to get BasicAuth: you get what you pay for. But that's not what I complained about ;) It's funny how in a separate thread someone insists that I have to understand the whole concept of a monad, its three laws, read Wadler's paper etc. In his thread however, it boils down to: oh, just memorise these lines of code, and just blindly copy-paste them wherever. So, my complaint is: to actually understand what's going in the "simplest way to do BasicAuth" I need a whole lot more than just look at the code. I need to understand why I need no less than ten (!) language extensions before I even begin to implement BasicAuth. And five of them just to workaround some Haskell limitation based on some report from 1998 (I'm guessing)? What happens when I move on to OAuth? What will I need then? Also, "oh, you don't really need PhDs in type theory to use Servant" slowly descends to "oh, here are two things regarding types that you'll have to learn". On of them has no useable documentation except some comment on StackOverflow. The other one requires you to be well-versed in type theory. Hence my complaint about "you need a PhD in type theory to work with Haskell". |
The simplest way to do BasicAuth in Haskell isn't Servant. I feel like you're intentionally misinterpreting what I'm saying.
As for resources, here's a great intro to type-level Haskell:
http://www.parsonsmatt.org/2017/04/26/basic_type_level_progr...
> For some reason, functions that operate on types are called type families.
That's the kind of thing you need to know.
I doubt the average JS user knows how V8 optimizes execution of code, or whatever. That's what your insistent complaints about type theory amounts to: none of the articles I'm linking to mention inference rules or type judgments or what-have-you. That's what all the research papers about Haskell are for, which you do not need to read to use this language. Even advanced Haskellers don't do type theory (category theory, maybe, not type theory). Only a couple of people working on the compiler do.
More DataKinds:
https://stackoverflow.com/questions/20558648/what-is-the-dat...
http://ponies.io/posts/2014-07-30-typelits.html
https://www.schoolofhaskell.com/user/k_bx/playing-with-datak...