Skip to content

Int64 EuclideanRing #8

Open
Open
@jamesdbrock

Description

Int64 is not a EuclideanRing. It can’t pass the checkEuclideanRingGen test because mod is only lawful if the divisor is in the 32-bit Int range.

Maybe we should remove the EuclideanRing instance, since it’s a lie? Then Int64 would not have the div and mod EuclideanRing methods, and instead would have only the truncating division functions quot and rem.

https://pursuit.purescript.org/packages/purescript-prelude/6.0.1/docs/Data.EuclideanRing

https://pursuit.purescript.org/packages/purescript-integers/6.0.0/docs/Data.Int#v:quot

https://en.m.wikipedia.org/wiki/Modulo_operation

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions