Unknown value abs

Hello dear community!

A really newbie question, but I can’t figure out why does this happen.

Reading the prelude docs, I’d expect that the abs function would be imported in the REPL whenever I import Prelude into it.

However, that’s not the case. Even more, greaterThan isn’t aswell imported, but min is (refering to Prelude’s Data.Ord). Whenever I try to use abs I get an Unknown value error. Ofc I can solve that by

Am I getting something wrong?

1 Like

Oh, nevermind, solved it.

Is just that I didn’t know how to read Pursuit docs :sweat_smile:

Should’ve seen this page to see what is actually imported from Prelude.

1 Like

I got tripped-up by this as well https://github.com/purescript/purescript-prelude/issues/222

1 Like

Yeah it’s quite strange, but there’s its own reasoning.

For no more surprises I may try this cute little pattern:

Hope that this helps some people


Since spacemacs’ Purescript support is so good, I tend to import everything explicitly. It also helps me remember the location of everything better.

In Spacemacs SPC-m-m-i-a will import the symbol currently under the cursor for you.


Yes. This is only an issue outside of IDEs (e.g. REPL and Try PureScript).

1 Like