1{-# LANGUAGE DeriveDataTypeable #-}
2module SourceSyntax.Module where
6import Data.List (intercalate)
7import qualified Data.Map as Map
8import Control.Applicative ((<$>), (<*>))
9import Control.Arrow (second)
11import SourceSyntax.Expression (LExpr)
12import SourceSyntax.Declaration
13import SourceSyntax.Type
14import System.FilePath (joinPath)
17 Module [String] Exports Imports [Declaration tipe var]
20type Exports = [String]
22type Imports = [(String, ImportMethod)]
23data ImportMethod = As String | Importing [String] | Hiding [String]
24 deriving (Eq, Ord, Show, Data, Typeable)
26data MetadataModule t v = MetadataModule {
30 imports :: [(String, ImportMethod)],
32 types :: Map.Map String Type,
33 fixities :: [(Assoc, Int, String)],
34 aliases :: [(String, [String], Type)],
35 datatypes :: [ (String, [String], [(String,[Type])]) ],
36 foreignImports :: [(String, LExpr t v, String, Type)],
37 foreignExports :: [(String, String, Type)]
40type Interfaces = Map.Map String ModuleInterface
41type ADT = (String, [String], [(String,[Type])])
43data ModuleInterface = ModuleInterface {
44 iTypes :: Map.Map String Type,
46 iAliases :: [(String, [String], Type)]
49instance Binary ModuleInterface where
50 put modul = put (iTypes modul) >> put (iAdts modul) >> put (iAliases modul)
51 get = ModuleInterface <$> get <*> get <*> get
keysesc to close
- j k
- move down, up
- enter
- open
- esc
- back, or up a level
- 1 2 3 4
- readme, files, commits, refs
- /
- filter
- y
- copy the clone command
- c
- compare the chosen commit with another (or shift-click both)
- ?
- show or hide this list