1module ProjectM36.DataTypes.Maybe where
3import qualified Data.HashSet as HS
4import qualified Data.Map as M
6maybeAtomType :: AtomType -> AtomType
7maybeAtomType arg = ConstructedAtomType "Maybe" (M.singleton "a" arg)
9maybeTypeConstructorMapping :: TypeConstructorMapping
10maybeTypeConstructorMapping = [(ADTypeConstructorDef "Maybe" ["a"],
11 [DataConstructorDef "Nothing" [],
12 DataConstructorDef "Just" [DataConstructorDefTypeVarNameArg "a"]])
15maybeAtomFunctions :: AtomFunctions
16maybeAtomFunctions = HS.fromList [
18 atomFuncName ="isJust",
19 atomFuncType = [maybeAtomType AnyAtomType, BoolAtomType],
20 atomFuncBody = AtomFunctionBody Nothing $ \((ConstructedAtom dConsName _ _):_) -> BoolAtom (dConsName == "Nothing")
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