How are booleans in Gleam represented? #1026
Answered
by
lpil
CrowdHailer
asked this question in
Questions & support
-
There are typed expressions for other literals such as Int/Float. But as far as I can see not a similar expression for Booleans Lines 1420 to 1422 in 87f3bb0 How are Booleans represented? |
Beta Was this translation helpful? Give feedback.
Answered by
lpil
Apr 12, 2021
Replies: 1 comment 3 replies
-
Booleans are not a primitive type with a dedicated literal syntax, they're just a normal custom type but defined in the prelude. pub type Bool {
True
False
} |
Beta Was this translation helpful? Give feedback.
3 replies
Answer selected by
lpil
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Booleans are not a primitive type with a dedicated literal syntax, they're just a normal custom type but defined in the prelude.