2 ==================== Parser ====================
3 module OneOfEverything (
4 module OneOfEverything, module OneC, OrdClass(orda, ordb),
5 EqClass(..), EqTree(EqLeaf, EqBranch), FooDataC(..), FooDataB(..),
10 import System hiding (getArgs)
12 bindwith :: (OrdClass a, OrdClass b) => a -> b -> b
13 g :: (Num a, Eq b) => Foo a -> [b] -> (a, a, a) -> b
29 = ((((((((a + ((:) a b)) + (a : b))
30 + (((1 - 'c') - "abc") - 1.293))
31 + ((\ x y z -> x) 42))
41 + ([z | z <- c, isSpace z]))
44 (((((((y + [1, 2, 3, 4]) + (4, 3, 2, 1)) + (4 :: (Num a) => a))
45 + (if 42 == 42.0 then 1 else 4))
72 type Pair a b = (a, b)
73 data FooData = FooCon Int
74 data FooDataB = FooConB Double
75 data (Eq a) => EqTree a = EqLeaf a | EqBranch (EqLeaf a) (EqLeaf a)
76 class (Eq a) => EqClass a where {
77 eqc = :: a -> Char; Just eqc x = '?' }
78 class (Ord a) => OrdClass a where {
79 orda = :: a -> Char; ordb = :: a -> Char; ordc = :: a -> Char;
82 instance (Eq a) => {EqClass (EqTree a)} where
85 default (Integer, Rational)