Skip to content

Commit d0ceff8

Browse files
committed
oops
1 parent 74fce99 commit d0ceff8

File tree

1 file changed

+9
-8
lines changed

1 file changed

+9
-8
lines changed

src/Node/Platform.purs

Lines changed: 9 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -30,14 +30,15 @@ toString Android = "android"
3030
-- | Attempt to parse a `Platform` value from a string, in the format returned
3131
-- | by Node.js' `process.platform`.
3232
fromString :: String -> Maybe Platform
33-
fromString "aix" = AIX
34-
fromString "darwin" = Darwin
35-
fromString "freebsd" = FreeBSD
36-
fromString "linux" = Linux
37-
fromString "openbsd" = OpenBSD
38-
fromString "sunos" = SunOS
39-
fromString "win32" = Win32
40-
fromString "android" = Android
33+
fromString "aix" = Just AIX
34+
fromString "darwin" = Just Darwin
35+
fromString "freebsd" = Just FreeBSD
36+
fromString "linux" = Just Linux
37+
fromString "openbsd" = Just OpenBSD
38+
fromString "sunos" = Just SunOS
39+
fromString "win32" = Just Win32
40+
fromString "android" = Just Android
41+
fromString _ = Nothing
4142

4243
instance showPlatform :: Show Platform where
4344
show AIX = "AIX"

0 commit comments

Comments
 (0)