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