Skip to content

Commit e01483c

Browse files
committed
Parse mac operating system as osx or darwin, #123.
1 parent 030d161 commit e01483c

File tree

1 file changed

+9
-2
lines changed

1 file changed

+9
-2
lines changed

stack2nix/Main.hs

Lines changed: 9 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -39,9 +39,16 @@ args = Args
3939
-- | Copied from cabal2nix/src/Cabal2nix.hs
4040
platformReader :: P.ReadP r Platform
4141
platformReader = do
42-
arch <- P.choice [P.string "i686" >> return I386, P.string "x86_64" >> return X86_64]
42+
arch <- P.choice
43+
[ P.string "i686" >> return I386
44+
, P.string "x86_64" >> return X86_64
45+
]
4346
_ <- P.char '-'
44-
os <- P.choice [P.string "linux" >> return Linux, P.string "darwin" >> return OSX]
47+
os <- P.choice
48+
[ P.string "linux" >> return Linux
49+
, P.string "osx" >> return OSX
50+
, P.string "darwin" >> return OSX
51+
]
4552
return (Platform arch os)
4653

4754
readP :: P.ReadP a a -> ReadM a

0 commit comments

Comments
 (0)