From 51b64571efd34a0bc3cc486325a1d37fa71b8261 Mon Sep 17 00:00:00 2001 From: Finn Teegen Date: Fri, 5 Jan 2018 10:07:52 +0100 Subject: [PATCH] Fix prelude of testsuite --- test/fail/Prelude.curry | 12 ++++++------ test/pass/Prelude.curry | 12 ++++++------ test/warning/Prelude.curry | 12 ++++++------ 3 files changed, 18 insertions(+), 18 deletions(-) diff --git a/test/fail/Prelude.curry b/test/fail/Prelude.curry index 9008acc5..5727c6c2 100644 --- a/test/fail/Prelude.curry +++ b/test/fail/Prelude.curry @@ -1645,7 +1645,7 @@ class Num a where abs :: a -> a signum :: a -> a - fromInteger :: Int -> a + fromInt :: Int -> a x - y = x + negate y negate x = 0 - x @@ -1664,7 +1664,7 @@ instance Num Int where | x == 0 = 0 | otherwise = -1 - fromInteger x = x + fromInt x = x instance Num Float where x + y = x +. y @@ -1681,9 +1681,9 @@ instance Num Float where | x == 0 = 0 | otherwise = -1 - fromInteger x = i2f x + fromInt x = i2f x --- minimal definition: fromRational and (recip or (/)) +-- minimal definition: fromFloat and (recip or (/)) class Num a => Fractional a where (/) :: a -> a -> a @@ -1692,13 +1692,13 @@ class Num a => Fractional a where recip x = 1/x x / y = x * recip y - fromRational :: Float -> a -- since we have no type Rational + fromFloat :: Float -> a -- since we have no type Rational instance Fractional Float where x / y = x /. y recip x = 1.0/x - fromRational x = x + fromFloat x = x class (Num a, Ord a) => Real a where -- toRational :: a -> Rational diff --git a/test/pass/Prelude.curry b/test/pass/Prelude.curry index 9008acc5..5727c6c2 100644 --- a/test/pass/Prelude.curry +++ b/test/pass/Prelude.curry @@ -1645,7 +1645,7 @@ class Num a where abs :: a -> a signum :: a -> a - fromInteger :: Int -> a + fromInt :: Int -> a x - y = x + negate y negate x = 0 - x @@ -1664,7 +1664,7 @@ instance Num Int where | x == 0 = 0 | otherwise = -1 - fromInteger x = x + fromInt x = x instance Num Float where x + y = x +. y @@ -1681,9 +1681,9 @@ instance Num Float where | x == 0 = 0 | otherwise = -1 - fromInteger x = i2f x + fromInt x = i2f x --- minimal definition: fromRational and (recip or (/)) +-- minimal definition: fromFloat and (recip or (/)) class Num a => Fractional a where (/) :: a -> a -> a @@ -1692,13 +1692,13 @@ class Num a => Fractional a where recip x = 1/x x / y = x * recip y - fromRational :: Float -> a -- since we have no type Rational + fromFloat :: Float -> a -- since we have no type Rational instance Fractional Float where x / y = x /. y recip x = 1.0/x - fromRational x = x + fromFloat x = x class (Num a, Ord a) => Real a where -- toRational :: a -> Rational diff --git a/test/warning/Prelude.curry b/test/warning/Prelude.curry index 9008acc5..5727c6c2 100644 --- a/test/warning/Prelude.curry +++ b/test/warning/Prelude.curry @@ -1645,7 +1645,7 @@ class Num a where abs :: a -> a signum :: a -> a - fromInteger :: Int -> a + fromInt :: Int -> a x - y = x + negate y negate x = 0 - x @@ -1664,7 +1664,7 @@ instance Num Int where | x == 0 = 0 | otherwise = -1 - fromInteger x = x + fromInt x = x instance Num Float where x + y = x +. y @@ -1681,9 +1681,9 @@ instance Num Float where | x == 0 = 0 | otherwise = -1 - fromInteger x = i2f x + fromInt x = i2f x --- minimal definition: fromRational and (recip or (/)) +-- minimal definition: fromFloat and (recip or (/)) class Num a => Fractional a where (/) :: a -> a -> a @@ -1692,13 +1692,13 @@ class Num a => Fractional a where recip x = 1/x x / y = x * recip y - fromRational :: Float -> a -- since we have no type Rational + fromFloat :: Float -> a -- since we have no type Rational instance Fractional Float where x / y = x /. y recip x = 1.0/x - fromRational x = x + fromFloat x = x class (Num a, Ord a) => Real a where -- toRational :: a -> Rational -- GitLab