Perl 6 Types

This is a list of all built-in Types that are documented here as part of the Perl 6 language. Use the above menu to narrow it down topically.

Name Declarator Source
AST class Abstract representation of a piece of source code
Any class Thing/object
Arguments role
Array class Sequence of itemized values
Associative role Object that supports looking up values by key
Attribute class Member variable
Backtrace class Snapshot of the dynamic call stack
Backtrace::Frame class Single frame of a
Bag class Immutable collection of distinct objects with integer weights
BagHash class Mutable collection of distinct objects with integer weights
Baggy role Collection of distinct weighted objects
Blob role Immutable buffer for binary data ('Binary Large OBject')
Block class Code object with its own lexical scope
Bool enum Logical boolean
Buf role Mutable buffer for binary data
CallFrame class Capturing current frame state
Callable role Invocable code object
Cancellation class Removal of a task from a Scheduler before normal completion
Capture class Argument list suitable for passing to a
Channel class Thread-safe queue for sending values from producers to consumers
Code class Code object
Complex class Complex number
ComplexStr class Dual Value Complex number and String
Cool class Value that can be treated as a string or number interchangeably
CurrentThreadScheduler class Scheduler that blockingly executes code on the current thread
Cursor class Internal state of the regex engine during parsing
Date class Calendar date
DateTime class Calendar date with time
Dateish role Object that can be treated as a date
Duration class Length of time
Exception class Anomalous event capable of interrupting normal control-flow
Failure class Delayed exception
FatRat class Rational number (arbitrary-precision)
Grammar class Group of named regexes that form a formal grammar
Hash class Mapping from strings to itemized values
IO role Input/output related object
IO::Handle class Opened file or stream
IO::Notification class Asynchronous notification for file and directory changes
IO::Path class File or directory path
IO::Pipe class Buffered inter-process string or binary stream
IO::Socket role Network socket
IO::Socket::Async class Asynchronous TCP socket
IO::Socket::INET class TCP Socket
IO::Spec class Platform specific operations on file and directory paths
IO::Spec::Cygwin class Platform specific operations on file and directory paths for Cygwin
IO::Spec::QNX class Platform specific operations on file and directory paths QNX
IO::Spec::Unix class Platform specific operations on file and directory paths for POSIX
IO::Spec::Win32 class Platform specific operations on file and directory paths for Windows
IO::Special role Represent a Standard I/O device
Instant class Specific moment in time
Int class Integer (arbitrary-precision)
IntStr class Dual Value Integer and String
Iterable role Interface for container objects that can be iterated over
Iterator role Generic API for producing a sequence of values
Junction class Logical superposition of values
Label class Tagged location in the source code
List class Sequence of values
Lock class Low-level thread locking primitive
Macro class Compile-time routine
Map class Immutable mapping from strings to values
Match class Result of a successful regex match
Metamodel::AttributeContainer role Metaobject that can hold attributes
Metamodel::C3MRO role Metaobject that supports the C3 method resolution order
Metamodel::ClassHOW class Metaobject representing a Perl 6 class.
Metamodel::Finalization role Metaobject supporting object finalization
Metamodel::MROBasedMethodDispatch role Metaobject that supports resolving inherited methods
Metamodel::MethodContainer role Metaobject that supports storing and introspecting methods
Metamodel::MultipleInheritance role Metaobject that supports multiple inheritance
Metamodel::Naming role Metaobject that supports named types
Metamodel::Primitives class Metaobject that supports low-level type operations
Metamodel::PrivateMethodContainer role Metaobject that supports private methods
Metamodel::RoleContainer role Metaobject that supports holding/containing roles
Metamodel::Trusting role Metaobject that supports trust relations between types
Method class Member function
Mix class Immutable collection of distinct objects with Real weights
MixHash class Mutable collection of distinct objects with Real weights
Mixy role Collection of distinct objects with Real weights
Mu class The root of the Perl 6 type hierarchy.
NFC class Codepoint-String in Normal Form C (Composed)
NFD class Codepoint-String in Normal Form D (Decomposed)
NFKC class Codepoint-String in Normal Form KC (Compatibility Composed)
NFKD class Codepoint-String in Normal Form KD (Compatibility Decomposed)
Nil class Absence of a value or a benign failure
Num class Floating-point number
NumStr class Dual Value Floating-point number and String
Numeric role Number or object that can act as a number
ObjAt class Unique identification for an object
Order enum Human readable form for comparison operators.
Pair class Key/value pair
Parameter class Element of a
Pod::Block class Block in a Pod document
Pod::Block::Code class Verbatim code block in a Pod document
Pod::Block::Named class Named block in a Pod document
Pod::Block::Para class Paragraph in a Pod document
Pod::Item class Item in a Pod enumeration list
Positional role Object that supports looking up values by index
PositionalBindFailover role Failover for binding an Iterable to a Positional
Proc class Running process (filehandle-based interface)
Proc::Async class Running process (asynchronous interface)
Promise class Status/result of an asynchronous computation
Proxy class Item container with custom storage and retrieval
QuantHash role Collection of objects represented as hash keys
Range class Interval of ordered values
Rat class Rational number (limited-precision)
RatStr class Dual Value Rational number and String
Rational role Number stored as numerator and denominator
Real role Non-complex number
Regex class String pattern
Routine class Code object with its own lexical scope and `return` handling
Scalar class A mostly transparent container used for indirections
Scheduler role Scheme for automatically assigning tasks to threads
Semaphore class Control access to shared resources by multiple processes
Seq class An iterable, lazy sequence of values
Set class Immutable collection of distinct objects
SetHash class Mutable collection of distinct objects
Setty role Collection of distinct objects
Signature class Parameter list pattern
Slip class A kind of List that automatically flattens into an outer container
Stash class Table for "our"-scoped symbols
Str class String of characters
Stringy role String or object that can act as a string
Sub class Subroutine
Submethod class Member function that is not inherited by subclasses
Supplier class Live
Supply class Asynchronous data stream with multiple subscribers
Tap class Subscription to a Supply
Thread class Concurrent execution of code (low-level)
ThreadPoolScheduler class Scheduler that distributes work among a pool of threads
UInt class Unsigned Integer (arbitrary-precision)
Uni class A string of Unicode codepoints
Variable class Object representation of a variable for use in traits
Version class Module version descriptor
Whatever class Placeholder for an unspecified value/argument
WhateverCode class Code object constructed by Whatever-currying
WrapHandle class Holds all information needed to unwrap a wrapped routine.
X::AdHoc class Error with a custom error message
X::Anon::Augment class Compilation error due to augmenting an anonymous package
X::Anon::Multi class Compilation error due to declaring an anonymous multi
X::Assignment::RO class Exception thrown when trying to assign to something read-only
X::Attribute::NoPackage class Compilation error due to declaring an attribute outside of a package
X::Attribute::Package class Compilation error due to declaring an attribute in an ineligible package
X::Attribute::Undeclared class Compilation error due to an undeclared attribute
X::Augment::NoSuchType class Compilation error due to augmenting a non-existing type
X::Bind class Error due to binding to something that is not a variable or container
X::Bind::NativeType class Compilation error due to binding to a natively typed variable
X::Bind::Slice class Error due to binding to a slice
X::Caller::NotDynamic class Error while trying to access a non dynamic variable through CALLER
X::Channel::ReceiveOnClosed class Error due to calling
X::Channel::SendOnClosed class Error due to calling
X::Comp role Common role for compile-time errors
X::Composition::NotComposable class Compilation error due to composing an ineligible type
X::Constructor::Positional class Error due to passing positional arguments to a default constructor
X::ControlFlow class Error due to calling a loop control command in an ineligible scope
X::ControlFlow::Return class Error due to calling return outside a routine
X::DateTime::TimezoneClash class Error due to using both timezone offset and :timezone
X::Declaration::Scope class Compilation error due to a declaration with an ineligible scope
X::Declaration::Scope::Multi class Compilation error due to declaring a multi with an ineligible scope
X::Does::TypeObject class Error due to mixing into a type object
X::Eval::NoSuchLang class Error due to specifying an unknown language for EVAL
X::Export::NameClash class Compilation error due to exporting the same symbol twice
X::IO role IO related error
X::IO::Chdir class Error while trying to change the working directory
X::IO::Chmod class Error while trying to change file permissions
X::IO::Copy class Error while trying to copy a file
X::IO::Cwd class Error while trying to determine the current working directory
X::IO::Dir class Error while trying to get a directory's contents
X::IO::DoesNotExist class Error while doing file tests on a non existing path
X::IO::Link class Error while trying to create a link
X::IO::Mkdir class Error while trying to create a directory
X::IO::Move class Error while trying to move a file
X::IO::Rename class Error while trying to rename a file or directory
X::IO::Rmdir class Error while trying to remove a directory
X::IO::Symlink class Error while trying to create a symbolic link
X::IO::Unlink class Error while trying to remove a file
X::Inheritance::NotComposed class Error due to inheriting from a type that's not composed yet
X::Inheritance::Unsupported class Compilation error due to inheriting from an ineligible type
X::Method::InvalidQualifier class Error due to calling a qualified method from an ineligible class
X::Method::NotFound class Error due to calling a method that isn't there
X::Method::Private::Permission class Compilation error due to calling a private method without permission
X::Method::Private::Unqualified class Compilation error due to an unqualified private method call
X::Mixin::NotComposable class Error due to using an ineligible type as a mixin
X::NYI class Error due to use of an unimplemented feature
X::NoDispatcher class Error due to calling a dispatch command in an ineligible scope
X::Numeric::Real class Error while trying to coerce a number to a Real type
X::OS role Error reported by the operating system
X::Obsolete class Compilation error due to use of obsolete syntax
X::OutOfRange class Error due to indexing outside of an allowed range
X::Package::Stubbed class Compilation error due to a stubbed package that is never defined
X::Parameter::Default class Compilation error due to an unallowed default value in a signature
X::Parameter::MultipleTypeConstraints class Compilation error due to a parameter with multiple type constraints
X::Parameter::Placeholder class Compilation error due to an unallowed placeholder in a signature
X::Parameter::Twigil class Compilation error due to an unallowed twigil in a signature
X::Parameter::WrongOrder class Compilation error due to passing parameters in the wrong order
X::Phaser::Multiple class Compilation error due to multiple phasers of the same type
X::Phaser::PrePost class Error due to a false return value of a PRE/POST phaser
X::Placeholder::Block class Compilation error due to a placeholder in an ineligible block
X::Placeholder::Mainline class Compilation error due to a placeholder in the mainline
X::Pod role Pod related error
X::Proc::Async role Exception thrown by
X::Proc::Async::AlreadyStarted class Error due to calling
X::Proc::Async::CharsOrBytes class Error due to tapping the same
X::Proc::Async::MustBeStarted class Error due to interacting with a
X::Proc::Async::OpenForWriting class Error due to writing to a read-only
X::Proc::Async::TapBeforeSpawn class Error due to tapping a Proc::Async stream after spawning its process
X::Promise::CauseOnlyValidOnBroken class Error due to asking why an unbroken promise has been broken.
X::Promise::Vowed class Error due to directly trying to keep/break a vowed promise.
X::Redeclaration class Compilation error due to declaring an already declared symbol
X::Role::Initialization class Error due to passing an initialization value to an ineligible role
X::Seq::Consumed class Error due to trying to reuse a consumed sequence
X::Sequence::Deduction class Error due to constructing a sequence from ineligible input
X::Signature::NameClash class Compilation error due to two named parameters with the same name
X::Signature::Placeholder class Compilation error due to placeholders in a block with a signature
X::Str::Numeric class Error while trying to coerce a string to a number
X::StubCode class Runtime error due to execution of stub code
X::Syntax role Syntax error thrown by the compiler
X::Syntax::Augment::WithoutMonkeyTyping class Compilation error due to augmenting a type without `MONKEY-TYPING`
X::Syntax::Comment::Embedded class Compilation error due to a malformed inline comment
X::Syntax::Confused class Compilation error due to unrecognized syntax
X::Syntax::InfixInTermPosition class Compilation error due to an infix in term position
X::Syntax::Malformed class Compilation error due to a malformed construct (usually a declarator)
X::Syntax::Missing class Compilation error due to a missing piece of syntax
X::Syntax::NegatedPair class Compilation error due to passing an argument to a negated colonpair
X::Syntax::NoSelf class Compilation error due to implicitly using a `self` that is not there
X::Syntax::Number::RadixOutOfRange class Compilation error due to an unallowed radix in a number literal
X::Syntax::P5 class Compilation error due to use of Perl 5-only syntax
X::Syntax::Regex::Adverb class Compilation error due to an unrecognized regex adverb
X::Syntax::Regex::SolitaryQuantifier class Compilation error due to a regex quantifier without preceding atom
X::Syntax::Reserved class Compilation error due to use of syntax reserved for future use
X::Syntax::Self::WithoutObject class Compilation error due to invoking `self` in an ineligible scope
X::Syntax::Signature::InvocantMarker class Compilation error due to a misplaced invocant marker in a signature
X::Syntax::Term::MissingInitializer class Compilation error due to declaring a term without initialization
X::Syntax::UnlessElse class Compilation error due to an `unless` clause followed by `else`
X::Syntax::Variable::Match class Compilation error due to declaring a match variable
X::Syntax::Variable::Numeric class Compilation error due to declaring a numeric symbol
X::Syntax::Variable::Twigil class Compilation error due to an unallowed twigil in a declaration
X::Temporal class Error related to DateTime or Date
X::Temporal::InvalidFormat class Error due to using an invalid format when creating a DateTime or Date
X::TypeCheck class Error due to a failed type check
X::TypeCheck::Assignment class Error due to a failed type check during assignment
X::TypeCheck::Binding class Error due to a failed type check during binding
X::TypeCheck::Return class Error due to a failed typecheck during `return`
X::TypeCheck::Splice class Compilation error due to a macro trying to splice a non-AST value
X::Undeclared class Compilation error due to an undeclared symbol
int class Integer (native storage; machine precision)