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)
16intTypeConstructor :: TypeConstructor
17intTypeConstructor = PrimitiveTypeConstructor "Int" IntAtomType
19doubleTypeConstructor :: TypeConstructor
20doubleTypeConstructor = PrimitiveTypeConstructor "Double" DoubleAtomType
22textTypeConstructor :: TypeConstructor
23textTypeConstructor = PrimitiveTypeConstructor "Text" TextAtomType
25dayTypeConstructor :: TypeConstructor
26dayTypeConstructor = PrimitiveTypeConstructor "Day" DayAtomType
28-- | Return the type of an 'Atom'.
29atomTypeForAtom :: Atom -> AtomType
30atomTypeForAtom (IntAtom _) = IntAtomType
31atomTypeForAtom (IntegerAtom _) = IntegerAtomType
32atomTypeForAtom (DoubleAtom _) = DoubleAtomType
33atomTypeForAtom (TextAtom _) = TextAtomType
34atomTypeForAtom (DayAtom _) = DayAtomType
35atomTypeForAtom (DateTimeAtom _) = DateTimeAtomType
36atomTypeForAtom (ByteStringAtom _) = ByteStringAtomType
37atomTypeForAtom (BoolAtom _) = BoolAtomType
38atomTypeForAtom (IntervalAtom a _ _ _) = IntervalAtomType (atomTypeForAtom a)
39atomTypeForAtom (RelationAtom (Relation attrs _)) = RelationAtomType attrs
40atomTypeForAtom (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