Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,10 +7,10 @@ Notable changes to this project are documented in this file. The format is based
Breaking changes:
- Added support for PureScript 0.14 and dropped support for all previous versions (#66)
- Updated `Record.Builder.merge` and `Record.Builder.union` so that they behave like `Record.merge` and `Record.union`: fields from the argument override those of the record being built in case of overlaps. (#73)
- Removed `Record.ST` (#78)

New features:
- Added `buildFromScratch` for building from an empty record (#53)
- Added `new` and `run` to `Record.ST` (#71)
- Added `flip` function (#73)

Bugfixes:
Expand Down
59 changes: 0 additions & 59 deletions src/Record/ST.js

This file was deleted.

95 changes: 0 additions & 95 deletions src/Record/ST.purs

This file was deleted.

16 changes: 0 additions & 16 deletions test/Main.purs
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,6 @@ import Prelude
import Effect (Effect)
import Record (delete, equal, get, insert, merge, modify, rename, set)
import Record.Builder as Builder
import Record.ST (run, poke, thaw, modify) as ST
import Record.Unsafe (unsafeHas)
import Test.Assert (assert')
import Type.Proxy (Proxy(..))
Expand Down Expand Up @@ -39,21 +38,6 @@ main = do
assert' "unsafeHas2" $
not $ unsafeHas "b" { a: 42 }

let
stTest1 = ST.run do
rec <- ST.thaw { x: 41, y: "" }
ST.poke x 42 rec
ST.poke y "testing" rec
pure rec
stTest2 = ST.run do
rec <- ST.thaw { x: 41 }
ST.modify x (_ + 1) rec
pure rec

assert' "pokeSTRecord" $
stTest1.x == 42 && stTest1.y == "testing"
assert' "ST.modify" $ stTest2.x == 42

let testBuilder = Builder.build (Builder.insert x 42
>>> Builder.merge { y: true, z: "testing" }
>>> Builder.delete y
Expand Down