Skip to content

Commit 6579dc7

Browse files
authored
Remove Record.ST (#78)
1 parent 7bf61ab commit 6579dc7

File tree

4 files changed

+1
-171
lines changed

4 files changed

+1
-171
lines changed

CHANGELOG.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,10 +7,10 @@ Notable changes to this project are documented in this file. The format is based
77
Breaking changes:
88
- Added support for PureScript 0.14 and dropped support for all previous versions (#66)
99
- 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)
10+
- Removed `Record.ST` (#78)
1011

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

1616
Bugfixes:

src/Record/ST.js

Lines changed: 0 additions & 59 deletions
This file was deleted.

src/Record/ST.purs

Lines changed: 0 additions & 95 deletions
This file was deleted.

test/Main.purs

Lines changed: 0 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,6 @@ import Prelude
55
import Effect (Effect)
66
import Record (delete, equal, get, insert, merge, modify, rename, set)
77
import Record.Builder as Builder
8-
import Record.ST (run, poke, thaw, modify) as ST
98
import Record.Unsafe (unsafeHas)
109
import Test.Assert (assert')
1110
import Type.Proxy (Proxy(..))
@@ -39,21 +38,6 @@ main = do
3938
assert' "unsafeHas2" $
4039
not $ unsafeHas "b" { a: 42 }
4140

42-
let
43-
stTest1 = ST.run do
44-
rec <- ST.thaw { x: 41, y: "" }
45-
ST.poke x 42 rec
46-
ST.poke y "testing" rec
47-
pure rec
48-
stTest2 = ST.run do
49-
rec <- ST.thaw { x: 41 }
50-
ST.modify x (_ + 1) rec
51-
pure rec
52-
53-
assert' "pokeSTRecord" $
54-
stTest1.x == 42 && stTest1.y == "testing"
55-
assert' "ST.modify" $ stTest2.x == 42
56-
5741
let testBuilder = Builder.build (Builder.insert x 42
5842
>>> Builder.merge { y: true, z: "testing" }
5943
>>> Builder.delete y

0 commit comments

Comments
 (0)