1module RelationType where
2import qualified Data.Map as M
3import qualified Data.HashSet as HS
4import qualified Data.Hashable as Hash
6data Atom = StringAtom String |
8 RelationAtom Relation deriving (Show, Eq)
10data AtomType = StringAtomType |
12 RelationAtomType Attributes deriving (Eq, Show)
14type AttributeName = String
15data Attribute = Attribute AttributeName AtomType deriving (Eq, Show)
17type Attributes = M.Map AttributeName Attribute --attributes keys by attribute name for ease of access
19type RelationTupleSet = HS.HashSet RelationTuple
21instance Hash.Hashable RelationTuple where
22 hashWithSalt salt tup = Hash.hashWithSalt salt (show tup)
24data RelationTuple = RelationTuple (M.Map AttributeName Atom) deriving (Eq, Show)
26data Relation = Relation Attributes RelationTupleSet deriving (Show, Eq)
27data RelationCardinality = Uncountable | Countable Int deriving (Eq, Show)
28data RelationSizeInfinite = RelationSizeInfinite
30data RelationalError = RelationalError Int String deriving (Show,Eq)
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