1module ProjectM36.DataConstructorDef where
2import ProjectM36.Base as B
3import qualified Data.Set as S
5emptyDataConstructor :: DataConstructorName -> DataConstructorDef
6emptyDataConstructor name' = DataConstructorDef name' []
8name :: DataConstructorDef -> DataConstructorName
9name (DataConstructorDef name' _) = name'
11fields :: DataConstructorDef -> [DataConstructorDefArg]
12fields (DataConstructorDef _ args) = args
14typeVars :: DataConstructorDef -> S.Set TypeVarName
15typeVars (DataConstructorDef _ tConsArgs) = S.unions $ map typeVarsInDefArg tConsArgs
17typeVarsInDefArg :: DataConstructorDefArg -> S.Set TypeVarName
18typeVarsInDefArg (DataConstructorDefTypeConstructorArg tCons) = B.typeVars tCons
19typeVarsInDefArg (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