]> gerrit.simantics Code Review - simantics/platform.git/blob - tests/org.simantics.scl.compiler.tests/src/org/simantics/scl/compiler/tests/scl/Kinds1.scl
(refs #7307) Added features field to SCL module header
[simantics/platform.git] / tests / org.simantics.scl.compiler.tests / src / org / simantics / scl / compiler / tests / scl / Kinds1.scl
1 class Functor f where
2     map :: (a -> b) -> f a -> f b
3
4 data Either a b = Left a | Right b
5
6 instance Functor (Either a) where
7     map _ (Left x)  = Left x
8     map f (Right y) = Right (f y)
9
10 id :: Integer -> Integer
11 id x = x
12
13 main = map id (Left (12 :: Integer))
14 --
15 (Left 12)