2013-06-14 01:00:24 +00:00
|
|
|
{-# LANGUAGE DeriveDataTypeable #-}
|
|
|
|
module SourceSyntax.Declaration where
|
|
|
|
|
|
|
|
import Data.Data
|
|
|
|
import qualified SourceSyntax.Expression as Expr
|
|
|
|
import Types.Types
|
|
|
|
|
2013-06-14 03:25:00 +00:00
|
|
|
data Declaration tipe var
|
|
|
|
= Definition (Expr.Def tipe var)
|
2013-06-14 01:00:24 +00:00
|
|
|
| Datatype String [X] [(String,[Type])]
|
|
|
|
| TypeAlias String [X] Type
|
2013-06-14 03:25:00 +00:00
|
|
|
| ImportEvent String (Expr.LExpr tipe var) String Type
|
2013-06-14 01:00:24 +00:00
|
|
|
| ExportEvent String String Type
|
2013-06-14 01:35:37 +00:00
|
|
|
| Fixity Assoc Int String
|
2013-07-07 10:56:34 +00:00
|
|
|
deriving (Eq, Show, Data, Typeable, Show)
|
2013-06-14 01:35:37 +00:00
|
|
|
|
|
|
|
data Assoc = L | N | R
|
2013-07-07 10:56:34 +00:00
|
|
|
deriving (Eq, Show, Data, Typeable, Show)
|