'a' is a Char, a single character.

['a','b','c'] is a string, a list-of-Char. This list can also be written as "abc", using double quotes. Its type can be written as String or [Char].

["abc", "de"] is a list of strings. Its type can be written as [String] or [[Char]] (list-of-lists-of-Char).

We could go on, and say that [["abc","de"], ["ef", "abc"]] is a [[String]] (list-of-lists-of-strings) or [[[Char]]].

Your revStr takes as input not a single string, but a list of strings, hence the [[Char]] type. Its output is again a list of strings.

Answer from chi on Stack Overflow
🌐
Hackage
hackage.haskell.org › package › base › docs › Data-Char.html
Data.Char - Hackage - Haskell
Read a string representation of a character, using Haskell source-language escape conventions, and convert it to the character that it encodes.
🌐
Hackage
hackage.haskell.org › package › haskell98 › docs › Char.html
Char - Hackage - Haskell
The character type Char is an enumeration whose values represent Unicode (or equivalently ISO/IEC 10646) characters (see http://www.unicode.org/ for details). This set extends the ISO 8859-1 (Latin-1) character set (the first 256 characters), which is itself an extension of the ASCII character ...
Discussions

What is the difference between [[Char]] and [Char] in Haskell? - Stack Overflow
If all you want to do is reverse a single string, the type would be [Char] -> [Char]. This function reverses each string in a list of strings. More on stackoverflow.com
🌐 stackoverflow.com
If a string is a list of characters, then why doesn't this work?
I think the type of “ERIC” is [Char] and the type of ["E","R","I","C"] is [[Char]]. On the other hand, the type of [‘E’, ‘R’, ‘I’, ‘C’] is [Char]. This is because Haskell uses double quotes to indicate String literals and single quotes to indicate Char literals. More on reddit.com
🌐 r/haskell
13
2
November 12, 2021
get first char of a String
Instead of having a fervent safety debate (already thoroughly covered)... this might help you. Prelude> take 1 "hello" "h" Prelude> take 1 "" "" Prelude> head "hello" 'h' Prelude> head "" *** Exception: Prelude.head: empty list More on reddit.com
🌐 r/haskell
21
0
October 18, 2012
plutus pioneer program - Is type String truly equal to type [Char], and is Haskell truly "pure"? - Cardano Stack Exchange
One fundamental of Haskell is that a string is really a list of characters. More on cardano.stackexchange.com
🌐 cardano.stackexchange.com
February 13, 2022
🌐
Haskell
haskell.org › hugs › pages › libraries › base › Data-Char.html
Data.Char
The character type Char is an enumeration whose values represent Unicode (or equivalently ISO/IEC 10646) characters (see http://www.unicode.org/ for details). This set extends the ISO 8859-1 (Latin-1) character set (the first 256 charachers), which is itself an extension of the ASCII character ...
🌐
Haskell
downloads.haskell.org › ~ghc › 6.0 › docs › html › base › Data.Char.html
Data.Char
The character type Char is an enumeration whose values represent Unicode characters. A character literal in Haskell has type Char · To convert a Char to or from an Int, use toEnum and fromEnum from the Enum class respectively (equivalently ord and chr also do the trick)
🌐
Reddit
reddit.com › r/haskell › if a string is a list of characters, then why doesn't this work?
r/haskell on Reddit: If a string is a list of characters, then why doesn't this work?
November 12, 2021 -

All the code is here (https://github.com/djotaku/adventofcode/blob/800175cb4e0a69cb8d15e88d0727a07e7108fd8d/2016/Day_02/Haskell/solution.hs) if you need to understand what's in findNextNumber, but basically, I have this function:

findNumberRow number directionList = foldl findNextNumber number directionList

If I feed it:

findNumberRow 4  ["R", "L"]

I get the right answer. But if I feed it:

findNumberRow 4  "RL"

I get:

error: 

   • Couldn't match type ‘Char’ with ‘[Char]’      Expected type: [[Char]]        Actual type: [Char]    • In the second argument of ‘findNumberRow’, namely ‘"RL"’      In the expression: findNumberRow 4 "RL"      In an equation for ‘it’: it = findNumberRow 4 "RL"

Why? I thought "ERIC" was equal to ["E","R","I","C"] in Haskell.

🌐
W3cubDocs
docs.w3cub.com › haskell~7 › libraries › base-4.8.2.0 › data-char
Data.Char - Haskell 7 - W3cubDocs
The character type Char is an enumeration whose values represent Unicode (or equivalently ISO/IEC 10646) characters (see http://www.unicode.org/ for details). This set extends the ISO 8859-1 (Latin-1) character set (the first 256 characters), which is itself an extension of the ASCII character ...
🌐
Uni-freiburg
www2.informatik.uni-freiburg.de › ~thiemann › haskell › haskell98-library-html › char.html
The Haskell 98 Library Report: Character Utilities
The function showLitChar converts a character to a string using only printable characters, using Haskell source-language escape conventions. The function lexLitChar does the reverse, returning the sequence of characters that encode the character. The function readLitChar does the same, but in addition converts the to the character that it encodes.
Find elsewhere
🌐
Hackage
hackage.haskell.org › package › base-4.3.1.0 › docs › Data-Char.html
Data.Char - Hackage - Haskell.org
The character type Char is an enumeration whose values represent Unicode (or equivalently ISO/IEC 10646) characters (see http://www.unicode.org/ for details). This set extends the ISO 8859-1 (Latin-1) character set (the first 256 charachers), which is itself an extension of the ASCII character ...
🌐
Hackage
hackage.haskell.org › package › haskell2020 › docs › Data-Char.html
Data.Char
The character type Char is an enumeration whose values represent Unicode (or equivalently ISO/IEC 10646) code points (i.e. characters, see http://www.unicode.org/ for details). This set extends the ISO 8859-1 (Latin-1) character set (the first 256 characters), which is itself an extension of ...
🌐
Dal University
web.cs.dal.ca › ~nzeh › Teaching › 3137 › haskell › first_steps › basic_types › strings
Characters and Strings - CSCI 3137: Haskell Programming
The character type in Haskell is Char. Whereas in C and C++, characters are 8-bit characters, representing the extended ASCII character set, Haskell's characters are unicode characters, as in most modern programming languages.
🌐
Real World Haskell
book.realworldhaskell.org › read › characters-strings-and-escaping-rules.html
Appendix B. Characters, strings, and escaping rules
Haskell's escaping rules follow the pattern established by the C programming language, but expand considerably upon them. A single character is surrounded by ASCII single quotes, ', and has type Char.
🌐
Haskell
hackage-content.haskell.org › package › base-4.22.0.0 › docs › Data-Char.html
Data.Char
Read a string representation of a character, using Haskell source-language escape conventions, and convert it to the character that it encodes.
🌐
Hackage
hackage.haskell.org › package › base-4.7.0.1 › docs › Data-Char.html
Data.Char - Hackage
The character type Char is an enumeration whose values represent Unicode (or equivalently ISO/IEC 10646) characters (see http://www.unicode.org/ for details). This set extends the ISO 8859-1 (Latin-1) character set (the first 256 characters), which is itself an extension of the ASCII character ...
🌐
Hackage
hackage.haskell.org › package › ascii-char
ascii-char: A Char type representing an ASCII character
January 5, 2023 - This package defines a Char type that has 128 constructors, one for each ASCII character.
🌐
TutorialsPoint
tutorialspoint.com › haskell-program-to-convert-character-to-string
Haskell Program to Convert Character to String
March 28, 2023 - In Haskell, we can convert Character to String by using user-defined function, show function, list comprehension and (:[]) notation. In the first example, we are going to use (charToString c = [c]) function and in the second example, we are going to use (charToString c = show c) function.