definition module AST
from Data.Maybe import :: Maybe
- from StdOverloaded import class toString, class ==, class zero
-from StdOverloaded import class toString, class ==, class <
++from StdOverloaded import class toString, class ==, class zero, class <
:: Pos = {line :: Int, col :: Int}
:: AST = AST [FunDecl]
instance toString Pos
instance toString Type
instance toString AST
+
+instance zero Pos
+ instance == Op1
+ instance == Op2
+ instance < Op1
+ instance < Op2
derive gEq Op2
instance == Op2 where (==) o1 o2 = gEq{|*|} o1 o2
-
-instance < Op2 where
- (<) o1 o2 = (toString o1) < (toString o2)
-
-instance < Op1 where
- (<) o1 o2 = (toString o1) < (toString o2)
+instance zero Pos where
+ zero = {line=0, col=0}
++
+ derive gEq Op1
+ instance == Op1 where (==) o1 o2 = gEq{|*|} o1 o2
++instance < Op2 where (<) o1 o2 = toString o1 < toString o2
++instance < Op1 where (<) o1 o2 = toString o1 < toString o2
import qualified Data.Map as Map
from Data.Func import $
- from StdFunc import o, flip, const
-from StdFunc import o, id
++from StdFunc import o, flip, const, id
import Control.Monad
import Data.Either
+import Data.Maybe
import Data.Monoid
- import Data.List
+ import Data.List
import StdString
import StdList