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%2FPolynomials.scl;h=f4cd212932fba4c78726d67d64b68c7f2f73a71c;hp=5e35b9424ac456dd7d61baa7d0c8c59f6df47293;hb=a8758de5bc19e5adb3f618d3038743a164f09912;hpb=12d9af17384d960b75d58c3935d2b7b46d93e87b diff --git a/tests/org.simantics.scl.compiler.tests/src/org/simantics/scl/compiler/tests/scl/Polynomials.scl b/tests/org.simantics.scl.compiler.tests/src/org/simantics/scl/compiler/tests/scl/Polynomials.scl index 5e35b9424..f4cd21293 100644 --- a/tests/org.simantics.scl.compiler.tests/src/org/simantics/scl/compiler/tests/scl/Polynomials.scl +++ b/tests/org.simantics.scl.compiler.tests/src/org/simantics/scl/compiler/tests/scl/Polynomials.scl @@ -8,7 +8,7 @@ normalize l = go (length l) then go (i-1) else take i l -instance (Eq a, Additive a) => Additive (Poly a) where +instance (Additive a) => Additive (Poly a) where zero = Poly [] Poly a + Poly b = Poly ( @@ -23,7 +23,7 @@ instance (Eq a, Additive a) => Additive (Poly a) where la = length a lb = length b -instance (Eq a, Ring a) => Ring (Poly a) where +instance (Ring a) => Ring (Poly a) where one = Poly [one] neg (Poly l) = Poly (map neg l) a - b = a + (neg b)