-
Notifications
You must be signed in to change notification settings - Fork 20
Support for 64bit integers (rebased) #66
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
Support for 64bit integers (rebased) #66
Conversation
- Field.int: Accept conversions from 64 bit integers. This can overflow, but on 64 bit platforms there is a large usable range which has been accepted in the past. We may consider adding overflow detection, though. - Field.int64: Accept conversions from smaller integers.
Hello, Could you please suggest if you are going to merge this? |
| `Int64 i, `Int x | `Int x, `Int64 i -> Int64.(equal i (of_int x)) | ||
| `Int64 i, `Float x | `Float x, `Int64 i -> Int64.to_float i = x | ||
| `UInt64 i, `Int x | `Int x, `UInt64 i -> Unsigned.UInt64.(equal i (of_int x)) | ||
| `UInt64 i, `Float x | `Float x, `UInt64 i -> Int64.to_float (Unsigned.UInt64.to_int64 i) = x | ||
| `UInt64 i, `Int64 x | `Int64 x, `UInt64 i -> Int64.equal (Unsigned.UInt64.to_int64 i) x | ||
| `Int _, _ | _, `Int _ -> false | ||
| `Int64 _, _ | _, `Int64 _ -> false | ||
| `UInt64 _, _ | _, `UInt64 _ -> false |
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.
It looks you like are missing `Int64 _, `Int64 _
and `UInt64 _, `UIint64 _
cases here.
Looks good, and I can see I already tentatively approved it in my comment to #43 Apr 10, so let's merge it, but please have a look at my comment on |
`Int64 _, `Int64 _ and `UInt64 _, `UIint64 _
Add cases to equal_field
Thanks for the contribution! |
This includes #43, my extra integer conversions, and rebases it on the current master branch.