Return type of Data.Map.keys

The documentation for the latest (3.5.0) Data.Map says that keys returns a List. However, the compiler seems to think it returns a Set. Moreover, clicking on the source link from the Pursuit documentation takes me to a repository called purescript-deprecated.

What’s going on here, and what’s the easiest way to get the keys of a map as a list?

many thanks
Roly

Data.Map is now part of purescript-ordered-collections as stated by the README of the repository you linked. Remove the dependency on purescript-maps and instead install purescript-ordered-collections. I think if you are using spago, maps should not even be in the package set. I highly recommend switching to spago (it’s easier than it seems!).

1 Like

Thanks. I am using spago, so it seems I was just looking at the wrong documentation. (I googled “PureScript Data.Map” – unfortunately the first search result is that deprecated package.)

Does Pursuit not support the notion of deprecation per se?

@rolyp Pursuit should now support deprecation, there’s an issue open for the library in question: https://github.com/purescript/pursuit/issues/400

Btw you can generate local documentation for your project with spago docs, you’ll get sort of a “project-local Pursuit” with search and everything.

2 Likes

Cool, thanks. And I didn’t know about spago docs, that sounds useful!