packages feed

language-avro 0.1.1.0 → 0.1.2.0

raw patch · 3 files changed

+13/−2 lines, 3 filesPVP ok

version bump matches the API change (PVP)

API changes (from Hackage documentation)

Files

language-avro.cabal view
@@ -1,5 +1,5 @@ name:                language-avro-version:             0.1.1.0+version:             0.1.2.0 synopsis:            Language definition and parser for AVRO files. description:         Parser for the AVRO language specification, see README.md for more details. homepage:            https://github.com/kutyel/avro-parser-haskell#readme
src/Language/Avro/Parser.hs view
@@ -201,8 +201,11 @@   Null <$ (reserved "null" <|> reserved "void")     <|> Boolean <$ reserved "boolean"     <|> Int' <$ reserved "int"+    <|> Int (Just Date) <$ reserved "date"+    <|> Int (Just TimeMillis) <$ reserved "time_ms"     <|> Long' <$ reserved "long"     <|> Long . Just . DecimalL <$> parseDecimal+    <|> Long (Just TimestampMillis) <$ reserved "timestamp_ms"     <|> Float <$ reserved "float"     <|> Double <$ reserved "double"     <|> Bytes' <$ reserved "bytes"
test/Spec.hs view
@@ -46,6 +46,7 @@       "record Person {",       "string name;",       "int age;",+      "date birthday;",       "}"     ] @@ -111,6 +112,12 @@     it "should parse decimal" $ do       parse parseDecimal "" "decimal(4)" `shouldParse` Decimal 4 0       parse parseDecimal "" "decimal(15,2)" `shouldParse` Decimal 15 2+    it "should parse date" $+      parse parseSchema "" "date" `shouldParse` Int (Just Date)+    it "should parse time" $+      parse parseSchema "" "time_ms" `shouldParse` Int (Just TimeMillis)+    it "should parse timestamp" $+      parse parseSchema "" "timestamp_ms" `shouldParse` Long (Just TimestampMillis)     it "should parse bytes" $       parse parseSchema "" "bytes" `shouldParse` Bytes'     it "should parse string" $@@ -154,7 +161,8 @@           Nothing -- docs are ignored for now...           Nothing -- order is ignored for now...           [ Field "name" [] Nothing Nothing String' Nothing,-            Field "age" [] Nothing Nothing Int' Nothing+            Field "age" [] Nothing Nothing Int' Nothing,+            Field "birthday" [] Nothing Nothing (Int (Just Date)) Nothing           ]     it "should parse complex records" $       parse parseSchema "" complexRecord