Skip to content

Commit f767635

Browse files
committed
Use the actual newtype example
1 parent b93faf9 commit f767635

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

test/Test/Example/Newtype.purs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
module Test.Example.Newtype where
22

3-
import Data.Codec.Argonaut as CA
3+
import Data.Codec.Argonaut.Common as CA
44
import Data.Codec.Argonaut.Record as CAR
55
import Data.Newtype (class Newtype)
66
import Data.Profunctor (wrapIso)
@@ -13,8 +13,8 @@ derive instance newtypePerson ∷ Newtype Person _
1313

1414
codec CA.JsonCodec Person
1515
codec =
16-
CA.coercible "Person"
17-
(CAR.record
16+
wrapIso Person
17+
(CAR.object "Person"
1818
{ "Name": CA.string
1919
, age: CA.int
2020
, "is active": CA.boolean

0 commit comments

Comments
 (0)