@@ -18,36 +18,36 @@ data Platform
18
18
19
19
-- | The String representation for a platform, recognised by Node.js.
20
20
toString :: Platform -> String
21
- toString AIX = " aix"
22
- toString Darwin = " darwin"
21
+ toString AIX = " aix"
22
+ toString Darwin = " darwin"
23
23
toString FreeBSD = " freebsd"
24
- toString Linux = " linux"
24
+ toString Linux = " linux"
25
25
toString OpenBSD = " openbsd"
26
- toString SunOS = " sunos"
27
- toString Win32 = " win32"
26
+ toString SunOS = " sunos"
27
+ toString Win32 = " win32"
28
28
toString Android = " android"
29
29
30
30
-- | Attempt to parse a `Platform` value from a string, in the format returned
31
31
-- | by Node.js' `process.platform`.
32
32
fromString :: String -> Maybe Platform
33
- fromString " aix" = Just AIX
34
- fromString " darwin" = Just Darwin
33
+ fromString " aix" = Just AIX
34
+ fromString " darwin" = Just Darwin
35
35
fromString " freebsd" = Just FreeBSD
36
- fromString " linux" = Just Linux
36
+ fromString " linux" = Just Linux
37
37
fromString " openbsd" = Just OpenBSD
38
- fromString " sunos" = Just SunOS
39
- fromString " win32" = Just Win32
38
+ fromString " sunos" = Just SunOS
39
+ fromString " win32" = Just Win32
40
40
fromString " android" = Just Android
41
- fromString _ = Nothing
41
+ fromString _ = Nothing
42
42
43
43
instance showPlatform :: Show Platform where
44
- show AIX = " AIX"
45
- show Darwin = " Darwin"
44
+ show AIX = " AIX"
45
+ show Darwin = " Darwin"
46
46
show FreeBSD = " FreeBSD"
47
- show Linux = " Linux"
47
+ show Linux = " Linux"
48
48
show OpenBSD = " OpenBSD"
49
- show SunOS = " SunOS"
50
- show Win32 = " Win32"
49
+ show SunOS = " SunOS"
50
+ show Win32 = " Win32"
51
51
show Android = " Android"
52
52
53
53
derive instance eqPlatform :: Eq Platform
0 commit comments