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