git.iko.soy/rowtype-yoga/purescript-native
on golang help sign in
Add tests for new type & class ref syntax
commit0c86e7fc03c68750ac678cd4acce2a3fa6cc7ee4 authorGary Burgess <gary.burgess@gmail.com> dateMon 30 Nov 2015, 14:35 (11 years ago) parent5aa3b60
2 files changed+29
examples/passing/ClassRefSyntax.purs+13 examples/passing/TypeWithoutParens.purs+16
examples/passing/ClassRefSyntax.pursnew file+13
@@ -0,0 +1,13 @@
1+module Lib (class X, go) where
2+
3+ class X a where
4+ go :: a -> a
5+
6+module Main where
7+
8+ import Lib (class X, go)
9+
10+ go' :: forall a. (X a) => a -> a
11+ go' = go
12+
13+ main = Control.Monad.Eff.Console.log "Done"
examples/passing/TypeWithoutParens.pursnew file+16
@@ -0,0 +1,16 @@
1+module Lib (X, Y) where
2+
3+ data X = X
4+ type Y = X
5+
6+module Main where
7+
8+ import Lib (X, Y)
9+
10+ idX :: X -> X
11+ idX x = x
12+
13+ idY :: Y -> Y
14+ idY y = y
15+
16+ main = Control.Monad.Eff.Console.log "Done"