Skip to content

Global region #7

Closed
Closed
@no-longer-on-githu-b

Description

@no-longer-on-githu-b

If this library adds a named region:

foreign import data Global :: *

Then you can use st :: ST Global as the effect of global mutations. For example:

main :: forall eff. Eff (st :: ST Global | eff) Unit
main = ...

Which would eliminate the need for REF. You could use existing local ST computations (forall r e. Eff (st :: ST r | e)) without runST if you already have an st :: ST Global effect, so I think there would be no issue with duplicate labels.

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