@@ -7,37 +7,37 @@ import JRec
77spec :: Spec
88spec = do
99 it "polymorphic" $ do
10− (ExactRecord (#u :=: True, #a :=: 5, #b :=: 6) & #u .~ 5)
11− `shouldBe` ExactRecord (#u :=: 5, #a :=: 5, #b :=: 6)
10+ (ExactRecord (#u := True, #a := 5, #b := 6) & #u .~ 5)
11+ `shouldBe` ExactRecord (#u := 5, #a := 5, #b := 6)
1212 it "show" $ do
1313 show (ExactRecord ()) `shouldBe` "{}"
14− show (ExactRecord (#foo :=: True)) `shouldBe` "{foo = True}"
15− show (ExactRecord (#foo :=: True, #bar :=: 0)) `shouldBe` "{foo = True, bar = 0}"
14+ show (ExactRecord (#foo := True)) `shouldBe` "{foo = True}"
15+ show (ExactRecord (#foo := True, #bar := 0)) `shouldBe` "{foo = True, bar = 0}"
1616 it "get" $ do
17− let getA1 :: Record ("a" :=: Int ': rest) -> Int
17+ let getA1 :: Record ("a" := Int ': rest) -> Int
1818 getA1 = (^. #a)
19− let getA2 :: Record ("u" :=: Bool ': "a" :=: Int ': rest) -> Int
19+ let getA2 :: Record ("u" := Bool ': "a" := Int ': rest) -> Int
2020 getA2 = (^. #a)
21− getA1 (ExactRecord (#a :=: 5)) `shouldBe` 5
22− getA1 (ExactRecord (#a :=: 5, #b :=: 6)) `shouldBe` 5
23− getA2 (ExactRecord (#u :=: True, #a :=: 5)) `shouldBe` 5
24− getA2 (ExactRecord (#u :=: True, #a :=: 5, #b :=: 6)) `shouldBe` 5
21+ getA1 (ExactRecord (#a := 5)) `shouldBe` 5
22+ getA1 (ExactRecord (#a := 5, #b := 6)) `shouldBe` 5
23+ getA2 (ExactRecord (#u := True, #a := 5)) `shouldBe` 5
24+ getA2 (ExactRecord (#u := True, #a := 5, #b := 6)) `shouldBe` 5
2525 it "set" $ do
2626 let setA1 ::
27− Record ("a" :=: Int ': rest) ->
28− Record ("a" :=: Int ': rest)
27+ Record ("a" := Int ': rest) ->
28+ Record ("a" := Int ': rest)
2929 setA1 = (#a .~ 8)
3030 let setA2 ::
31− Record ("u" :=: Bool ': "a" :=: Int ': rest) ->
32− Record ("u" :=: Bool ': "a" :=: Int ': rest)
31+ Record ("u" := Bool ': "a" := Int ': rest) ->
32+ Record ("u" := Bool ': "a" := Int ': rest)
3333 setA2 = (#a .~ 8)
34− setA1 (ExactRecord (#a :=: 5))
35− `shouldBe` (ExactRecord (#a :=: 8))
36− setA1 (ExactRecord (#a :=: 5, #b :=: 6))
37− `shouldBe` (ExactRecord (#a :=: 8, #b :=: 6))
38− setA2 (ExactRecord (#u :=: True, #a :=: 5))
39− `shouldBe` (ExactRecord (#u :=: True, #a :=: 8))
40− setA2 (ExactRecord (#u :=: True, #a :=: 5, #b :=: 6))
41− `shouldBe` (ExactRecord (#u :=: True, #a :=: 8, #b :=: 6))
34+ setA1 (ExactRecord (#a := 5))
35+ `shouldBe` (ExactRecord (#a := 8))
36+ setA1 (ExactRecord (#a := 5, #b := 6))
37+ `shouldBe` (ExactRecord (#a := 8, #b := 6))
38+ setA2 (ExactRecord (#u := True, #a := 5))
39+ `shouldBe` (ExactRecord (#u := True, #a := 8))
40+ setA2 (ExactRecord (#u := True, #a := 5, #b := 6))
41+ `shouldBe` (ExactRecord (#u := True, #a := 8, #b := 6))
4242
4343