Add all the A tasks

This commit is contained in:
Ingy döt Net 2013-04-10 14:58:50 -07:00
parent 2dd7375f96
commit 051504d65b
1608 changed files with 18584 additions and 0 deletions

View file

@ -0,0 +1,3 @@
class Eq a where
(==) :: a -> a -> Bool
(/=) :: a -> a -> Bool

View file

@ -0,0 +1,5 @@
class Eq a where
(==) :: a -> a -> Bool
(/=) :: a -> a -> Bool
x /= y = not (x == y)
x == y = not (x /= y)

View file

@ -0,0 +1,2 @@
func :: (Eq a) => a -> Bool
func x = x == x

View file

@ -0,0 +1 @@
data Foo = Foo {x :: Integer, str :: String}

View file

@ -0,0 +1,3 @@
instance Eq Foo where
(Foo x1 str1) == (Foo x2 str2) =
(x1 == x2) && (str1 == str2)

View file

@ -0,0 +1,3 @@
class abstraction()
abstract method compare(l,r) # generates runerr(700, "method compare()")
end