I have a problem with ASCII in Haskell.
fromEnum :: Char -> Int toEnum :: Int -> Char offset :: Int offset = fromEnum \'A\' - fromEnum \'a\' toUpper ::
fromEnum and toEnum are standart functions
fromEnum
toEnum
please try this:
offset :: Int offset = fromEnum 'A' - fromEnum 'a' toUpper :: Char -> Char toUpper ch = toEnum (fromEnum ch + offset)