[Haskell-beginners] Multiline code in GHCi
toad3k at gmail.com
Tue Aug 29 15:20:01 UTC 2017
The type of both True and False is Bool. Just like the type of 1 and
2 and 3 is Integer.
Bool and Integer are types. True, False, and 42 are all values.
On Tue, Aug 29, 2017 at 11:04 AM, Shishir Srivastava
<shishir.srivastava at gmail.com> wrote:
> Just revisiting haskell after a hiatus and to begin that with a rather
> uncalled for query -
> In the system type declaration for the data type Bool as below what are the
> types of the two values 'True' and 'False'
> data Bool = False | True
> Are the values 'String' ? In which case how's the Bool data type different
> from String enumerator data type ?
> Beginners mailing list
> Beginners at haskell.org
More information about the Beginners