We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
2 parents d73f61a + de4529a commit 12ae04bCopy full SHA for 12ae04b
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