We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
2 parents 976d330 + 2a044ec commit 7f7bd7bCopy full SHA for 7f7bd7b
README.md
@@ -7,6 +7,15 @@
7
newtype Char
8
9
10
+### Type Class Instances
11
+
12
+ instance eqChar :: Eq Char
13
14
+ instance ordChar :: Ord Char
15
16
+ instance showChar :: Show Char
17
18
19
### Values
20
21
charString :: Char -> String
src/Data/Char/Char.purs
@@ -20,3 +20,13 @@ module Data.Char
\ return String.fromCharCode(c);\
\}" :: Number -> Char
22
23
+ instance eqChar :: Eq Char where
24
+ (==) (Char a) (Char b) = a == b
25
26
+ (/=) a b = not (a == b)
27
28
+ instance ordChar :: Ord Char where
29
+ compare (Char a) (Char b) = a `compare` b
30
31
+ instance showChar :: Show Char where
32
+ show (Char s) = "Char " ++ show s
0 commit comments