1module ProjectM36.DataConstructorDef where
3import qualified ProjectM36.TypeConstructor as TC
4import qualified Data.Set as S
6emptyDataConstructor :: DataConstructorName -> DataConstructorDef
7emptyDataConstructor name' = DataConstructorDef name' []
9name :: DataConstructorDef -> DataConstructorName
10name (DataConstructorDef name' _) = name'
12fields :: DataConstructorDef -> [DataConstructorDefArg]
13fields (DataConstructorDef _ args) = args
15typeVars :: DataConstructorDef -> S.Set TypeVarName
16typeVars (DataConstructorDef _ tConsArgs) = S.unions $ map typeVarsInDefArg tConsArgs
18typeVarsInDefArg :: DataConstructorDefArg -> S.Set TypeVarName
19typeVarsInDefArg (DataConstructorDefTypeConstructorArg tCons) = TC.typeVars tCons
20typeVarsInDefArg (DataConstructorDefTypeVarNameArg pVarName) = S.singleton pVarName
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