elm-export 0.5.1.0 → 0.6.0.0
raw patch · 5 files changed
+11/−10 lines, 5 filesdep ~elm-exportPVP ok
version bump matches the API change (PVP)
Dependency ranges changed: elm-export
API changes (from Hackage documentation)
Files
- elm-export.cabal +3/−3
- src/Elm/Decoder.hs +2/−1
- test/CommentDecoder.elm +2/−2
- test/CommentDecoderWithOptions.elm +2/−2
- test/ExportSpec.hs +2/−2
elm-export.cabal view
@@ -1,10 +1,10 @@ name: elm-export-version: 0.5.1.0+version: 0.6.0.0 cabal-version: >=1.10 build-type: Simple license: OtherLicense license-file: LICENSE.txt-copyright: 2015-2016 Kris Jenkins+copyright: 2015-2017 Kris Jenkins maintainer: kris.jenkins@clearercode.com stability: alpha homepage: http://github.com/krisajenkins/elm-export@@ -54,7 +54,7 @@ base >=4.8.2.0, bytestring >=0.10.6.0, containers >=0.5.6.2,- elm-export >=0.5.1.0,+ elm-export >=0.6.0.0, hspec >=2.2.4, hspec-core >=2.2.4, quickcheck-instances >=0.3.12,
src/Elm/Decoder.hs view
@@ -70,7 +70,8 @@ renderRef (ETuple2 x y) = do dx <- renderRef x dy <- renderRef y- return . parens $ "tuple2 (,)" <+> dx <+> dy+ return . parens $+ "map2 (,)" <+> parens ("index 0" <+> dx) <+> parens ("index 1" <+> dy) renderRef EUnit = pure $ parens "succeed ()" renderRef EDate = pure "decodeDate" renderRef EInt = pure "int"
test/CommentDecoder.elm view
@@ -12,7 +12,7 @@ decode Comment |> required "postId" int |> required "text" string- |> required "mainCategories" (tuple2 (,) string string)+ |> required "mainCategories" (map2 (,) (index 0 string) (index 1 string)) |> required "published" bool |> required "created" decodeDate- |> required "tags" (map Dict.fromList (list (tuple2 (,) string int)))+ |> required "tags" (map Dict.fromList (list (map2 (,) (index 0 string) (index 1 int))))
test/CommentDecoderWithOptions.elm view
@@ -12,7 +12,7 @@ decode Comment |> required "commentPostId" int |> required "commentText" string- |> required "commentMainCategories" (tuple2 (,) string string)+ |> required "commentMainCategories" (map2 (,) (index 0 string) (index 1 string)) |> required "commentPublished" bool |> required "commentCreated" decodeDate- |> required "commentTags" (map Dict.fromList (list (tuple2 (,) string int)))+ |> required "commentTags" (map Dict.fromList (list (map2 (,) (index 0 string) (index 1 int))))
test/ExportSpec.hs view
@@ -270,10 +270,10 @@ "(list (maybe string))" it "toElmDecoderRef (Map String (Maybe String))" $ toElmDecoderRef (Proxy :: Proxy (Map String (Maybe String))) `shouldBe`- "(map Dict.fromList (list (tuple2 (,) string (maybe string))))"+ "(map Dict.fromList (list (map2 (,) (index 0 string) (index 1 (maybe string)))))" it "toElmDecoderRef (IntMap (Maybe String))" $ toElmDecoderRef (Proxy :: Proxy (IntMap (Maybe String))) `shouldBe`- "(map Dict.fromList (list (tuple2 (,) int (maybe string))))"+ "(map Dict.fromList (list (map2 (,) (index 0 int) (index 1 (maybe string)))))" toElmEncoderSpec :: Hspec.Spec toElmEncoderSpec =