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)
13 {- implicit forall -} (OrdClass a, OrdClass b) => a -> b -> b
17 Foo a -> [b] -> (a, a, a) -> b
33 = ((((((((a + (: a b)) + (a : b)) + (((1 - 'c') - "abc") - 1.293))
34 + ((\ x y z -> x) 42))
44 + ([z | z <- c, isSpace z]))
47 (((((((y + [1, 2, 3, 4]) + (4, 3, 2, 1))
48 + (4 :: {- implicit forall -} (Num a) => a))
49 + (if 42 == 42.0 then 1 else 4))
76 type Pair a b = (a, b)
77 data FooData = forall. FooCon Int
78 data FooDataB = forall. FooConB Double
79 data (Eq a) => EqTree a =
80 forall. EqLeaf a | forall. EqBranch (EqLeaf a) (EqLeaf a)
81 class (Eq a) => EqClass a where {
82 eqc :: {- implicit forall -} a -> Char;
85 class (Ord a) => OrdClass a where {
86 orda :: {- implicit forall -} a -> Char;
87 ordb :: {- implicit forall -} a -> Char;
88 ordc :: {- implicit forall -} a -> Char;
90 instance {- implicit forall -} (Eq a) => EqClass (EqTree a) where
93 default (Rational, Integer)
97 read001.hs:5: Unknown module in export list: module `OneC'
99 read001.hs:5: Type constructor or class not in scope: `FooDataC'
101 read001.hs:38: Type constructor or class not in scope: `EqLeaf'
103 read001.hs:38: Type constructor or class not in scope: `EqLeaf'
105 read001.hs:87: Variable not in scope: `x'
107 read001.hs:88: Variable not in scope: `x'
109 read001.hs:94: Variable not in scope: `isSpace'
111 read001.hs:95: Variable not in scope: `foo'
113 read001.hs:107: Data constructor not in scope: `Foo'
115 read001.hs:107: Data constructor not in scope: `Bar'
117 read001.hs:112: Type constructor or class not in scope: `Foo'
119 Compilation had errors