git.iko.soy/rowtype-yoga/purescript-native
on golang help sign in
Fix broken tests
64289a1Phil Freeman
examples/passing/Auto.purs+3−3
@@ -1,14 +1,14 @@
1module Auto where
1module Auto where
2
2
3− data Auto s i o = Auto { state :: s, step :: s -> i -> o }
3+ data Auto s i o = MkAuto { state :: s, step :: s -> i -> o }
4
4
5 type SomeAuto i o = forall r. (forall s. Auto s i o -> r) -> r
5 type SomeAuto i o = forall r. (forall s. Auto s i o -> r) -> r
6
6
7 exists :: forall s i o. s -> (s -> i -> o) -> SomeAuto i o
7 exists :: forall s i o. s -> (s -> i -> o) -> SomeAuto i o
8− exists = \state step f -> f (Auto { state: state, step: step })
8+ exists = \state step f -> f (MkAuto { state: state, step: step })
9
9
10 run :: forall i o. SomeAuto i o -> i -> o
10 run :: forall i o. SomeAuto i o -> i -> o
11− run = \s i -> s (\a -> case a of Auto a -> a.step a.state i)
11+ run = \s i -> s (\a -> case a of MkAuto a -> a.step a.state i)
12
12
13module Main where
13module Main where
14
14
examples/passing/Person.purs+2−2
@@ -2,13 +2,13 @@ module Person where
2
2
3 import Prelude ((++))
3 import Prelude ((++))
4
4
5− data Person = Person { name :: String, age :: Number }
5+ data Person = MkPerson { name :: String, age :: Number }
6
6
7 foreign import itoa :: Number -> String
7 foreign import itoa :: Number -> String
8
8
9 showPerson :: Person -> String
9 showPerson :: Person -> String
10 showPerson = \p -> case p of
10 showPerson = \p -> case p of
11− Person o -> o.name ++ ", aged " ++ itoa(o.age)
11+ MkPerson o -> o.name ++ ", aged " ++ itoa(o.age)
12
12
13module Main where
13module Main where
14
14