Wikifunctions:Type
Appearance
| General overviews |
|---|
| User-facing features |
| Back-end specifics |
Every Object in Wikifunctions belongs to a Type. Types decide how Objects of that Type are structured, and what they mean. Types are also used to specify the Arguments of a Function, and what a Function returns.
Currently, there are 71 Types that are available for specifying the Arguments and the return Type of a Function:
- Object (Z1): the root concept of an item in the Wikifunctions system, from which all other objects descend
- Type (Z4): A class of Z1/Object, with a set list of Z3/Keys.
- Function (Z8): A concept of a computable resource, which through its Z14/Implementations and Z20/Testers can let you make a calculation or perform some other task.
- Nothing (Z23): No instances of this are allowed.
- Unit (Z21): type that can take only a single value
- Boolean (Z40): Either 'true' or 'false', and is one of the fundamental Z4/Types available in the Wikifunctions system
- Kleenean (Z22112): logic values consisting of true, false and maybe
- Typed list (Z881): A list containing items of the same type ( this is parameterised i.e. it is a Function which returns a Type)
- Typed pair (Z882): A type that holds a pair of types ( parameterised)
- Typed map (Z883): an unordered list of elements, each containing a unique key that points to the element's contained value ( parameterised)
- Typed enum of Wikidata references (Z6884): Description missing ( parameterised, used for defining lightweight enumeration types)
Numeric types
- Byte (Z80): Description missing
- Natural number (Z13518): an arbitrarily-large whole number, either zero or positive
- Sign (Z16659): The sign of a number
- Integer (Z16683): arbitrarily large whole numbers, including negative ones and 0. 0 is the only value allowed to have a neutral sign (and it must have that sign; positive and negative 0 are possible but not valid)
- Rational number (Z19677): a signed ratio of two Natural numbers (equivalent to a ratio of integers) not necessarily with the simplest representation
- Floating point special value (Z20825): Description missing
- float64 (Z20838): Representation of a number in 64 bits, under IEEE 754, with a floating radix point.
Language and text types
- Unicode code point (Z86): A single code point in Unicode
- String (Z6): A sequence of characters, and one of the fundamental Z4/Types available in the Wikifunctions system.
- Natural language (Z60): language naturally spoken by humans
- Monolingual text (Z11): A Z6/String of text in a given Z60/Natural language, used to label things for humans to read.
- Monolingual stringset (Z31): A sequence of Z6/Strings in a given Z60/Natural language, used to document multiple human-readable labels for something, like aliases.
- Multilingual text (Z12): A list of Z11/MonolingualStrings, up to one for each Z60/Natural language, used to label things for humans to read in multiple languages.
- Multilingual stringset (Z32): A list of Z31/Monolingual stringsets, up to one for each Z60/Natural language, used to document multiple labels for humans to read in multiple languages.
- HTML fragment (Z89): Description missing
- Function option for a list of languages (Z14293): Description missing
- Configuration of functions for given languages (Z14294): Description missing
Grammatical feature enums
- Grammatical definiteness (Z28516): Description missing ( lightweight enum)
- Grammatical case (Nom/Gen/Dat/Acc) (Z28519): Description missing ( lightweight enum)
- Grammatical gender (c/n) (Z25502): "Lightweight enum type" with common and neuter grammatical genders ( lightweight enum)
- Grammatical gender (m/f) (Z25340): Description missing ( lightweight enum)
- Grammatical gender (m/f/n) (Z25501): "Lightweight enum type" including masculine, feminine, and neuter genders ( lightweight enum)
- grammatical animacy (animate / inanimate) (Z26935): Description missing ( lightweight enum)
- Grammatical number (singular / plural) (Z26934): Description missing ( lightweight enum)
- Grammatical number (singular / dual / plural) (Z28215): three-valued grammatical number system (1, 2, >2) ( lightweight enum)
- Grammatical number (singular / paucal / multal) (Z28515): Description missing ( lightweight enum)
- Grammatical voice (active / passive) (Z28517): Description missing ( lightweight enum)
- Grammatical person (3) (Z27970): The three persons (speaker, addressee, and others) used in many languages. ( lightweight enum)
- Grammatical polarity (affirmative / negation) (Z28518): Description missing ( lightweight enum)
- Grammatical degree of comparison (pos/comp/super) (Z28520): Description missing ( lightweight enum)
- Celtic mutation (Z27971): consonant mutation in Celtic languages (Breton, Cornish, Irish Gaelic, Scottish Gaelic, Welsh) ( lightweight enum)
Calendar types
Gregorian calendar
- Day of the week (Z17402): The seven days of the week in many calendars
- Gregorian calendar month (Z16098): The twelve calendar months of the Gregorian and Julian calendars
- Gregorian era (Z17813): represents the two eras in the Gregorian calendar
- Gregorian year (Z20159): Numbered years according to the proleptic Gregorian calendar
- Day of Roman year (Z20342): A day of the month and a month of the Gregorian calendar
- Gregorian calendar date (Z20420): A date in the proleptic Gregorian calendar
Hijri (Islamic) calendar
- Hijri calendar month (Z26582): The twelve lunar months of the Islamic calendar ( lightweight enum)
Igbo calendar
Wikidata types
See also: Help:Wikidata#Statement model
Wikidata entities
- Wikidata item (Z6001): An item on Wikidata reference by a QID
- Wikidata property (Z6002): Represents a Property as per the Wikidata data model
- Wikidata lexeme form (Z6004): Description missing
- Wikidata lexeme (Z6005): Type for the lexeme data structure in Wikidata
- Wikidata lexeme sense (Z6006): A sense of a Wikidata lexeme
Wikidata references
- Wikidata item reference (Z6091): A link to a Wikidata item, using the item's Wikidata ID (QID)
- Wikidata property reference (Z6092): A link to a Wikidata property, using the property's Wikidata ID (PID)
- Wikidata lexeme form reference (Z6094): A link to a Wikidata lexeme form, using the form's Wikidata ID (LFID)
- Wikidata lexeme reference (Z6095): A link to a Wikidata lexeme, using the lexeme's Wikidata ID (LID)
- Wikidata lexeme sense reference (Z6096): A link to a Wikidata lexeme sense, using the sense's Wikidata ID (LSID)
Wikidata statements
- Wikidata claim subtype (Z6020): Either Z6021/'value', Z6022/'no value', or Z6023/'some value' (as on Wikidata); used with Z6003/Wikidata statement and Z6007/Wikidata property claim
- Wikidata property claim (Z6007): Description missing
- Wikidata statement (Z6003): A statement on Wikidata, including its subject, predicate, value and rank. Subjects can be LIDs, LFIDs, LSIDs, QIDs.
- Wikidata statement rank (Z6040): Either 'preferred', 'normal', or 'deprecated' (as on Wikidata)
- Wikidata reference (Z6008): Description missing
Wikidata datatypes
- Wikidata quantity (Z6010): Corresponds to https://www.mediawiki.org/wiki/Wikibase/DataModel#Quantities
- Wikidata geo-coordinate (Z6011): Corresponds to https://www.mediawiki.org/wiki/Wikibase/DataModel#Geographic_locations
- Time of day (Z6060): Description missing
- Wikidata datetime (Z6061): the first key is of type Gregorian calendar date or Julian calendar date (when it's available).
- Wikidata time precision (Z6062): Enum type; uses item references for values documented at https://www.mediawiki.org/wiki/Wikibase/DataModel#Dates_and_times ( lightweight enum)
- Wikidata calendar model (Z6063): Description missing ( lightweight enum)
- Wikidata time (Z6064): Corresponds to https://www.mediawiki.org/wiki/Wikibase/DataModel#Dates_and_times
Miscellaneous
WikiLambda structure
- Persistent object (Z2): A Z1/Object which is stored persistently on the Wikifunctions wiki.
- Reference (Z9): A link to another Z1/Object.
- Key (Z3): A referenced key/value pair within a Z4/Type.
- Key reference (Z39): Description missing
- Type converter to code (Z46): A function that converts an instance of a Wikifunctions type into one understood by a programming language
- Type converter from code (Z64): A function that converts an instance of a programming language's type into a Wikifunctions one
- Argument declaration (Z17): A specification of what an input to a Z8/Function should be.
- Argument reference (Z18): A link to an input to a Z7/Function call, or placeholder for one.
- Test case (Z20): A special call to a Z8/Function used to check if a Z14/Implementation returns the expected result.
- Implementation (Z14): An implementation of a Z8/Function which can be checked as working through its Z20/Test cases and if working can be used in a Z7/Function call.
- Code (Z16): A block of code for a Z14/Implementation.
- Programming language (Z61): Description missing
Evaluation
- Function call (Z7): A call to a Z8/Function, including its inputs.
- Evaluation result (Z22): The result of a Z7/Function call
- Error (Z5): An error where something has gone wrong in the system, such as when you use a Z40/Boolean function on a Z6/String, or try to edit something that is locked.
- Error type (Z50): Description missing
- Quote (Z99): Description missing
Other types can be used but there may be bugs. For a list of all types, see the list of all types (though that does not include persistent calls which return types, such as the lightweight enums, nor parameterised types such as Typed list (Z881)).
New Types can be proposed on Wikifunctions:Type proposals.