Merge pull request #8 from bergey/bool

accept false in nixBool
This commit is contained in:
John Wiegley 2014-07-20 02:13:51 -05:00
commit 755f39d3c6

View file

@ -70,7 +70,9 @@ nixInt :: Parser NExpr
nixInt = mkInt <$> decimal <?> "integer"
nixBool :: Parser NExpr
nixBool = try (mkBool . (== "true") <$> string "true") <?> "bool"
nixBool = try (true <|> false) <?> "bool" where
true = mkBool . (== "true") <$> string "true"
false =mkBool . (== "false") <$> string "false"
nixNull :: Parser NExpr
nixNull = try (mkNull <$ string "null") <?> "null"