-\r
-class Foo a where\r
- foo :: a\r
- \r
-class (Foo a) => Bar a where\r
- bar :: a\r
- \r
-instance Bar Double where\r
- foo x = x\r
- bar x = x\r
- \r
-main = foo 3.0 + bar 4.0\r
---\r
-7.0\r
-\r
+
+class Foo a where
+ foo :: a
+
+class (Foo a) => Bar a where
+ bar :: a
+
+instance Bar Double where
+ foo x = x
+ bar x = x
+
+main = foo 3.0 + bar 4.0
+--
+7.0
+