Type family (original) (raw)
In computer science, a type family associates data types with other data types, using a type-level function defined by an open-ended collection of valid instances of input types and the corresponding output types. Programming languages with support for type families or similar features include Haskell (with a common language extension), Standard ML (through its module system), Scala (under the name "abstract types"), and C++ (through use of typedefs in templates).
Property | Value |
---|---|
dbo:abstract | In computer science, a type family associates data types with other data types, using a type-level function defined by an open-ended collection of valid instances of input types and the corresponding output types. Type families are a feature of some type systems that allow partial functions between types to be defined by pattern matching. This is in contrast to data type constructors, which define injective functions from all types of a particular kind to a new set of types, and type synonyms (a.k.a. typedef), which define functions from all types of a particular kind to another existing set of types using a single case. Type families and type classes are closely related: normal type classes define partial functions from types to a collection of named values by pattern matching on the input types, while type families define partial functions from types to types by pattern matching on the input types. In fact, in many uses of type families there is a single type class which logically contains both values and types associated with each instance. A type family declared inside a type class is called an associated type. Programming languages with support for type families or similar features include Haskell (with a common language extension), Standard ML (through its module system), Scala (under the name "abstract types"), and C++ (through use of typedefs in templates). (en) |
dbo:wikiPageExternalLink | http://www.haskell.org/haskellwiki/GHC/Type_families |
dbo:wikiPageID | 38573159 (xsd:integer) |
dbo:wikiPageLength | 9175 (xsd:nonNegativeInteger) |
dbo:wikiPageRevisionID | 969434216 (xsd:integer) |
dbo:wikiPageWikiLink | dbr:Scala_(programming_language) dbr:Boolean_data_type dbc:Articles_with_example_Haskell_code dbr:Design_pattern dbr:Function_(mathematics) dbr:Glasgow_Haskell_Compiler dbr:Standard_ML dbr:Computer_science dbr:Ordered_pair dbc:Functional_programming dbr:C++ dbr:Type_system dbr:Data_structure dbr:Abstract_data_type dbr:Algebraic_data_type dbc:Data_types dbr:Data_type dbr:Kind_(type_theory) dbr:Model–view–controller dbr:Type_class dbr:Haskell_(programming_language) dbr:Array_data_structure dbr:Array_data_type dbc:Type_theory dbr:Codomain dbr:Pattern_matching dbr:Programming_language dbr:Typedef dbr:Injective dbr:Type_constructor dbr:Parameterized_type dbr:Bit_vector |
dbp:wikiPageUsesTemplate | dbt:About dbt:Reflist |
dcterms:subject | dbc:Articles_with_example_Haskell_code dbc:Functional_programming dbc:Data_types dbc:Type_theory |
gold:hypernym | dbr:Feature |
rdf:type | dbo:Work |
rdfs:comment | In computer science, a type family associates data types with other data types, using a type-level function defined by an open-ended collection of valid instances of input types and the corresponding output types. Programming languages with support for type families or similar features include Haskell (with a common language extension), Standard ML (through its module system), Scala (under the name "abstract types"), and C++ (through use of typedefs in templates). (en) |
rdfs:label | Type family (en) |
owl:sameAs | freebase:Type family wikidata:Type family https://global.dbpedia.org/id/4wQz7 |
prov:wasDerivedFrom | wikipedia-en:Type_family?oldid=969434216&ns=0 |
foaf:isPrimaryTopicOf | wikipedia-en:Type_family |
is dbo:wikiPageRedirects of | dbr:Type_families dbr:Associated_type dbr:Associated_types |
is dbo:wikiPageWikiLink of | dbr:PureScript dbr:Coronostomatoidea dbr:Type_class dbr:Twelf dbr:Henry_Lewis_Bullen dbr:Noritoidea dbr:Type_families dbr:Associated_type dbr:Associated_types |
is foaf:primaryTopic of | wikipedia-en:Type_family |