I have created a piece of code this:
intToDigit :: Char -> Int
ord :: Char -> Int
intToDigit c = ord c - ord 'a'
However, when I run it I get this error message:
ChangeVowels.hs:2:1:
The type signature for `ord’ lacks an accompanying bindingChangeVowels.hs:4:16: Not in scope: `ord’
ChangeVowels.hs:4:24: Not in scope: `ord’
I tried it with Import data.char but that doesnt work either.
You need to provide an implementation for the function
ord. Here, you have given a signature forord, but no implementation.Or you can use Haskell’s own
ordfunction, that isChar.ord.