coreTypes :: DS.DeclarationSet TypeDeclaration
coreTypes =
    -- number types
    [ decl' "bigint" Bigint String
    , decl' "decimal" Decimal String
    , decl' "int32" Int32 Number
    , decl' "int64" Int64 Number
    , decl' "float32" Float32 Number
    , decl' "float64" Float64 Number
    -- string types
    , decl' "text" Text String
    , decl' "binary" Binary String
    -- time types
    , decl' "date" Date String
    , decl' "datetime" Datetime String
    -- et cetera
    , decl' "bool" Bool Boolean
    , decl' "uuid" Uuid String
    , decl' "url" Url String
    -- FIXME: deprecated
    , decl' "uri" Url String
    ]
  where
    decl' name prim json =
        TypeDeclaration { typename = name
                        , type' = PrimitiveType prim json
                        , typeAnnotations = empty
                        }
coreTypes :: DS.DeclarationSet TypeDeclaration
coreTypes =
    -- number types
    [ decl' "bigint" Bigint String
    , decl' "decimal" Decimal String
    , decl' "int32" Int32 Number
    , decl' "int64" Int64 Number
    , decl' "float32" Float32 Number
    , decl' "float64" Float64 Number
    -- string types
    , decl' "text" Text String
    , decl' "binary" Binary String
    -- time types
    , decl' "date" Date String
    , decl' "datetime" Datetime String
    -- et cetera
    , decl' "bool" Bool Boolean
    , decl' "uuid" Uuid String
    , decl' "url" Url String
    -- FIXME: deprecated
    , decl' "uri" Url String
    ]
  where
    decl' name prim json =
        TypeDeclaration { typename = name
                        , type' = PrimitiveType prim json
                        , typeAnnotations = empty
                        }
coreTypes =
    -- number types
    [ decl' "bigint" Bigint String
    , decl' "decimal" Decimal String
    , decl' "int32" Int32 Number
    , decl' "int64" Int64 Number
    , decl' "float32" Float32 Number
    , decl' "float64" Float64 Number
    -- string types
    , decl' "text" Text String
    , decl' "binary" Binary String
    -- time types
    , decl' "date" Date String
    , decl' "datetime" Datetime String
    -- et cetera
    , decl' "bool" Bool Boolean
    , decl' "uuid" Uuid String
    , decl' "url" Url String
    -- FIXME: deprecated
    , decl' "uri" Url String
    ]
  where
    decl' name prim json =
        TypeDeclaration { typename = name
                        , type' = PrimitiveType prim json
                        , typeAnnotations = empty
                        }