-
Notifications
You must be signed in to change notification settings - Fork 211
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Fix Inject
instance for lists
#1261
Conversation
Fixes #1254 This also adds tests for conversions back and forth between Dhall and Haskell values
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Lovely tests! :)
dhall/tests/Dhall/Test/Dhall.hs
Outdated
, "2" `correspondsTo` (2 :: Natural) | ||
, "+2" `correspondsTo` (2 :: Integer) | ||
, "2.0" `correspondsTo` (2.0 :: Double) | ||
-- , "2.0" `correspondsTo` (2.0 :: Scientific) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why is this commented out?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Missing instance, which I can add for symmetry
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can you add a comment regarding the missing instance?
dhall/tests/Dhall/Test/Dhall.hs
Outdated
-- , "2.0" `correspondsTo` (2.0 :: Scientific) | ||
, "\"ABC\"" `correspondsTo` ("ABC" :: Data.Text.Text) | ||
, "\"ABC\"" `correspondsTo` ("ABC" :: Data.Text.Lazy.Text) | ||
-- , "\"ABC\"" `correspondsTo` ("ABC" :: String) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Dito.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Same here.
dhall/tests/Dhall/Test/Dhall.hs
Outdated
, "2" `correspondsTo` (2 :: Natural) | ||
, "+2" `correspondsTo` (2 :: Integer) | ||
, "2.0" `correspondsTo` (2.0 :: Double) | ||
-- , "2.0" `correspondsTo` (2.0 :: Scientific) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can you add a comment regarding the missing instance?
dhall/tests/Dhall/Test/Dhall.hs
Outdated
-- , "2.0" `correspondsTo` (2.0 :: Scientific) | ||
, "\"ABC\"" `correspondsTo` ("ABC" :: Data.Text.Text) | ||
, "\"ABC\"" `correspondsTo` ("ABC" :: Data.Text.Lazy.Text) | ||
-- , "\"ABC\"" `correspondsTo` ("ABC" :: String) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Same here.
... so that we don't need to comment them out!
Actually, I realized that it was easier to just add the missing instances, so I'll do that |
Thanks for the quick fix! |
@jneira: You're welcome! 🙂 |
Fixes #1254
This also adds tests for conversions back and forth between Dhall and
Haskell values