on cee9f6a help sign in
elk/compiler/SourceSyntax/Declaration.hs
18 lines 541 B history raw
1{-# LANGUAGE DeriveDataTypeable #-}
2module SourceSyntax.Declaration where
4import Data.Data
5import qualified SourceSyntax.Expression as Expr
6import Types.Types
8data Declaration tipe var
9 = Definition (Expr.Def tipe var)
10 | Datatype String [X] [(String,[Type])]
11 | TypeAlias String [X] Type
12 | ImportEvent String (Expr.LExpr tipe var) String Type
13 | ExportEvent String String Type
14 | Fixity Assoc Int String
15 deriving (Eq, Show, Data, Typeable)
17data Assoc = L | N | R
18 deriving (Eq, Show, Data, Typeable)