git.iko.soy/rowtype-yoga/purescript-native
on ebbc4e4 help sign in
24 lines 527 B history raw
1module Main where
3import Prelude
4import Control.Monad.Eff
5import Control.Monad.Eff.Console
6import Test.Assert
8getValue :: forall e. Eff (| e) Boolean
9getValue = return true
11main = do
12 let record = { value: false }
13 record' <- record { value = _ } <$> getValue
14 assert $ record'.value == true
16 let point = { x: 1.0, y: 1.0 }
17 x = 10.0
18 point' = (point { x = _, y = x }) 100.0
20 assert $ point'.x == 100.0
21 assert $ point'.y == 10.0
23 let record2 = (_ { x = _ }) { x: 0.0 } 10.0
24 assert $ record2.x == 10.0