I'have right now installed the ghci version 8.6.2 and following a tutorial I write:
toUpper "something"
but ghci compiler prints out:
Variable not in scope: toUpper :: [Char] -> t
Do I miss some libraries or anything else?
I'have right now installed the ghci version 8.6.2 and following a tutorial I write:
toUpper "something"
but ghci compiler prints out:
Variable not in scope: toUpper :: [Char] -> t
Do I miss some libraries or anything else?
Copyright © 2021 Jogjafile Inc.
The
toUpper :: Char -> Char
is not part of thePrelude
, and thus not imported "implicitly".You can import it with:
or just:
to import all functions, datatypes, etc. defined in that module.
Note that it has signature
Char -> Char
, so it only converts a single character to its uppercase equivalent.You thus need to perform a
map
ping: