agrafix / elm-bridge

Haskell: Derive Elm types from Haskell types
BSD 3-Clause "New" or "Revised" License
100 stars 27 forks source link

Updating tests for Elm 0.19. #38

Closed tmbull closed 6 years ago

tmbull commented 6 years ago

This fixes #37.

I ran the tests and also compiled all of the generated Elm code (including the module generated by EndToEnd.hs), and verified that it all compiles on 0.19. The only issue I ran into was with phantom types, but I believe that was a pre-existing issue (see #35).

Let me know if there's anything you would like me to change.

bartavelle commented 6 years ago

I did the release. There is still the #35 issue that is important, and that I will have to address in the future.

saurabhnanda commented 5 years ago

@tmbull @bartavelle does this PR handle the changes around name shadowing? I tried 0.5.0 and alst master, but it's generating the following elm snippet, which fails compilation, due to name shadowing:

FSDateRangeSubmission v1 -> ("FSDateRangeSubmission", encodeValue ((\(v1,v2) -> Json.Encode.list identity [(jsonEncLocalTime) 
v1,(jsonEncLocalTime) v2]) v1))

The corresponding Haskell type was:

data FieldSubmission = 
  FSDateRangeSubmission !(LocalTime, LocalTime)
  | ..
  deriving (Eq, Show)
bartavelle commented 5 years ago

I do not think it does! Do you mind entering it as an issue?