Skip to content

Instances for Fixed #76

Description

@lehins

One more type from base that is missing some instances.

I think I can see a lawful implementation for HasResolution e => UniformRange (Fixed e) instance. Also considering that we already have instance Random Integer we can definitely add instance HasResolution e => Random (Fixed e)

Activity

  1. Shimuuar commented on Jul 1, 2020

    @Shimuuar
    Contributor

    For a change I think UniformRange is perfectly reasonable instance. Only question is what should random return? I think it should follow Dounle/Float/proposed instance for Rationals and return numbers in [0,1] range.

  2. lehins commented on Jul 1, 2020

    @lehins
    ContributorAuthor

    Yes, [0, 1] range for Random is also what I had in mind.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

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