on c0554e0 help sign in
19 lines 754 B history raw
1{-# LANGUAGE OverloadedStrings #-}
2-- wraps up primitives plus other basic data types
3module ProjectM36.DataTypes.Basic where
4import ProjectM36.DataTypes.Primitive
5import ProjectM36.Base
7basicTypeConstructorMapping :: TypeConstructorMapping
8basicTypeConstructorMapping = primitiveTypeConstructorMapping ++ moreTypes
9 where
10 moreTypes = [(ADTypeConstructorDef "Day" ["a"],
11 [DataConstructorDef "Day" [DataConstructorDefTypeConstructorArg (PrimitiveTypeConstructor "Int" intAtomType)]]),
12 (ADTypeConstructorDef "Maybe" ["a"],
13 [DataConstructorDef "Nothing" [],
14 DataConstructorDef "Just" [DataConstructorDefTypeVarNameArg "a"]])
15 ]