Skip to content

why do Getter results live in Eff? #11

Closed

Description

@matthewleon

These should be safe, read-only operations. Is wrapping the result in Eff necessary?

Activity

  1. added a commit that references this issue on Oct 29, 2017
  2. jacereda commented on Oct 29, 2017

    @jacereda
    Collaborator

    I'm not sure about this. Could the compiler, in a case like this:

    DV.setUint8 dv 0 123
    let a = DV.getUint8 dv 0
    DV.setUint8 dv 0 456
    let b = DV.getUint8 dv 0
    

    be free to reorder the getters in a way that yields unexpected results for that code?

  3. matthewleon commented on Oct 30, 2017

    @matthewleon
    Author

    Ah I see. I think the issue here might be that what these Effs are doing is ST type stuff.

    I'm working on a fork of this where I adopt the approach used here: https://pursuit.purescript.org/packages/purescript-arrays/4.0.1/docs/Data.Array.ST

    I think that might be fruitful.

  4. jacereda commented on Oct 30, 2017

    @jacereda
    Collaborator

    Great, freeze/thaw seems the way to go.

  5. matthewleon commented on Nov 13, 2017

    @matthewleon
    Author
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