1module ProjectM36.DataTypes.Primitive where
4primitiveTypeConstructorMapping :: TypeConstructorMapping
5primitiveTypeConstructorMapping = map (\(name, aType) ->
6 (PrimitiveTypeConstructorDef name aType, [])) prims
8 prims = [("Integer", IntegerAtomType),
10 ("Text", TextAtomType),
11 ("Double", DoubleAtomType),
12 ("Bool", BoolAtomType),
13 ("ByteString", ByteStringAtomType),
14 ("DateTime", DateTimeAtomType),
18intTypeConstructor :: TypeConstructor
19intTypeConstructor = PrimitiveTypeConstructor "Int" IntAtomType
21doubleTypeConstructor :: TypeConstructor
22doubleTypeConstructor = PrimitiveTypeConstructor "Double" DoubleAtomType
24textTypeConstructor :: TypeConstructor
25textTypeConstructor = PrimitiveTypeConstructor "Text" TextAtomType
27dayTypeConstructor :: TypeConstructor
28dayTypeConstructor = PrimitiveTypeConstructor "Day" DayAtomType
30dateTimeTypeConstructor :: TypeConstructor
31dateTimeTypeConstructor = PrimitiveTypeConstructor "DateTime" DayAtomType
33-- | Return the type of an 'Atom'.
34atomTypeForAtom :: Atom -> AtomType
35atomTypeForAtom (IntAtom _) = IntAtomType
36atomTypeForAtom (IntegerAtom _) = IntegerAtomType
37atomTypeForAtom (DoubleAtom _) = DoubleAtomType
38atomTypeForAtom (TextAtom _) = TextAtomType
39atomTypeForAtom (DayAtom _) = DayAtomType
40atomTypeForAtom (DateTimeAtom _) = DateTimeAtomType
41atomTypeForAtom (ByteStringAtom _) = ByteStringAtomType
42atomTypeForAtom (BoolAtom _) = BoolAtomType
43atomTypeForAtom (RelationAtom (Relation attrs _)) = RelationAtomType attrs
44atomTypeForAtom (ConstructedAtom _ aType _) = aType
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