I apologize for this question, but this most basic thing just is not working for me in the REPL. I am attempting to use the ‘id’ function from Control.Category, or if you prefer, the ‘id’ function from Data.Function, which claims to be an export also from Prelude, also imported into the REPL. Every time:
Unknown value id
You are looking at an old version of Prelude docs. It was renamed to identity with the 4.0 release of Prelude to free up id, since it’s a common identifier with real-world code.
In general, this has been a problem with literally everything I’ve touched in PureScript: Outdated docs, outdated projects, outdated build tools, abandoned projects that it’s unclear if anyone should be trying to use them or if it’s just going to cause problems. I don’t know what happened, as I’m new to PureScript, but it’s been tough getting started when all of these effects are combined.
I understand. Maybe there shouldn’t be a way to link directly to the older versions of the docs. That’s pretty much exactly what happened that caused my confusion. I really did try to read the docs before I posted this question. If you clicked through the link and didn’t check the drop-down (that was at the top of the page, out of sight), there wasn’t any notice that you were looking at old docs.
The problem isn’t so much that the docs are out-of-date. The problem is that the docs you are initially told to use to learn PureScript are out-of-date. Moreover, they don’t tell you tips like removing the library version from the Pursuit link or things like that. I experienced the same problem and that’s why I wrote my learning repo here: https://github.com/jordanmartinez/purescript-jordans-reference.
There are various reasons for why the docs aren’t fully up-to-date yet, but we’re not going to play the blame game or explain history. Rather, the good news is that these official docs are being updated. @milesfrain has been doing some great work! And even in that process, the community as a whole tries to respond quickly to questions (and frustrations) that new learners have while we deal with this issue.
I would be up for adding some kind of warning banner but I think it shouldn’t be too obtrusive - as I say, people often have good reasons for reading older versions of docs, because in lots of cases it doesn’t make sense to always be right up on the bleeding edge of everything. I quite like how Rust does it, eg https://docs.rs/nom/5.1.1/nom/.
I would prefer to address that by using fixed positioning for the header. That has additional benefits: e.g. easy access to the search bar regardless of how far you have scrolled down.
I think the fixed position header is better, especially to avoid banner blindness too.
I have no idea if it’s possible to fix, but I have mostly experienced finding old docs when I google something and the first result is almost never the latest version. Try googling “Data.Functor purescript” and the top result is the oldest version of the docs available.