-
Notifications
You must be signed in to change notification settings - Fork 0
/
Collation.purs
59 lines (52 loc) · 1.06 KB
/
Collation.purs
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
-- *** DO NOT EDIT! ***
-- This module is generated by ./script/generate-options.sh
module JS.Intl.Options.Collation
( Collation(..)
, fromString
, toString
) where
import Prelude
import Data.Maybe (Maybe(..))
data Collation
= Default
| Compat
| Dict
| Emoji
| Eor
| Phonebk
| Phonetic
| Pinyin
| Searchji
| Stroke
| Trad
| Zhuyin
derive instance Eq Collation
toString :: Collation -> String
toString = case _ of
Default -> "default"
Compat -> "compat"
Dict -> "dict"
Emoji -> "emoji"
Eor -> "eor"
Phonebk -> "phonebk"
Phonetic -> "phonetic"
Pinyin -> "pinyin"
Searchji -> "searchji"
Stroke -> "stroke"
Trad -> "trad"
Zhuyin -> "zhuyin"
fromString :: String -> Maybe Collation
fromString = case _ of
"default" -> Just Default
"compat" -> Just Compat
"dict" -> Just Dict
"emoji" -> Just Emoji
"eor" -> Just Eor
"phonebk" -> Just Phonebk
"phonetic" -> Just Phonetic
"pinyin" -> Just Pinyin
"searchji" -> Just Searchji
"stroke" -> Just Stroke
"trad" -> Just Trad
"zhuyin" -> Just Zhuyin
_ -> Nothing