git.iko.soy/rowtype-yoga/purescript-native
on golang help sign in
Add examples/shouldpass
commitcab0fffb11bf8b9e77f66a91191d3383a8e85c8b authorPhil Freeman <paf31@cantab.net> dateSun 9 Feb 2014, 09:59 (13 years ago) parent3ca411c
2 files changed+17
examples/shouldpass/NestedTypeSynonyms.purs+9 examples/shouldpass/TypeClasses.purs+8
examples/shouldpass/NestedTypeSynonyms.pursnew file+9
@@ -0,0 +1,9 @@
1+module Test where
2+
3+ type X = {}
4+ type Y = X -> X
5+
6+ fn :: Y
7+ fn a = a
8+
9+ test = fn {}
examples/shouldpass/TypeClasses.pursnew file+8
@@ -0,0 +1,8 @@
1+module Main where
2+
3+ import Prelude
4+ import Either
5+
6+ instance Prelude.Functor (Either a) where
7+ (<$>) _ (Left x) = Left x
8+ (<$>) f (Right y) = Right (f y)