We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
buildFromScratch
1 parent c3aabba commit de4529aCopy full SHA for de4529a
src/Record/Builder.purs
@@ -1,6 +1,7 @@
1
module Record.Builder
2
( Builder
3
, build
4
+ , buildFromScratch
5
, insert
6
, modify
7
, delete
@@ -45,6 +46,10 @@ newtype Builder a b = Builder (a -> b)
45
46
build :: forall r1 r2. Builder (Record r1) (Record r2) -> Record r1 -> Record r2
47
build (Builder b) r1 = b (copyRecord r1)
48
49
+-- | Build a record from scratch.
50
+buildFromScratch :: forall r. Builder (Record ()) (Record r) -> Record r
51
+buildFromScratch = flip build {}
52
+
53
derive newtype instance semigroupoidBuilder :: Semigroupoid Builder
54
derive newtype instance categoryBuilder :: Category Builder
55
0 commit comments