X-Git-Url: https://gerrit.simantics.org/r/gitweb?p=simantics%2Fplatform.git;a=blobdiff_plain;f=tests%2Forg.simantics.scl.compiler.tests%2Fsrc%2Forg%2Fsimantics%2Fscl%2Fcompiler%2Ftests%2Fscl%2FInstanceHierarchy.scl;h=506942a9ac63278f828657dd718e86ad600bda3d;hp=1c751f397febd1f8fa59ec90fb19b3777c3f14b7;hb=HEAD;hpb=1956b6ed85e1df65c4df58e6cb0ac6aa296e6939 diff --git a/tests/org.simantics.scl.compiler.tests/src/org/simantics/scl/compiler/tests/scl/InstanceHierarchy.scl b/tests/org.simantics.scl.compiler.tests/src/org/simantics/scl/compiler/tests/scl/InstanceHierarchy.scl index 1c751f397..506942a9a 100644 --- a/tests/org.simantics.scl.compiler.tests/src/org/simantics/scl/compiler/tests/scl/InstanceHierarchy.scl +++ b/tests/org.simantics.scl.compiler.tests/src/org/simantics/scl/compiler/tests/scl/InstanceHierarchy.scl @@ -1,26 +1,26 @@ -import "Prelude" hiding (zero, one) - -class MyAdditive a where - zero :: a - -class (MyAdditive a) => MyRing a where - one :: a - -instance MyAdditive Integer where - zero = 0 - -instance MyRing Integer where - one = 1 - -data Poly a = Poly [a] - -instance (MyAdditive a) => MyAdditive (Poly a) where - zero = Poly [] - -instance (MyRing a) => MyRing (Poly a) where - one = Poly [one] - -main :: Poly Integer -main = one --- +import "Prelude" hiding (zero, one) + +class MyAdditive a where + zero :: a + +class (MyAdditive a) => MyRing a where + one :: a + +instance MyAdditive Integer where + zero = 0 + +instance MyRing Integer where + one = 1 + +data Poly a = Poly [a] + +instance (MyAdditive a) => MyAdditive (Poly a) where + zero = Poly [] + +instance (MyRing a) => MyRing (Poly a) where + one = Poly [one] + +main :: Poly Integer +main = one +-- [1] \ No newline at end of file