purescript-0.15.9: PureScript Programming Language Compiler
Safe HaskellSafe-Inferred
LanguageHaskell2010

Language.PureScript.Types

Description

Data types for types

Synopsis

Documentation

newtype SkolemScope Source #

An identifier for the scope of a skolem variable

Constructors

SkolemScope 

Fields

Instances

Instances details
FromJSON SkolemScope Source # 
Instance details

Defined in Language.PureScript.Types

ToJSON SkolemScope Source # 
Instance details

Defined in Language.PureScript.Types

Generic SkolemScope Source # 
Instance details

Defined in Language.PureScript.Types

Associated Types

type Rep SkolemScope :: Type -> Type #

Show SkolemScope Source # 
Instance details

Defined in Language.PureScript.Types

NFData SkolemScope Source # 
Instance details

Defined in Language.PureScript.Types

Methods

rnf :: SkolemScope -> () #

Eq SkolemScope Source # 
Instance details

Defined in Language.PureScript.Types

Ord SkolemScope Source # 
Instance details

Defined in Language.PureScript.Types

Serialise SkolemScope Source # 
Instance details

Defined in Language.PureScript.Types

type Rep SkolemScope Source # 
Instance details

Defined in Language.PureScript.Types

type Rep SkolemScope = D1 ('MetaData "SkolemScope" "Language.PureScript.Types" "purescript-0.15.9-73KndBh0GamC7RCYwFLhcE" 'True) (C1 ('MetaCons "SkolemScope" 'PrefixI 'True) (S1 ('MetaSel ('Just "runSkolemScope") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 Int)))

data WildcardData Source #

Describes how a TypeWildcard should be presented to the user during type checking: holes (?foo) are always emitted as errors, whereas unnamed wildcards (_) default to warnings, but are ignored entirely if they are contained by a binding with a complete (wildcard-free) type signature.

Instances

Instances details
FromJSON WildcardData Source # 
Instance details

Defined in Language.PureScript.Types

ToJSON WildcardData Source # 
Instance details

Defined in Language.PureScript.Types

Generic WildcardData Source # 
Instance details

Defined in Language.PureScript.Types

Associated Types

type Rep WildcardData :: Type -> Type #

Show WildcardData Source # 
Instance details

Defined in Language.PureScript.Types

NFData WildcardData Source # 
Instance details

Defined in Language.PureScript.Types

Methods

rnf :: WildcardData -> () #

Eq WildcardData Source # 
Instance details

Defined in Language.PureScript.Types

Ord WildcardData Source # 
Instance details

Defined in Language.PureScript.Types

Serialise WildcardData Source # 
Instance details

Defined in Language.PureScript.Types

type Rep WildcardData Source # 
Instance details

Defined in Language.PureScript.Types

type Rep WildcardData = D1 ('MetaData "WildcardData" "Language.PureScript.Types" "purescript-0.15.9-73KndBh0GamC7RCYwFLhcE" 'False) (C1 ('MetaCons "HoleWildcard" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 Text)) :+: (C1 ('MetaCons "UnnamedWildcard" 'PrefixI 'False) (U1 :: Type -> Type) :+: C1 ('MetaCons "IgnoredWildcard" 'PrefixI 'False) (U1 :: Type -> Type)))

data Type a Source #

The type of types

Constructors

TUnknown a Int

A unification variable of type Type

TypeVar a Text

A named type variable

TypeLevelString a PSString

A type-level string

TypeLevelInt a Integer

A type-level natural

TypeWildcard a WildcardData

A type wildcard, as would appear in a partial type synonym

TypeConstructor a (Qualified (ProperName 'TypeName))

A type constructor

TypeOp a (Qualified (OpName 'TypeOpName))

A type operator. This will be desugared into a type constructor during the "operators" phase of desugaring.

TypeApp a (Type a) (Type a)

A type application

KindApp a (Type a) (Type a)

Explicit kind application

ForAll a Text (Maybe (Type a)) (Type a) (Maybe SkolemScope)

Forall quantifier

ConstrainedType a (Constraint a) (Type a)

A type with a set of type class constraints

Skolem a Text (Maybe (Type a)) Int SkolemScope

A skolem constant

REmpty a

An empty row

RCons a Label (Type a) (Type a)

A non-empty row

KindedType a (Type a) (Type a)

A type with a kind annotation

BinaryNoParensType a (Type a) (Type a) (Type a)

Binary operator application. During the rebracketing phase of desugaring, this data constructor will be removed.

ParensInType a (Type a)

Explicit parentheses. During the rebracketing phase of desugaring, this data constructor will be removed.

Note: although it seems this constructor is not used, it _is_ useful, since it prevents certain traversals from matching.

Instances

Instances details
Foldable Type Source # 
Instance details

Defined in Language.PureScript.Types

Methods

fold :: Monoid m => Type m -> m #

foldMap :: Monoid m => (a -> m) -> Type a -> m #

foldMap' :: Monoid m => (a -> m) -> Type a -> m #

foldr :: (a -> b -> b) -> b -> Type a -> b #

foldr' :: (a -> b -> b) -> b -> Type a -> b #

foldl :: (b -> a -> b) -> b -> Type a -> b #

foldl' :: (b -> a -> b) -> b -> Type a -> b #

foldr1 :: (a -> a -> a) -> Type a -> a #

foldl1 :: (a -> a -> a) -> Type a -> a #

toList :: Type a -> [a] #

null :: Type a -> Bool #

length :: Type a -> Int #

elem :: Eq a => a -> Type a -> Bool #

maximum :: Ord a => Type a -> a #

minimum :: Ord a => Type a -> a #

sum :: Num a => Type a -> a #

product :: Num a => Type a -> a #

Traversable Type Source # 
Instance details

Defined in Language.PureScript.Types

Methods

traverse :: Applicative f => (a -> f b) -> Type a -> f (Type b) #

sequenceA :: Applicative f => Type (f a) -> f (Type a) #

mapM :: Monad m => (a -> m b) -> Type a -> m (Type b) #

sequence :: Monad m => Type (m a) -> m (Type a) #

Functor Type Source # 
Instance details

Defined in Language.PureScript.Types

Methods

fmap :: (a -> b) -> Type a -> Type b #

(<$) :: a -> Type b -> Type a #

FromJSON (Type SourceAnn) Source # 
Instance details

Defined in Language.PureScript.Types

FromJSON (Type ()) Source # 
Instance details

Defined in Language.PureScript.Types

Methods

parseJSON :: Value -> Parser (Type ()) #

parseJSONList :: Value -> Parser [Type ()] #

FromJSON a => FromJSON (Type a) Source # 
Instance details

Defined in Language.PureScript.Types

ToJSON a => ToJSON (Type a) Source # 
Instance details

Defined in Language.PureScript.Types

Generic (Type a) Source # 
Instance details

Defined in Language.PureScript.Types

Associated Types

type Rep (Type a) :: Type -> Type #

Methods

from :: Type a -> Rep (Type a) x #

to :: Rep (Type a) x -> Type a #

Show a => Show (Type a) Source # 
Instance details

Defined in Language.PureScript.Types

Methods

showsPrec :: Int -> Type a -> ShowS #

show :: Type a -> String #

showList :: [Type a] -> ShowS #

NFData a => NFData (Type a) Source # 
Instance details

Defined in Language.PureScript.Types

Methods

rnf :: Type a -> () #

Eq (Type a) Source # 
Instance details

Defined in Language.PureScript.Types

Methods

(==) :: Type a -> Type a -> Bool #

(/=) :: Type a -> Type a -> Bool #

Ord (Type a) Source # 
Instance details

Defined in Language.PureScript.Types

Methods

compare :: Type a -> Type a -> Ordering #

(<) :: Type a -> Type a -> Bool #

(<=) :: Type a -> Type a -> Bool #

(>) :: Type a -> Type a -> Bool #

(>=) :: Type a -> Type a -> Bool #

max :: Type a -> Type a -> Type a #

min :: Type a -> Type a -> Type a #

Serialise a => Serialise (Type a) Source # 
Instance details

Defined in Language.PureScript.Types

Methods

encode :: Type a -> Encoding #

decode :: Decoder s (Type a) #

encodeList :: [Type a] -> Encoding #

decodeList :: Decoder s [Type a] #

type Rep (Type a) Source # 
Instance details

Defined in Language.PureScript.Types

type Rep (Type a) = D1 ('MetaData "Type" "Language.PureScript.Types" "purescript-0.15.9-73KndBh0GamC7RCYwFLhcE" 'False) ((((C1 ('MetaCons "TUnknown" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 a) :*: S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 Int)) :+: C1 ('MetaCons "TypeVar" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 a) :*: S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 Text))) :+: (C1 ('MetaCons "TypeLevelString" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 a) :*: S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 PSString)) :+: C1 ('MetaCons "TypeLevelInt" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 a) :*: S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 Integer)))) :+: ((C1 ('MetaCons "TypeWildcard" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 a) :*: S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 WildcardData)) :+: C1 ('MetaCons "TypeConstructor" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 a) :*: S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 (Qualified (ProperName 'TypeName))))) :+: (C1 ('MetaCons "TypeOp" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 a) :*: S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 (Qualified (OpName 'TypeOpName)))) :+: C1 ('MetaCons "TypeApp" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 a) :*: (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 (Type a)) :*: S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 (Type a))))))) :+: (((C1 ('MetaCons "KindApp" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 a) :*: (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 (Type a)) :*: S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 (Type a)))) :+: C1 ('MetaCons "ForAll" 'PrefixI 'False) ((S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 a) :*: S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 Text)) :*: (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 (Maybe (Type a))) :*: (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 (Type a)) :*: S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 (Maybe SkolemScope)))))) :+: (C1 ('MetaCons "ConstrainedType" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 a) :*: (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 (Constraint a)) :*: S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 (Type a)))) :+: C1 ('MetaCons "Skolem" 'PrefixI 'False) ((S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 a) :*: S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 Text)) :*: (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 (Maybe (Type a))) :*: (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 Int) :*: S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 SkolemScope)))))) :+: ((C1 ('MetaCons "REmpty" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 a)) :+: C1 ('MetaCons "RCons" 'PrefixI 'False) ((S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 a) :*: S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 Label)) :*: (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 (Type a)) :*: S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 (Type a))))) :+: (C1 ('MetaCons "KindedType" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 a) :*: (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 (Type a)) :*: S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 (Type a)))) :+: (C1 ('MetaCons "BinaryNoParensType" 'PrefixI 'False) ((S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 a) :*: S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 (Type a))) :*: (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 (Type a)) :*: S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 (Type a)))) :+: C1 ('MetaCons "ParensInType" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 a) :*: S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 (Type a))))))))

pattern REmptyKinded :: forall a. a -> Maybe (Type a) -> Type a Source #

toREmptyKinded :: forall a. Type a -> Maybe (a, Maybe (Type a)) Source #

isREmpty :: forall a. Type a -> Bool Source #

data ConstraintData Source #

Additional data relevant to type class constraints

Constructors

PartialConstraintData [[Text]] Bool

Data to accompany a Partial constraint generated by the exhaustivity checker. It contains (rendered) binder information for those binders which were not matched, and a flag indicating whether the list was truncated or not. Note: we use Text here because using Binder would introduce a cyclic dependency in the module graph.

Instances

Instances details
FromJSON ConstraintData Source # 
Instance details

Defined in Language.PureScript.Types

ToJSON ConstraintData Source # 
Instance details

Defined in Language.PureScript.Types

Generic ConstraintData Source # 
Instance details

Defined in Language.PureScript.Types

Associated Types

type Rep ConstraintData :: Type -> Type #

Show ConstraintData Source # 
Instance details

Defined in Language.PureScript.Types

NFData ConstraintData Source # 
Instance details

Defined in Language.PureScript.Types

Methods

rnf :: ConstraintData -> () #

Eq ConstraintData Source # 
Instance details

Defined in Language.PureScript.Types

Ord ConstraintData Source # 
Instance details

Defined in Language.PureScript.Types

Serialise ConstraintData Source # 
Instance details

Defined in Language.PureScript.Types

type Rep ConstraintData Source # 
Instance details

Defined in Language.PureScript.Types

type Rep ConstraintData = D1 ('MetaData "ConstraintData" "Language.PureScript.Types" "purescript-0.15.9-73KndBh0GamC7RCYwFLhcE" 'False) (C1 ('MetaCons "PartialConstraintData" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 [[Text]]) :*: S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 Bool)))

data Constraint a Source #

A typeclass constraint

Constructors

Constraint 

Fields

Instances

Instances details
Foldable Constraint Source # 
Instance details

Defined in Language.PureScript.Types

Methods

fold :: Monoid m => Constraint m -> m #

foldMap :: Monoid m => (a -> m) -> Constraint a -> m #

foldMap' :: Monoid m => (a -> m) -> Constraint a -> m #

foldr :: (a -> b -> b) -> b -> Constraint a -> b #

foldr' :: (a -> b -> b) -> b -> Constraint a -> b #

foldl :: (b -> a -> b) -> b -> Constraint a -> b #

foldl' :: (b -> a -> b) -> b -> Constraint a -> b #

foldr1 :: (a -> a -> a) -> Constraint a -> a #

foldl1 :: (a -> a -> a) -> Constraint a -> a #

toList :: Constraint a -> [a] #

null :: Constraint a -> Bool #

length :: Constraint a -> Int #

elem :: Eq a => a -> Constraint a -> Bool #

maximum :: Ord a => Constraint a -> a #

minimum :: Ord a => Constraint a -> a #

sum :: Num a => Constraint a -> a #

product :: Num a => Constraint a -> a #

Traversable Constraint Source # 
Instance details

Defined in Language.PureScript.Types

Methods

traverse :: Applicative f => (a -> f b) -> Constraint a -> f (Constraint b) #

sequenceA :: Applicative f => Constraint (f a) -> f (Constraint a) #

mapM :: Monad m => (a -> m b) -> Constraint a -> m (Constraint b) #

sequence :: Monad m => Constraint (m a) -> m (Constraint a) #

Functor Constraint Source # 
Instance details

Defined in Language.PureScript.Types

Methods

fmap :: (a -> b) -> Constraint a -> Constraint b #

(<$) :: a -> Constraint b -> Constraint a #

FromJSON (Constraint SourceAnn) Source # 
Instance details

Defined in Language.PureScript.Types

FromJSON (Constraint ()) Source # 
Instance details

Defined in Language.PureScript.Types

FromJSON a => FromJSON (Constraint a) Source # 
Instance details

Defined in Language.PureScript.Types

ToJSON a => ToJSON (Constraint a) Source # 
Instance details

Defined in Language.PureScript.Types

Generic (Constraint a) Source # 
Instance details

Defined in Language.PureScript.Types

Associated Types

type Rep (Constraint a) :: Type -> Type #

Methods

from :: Constraint a -> Rep (Constraint a) x #

to :: Rep (Constraint a) x -> Constraint a #

Show a => Show (Constraint a) Source # 
Instance details

Defined in Language.PureScript.Types

NFData a => NFData (Constraint a) Source # 
Instance details

Defined in Language.PureScript.Types

Methods

rnf :: Constraint a -> () #

Eq (Constraint a) Source # 
Instance details

Defined in Language.PureScript.Types

Methods

(==) :: Constraint a -> Constraint a -> Bool #

(/=) :: Constraint a -> Constraint a -> Bool #

Ord (Constraint a) Source # 
Instance details

Defined in Language.PureScript.Types

Serialise a => Serialise (Constraint a) Source # 
Instance details

Defined in Language.PureScript.Types

type Rep (Constraint a) Source # 
Instance details

Defined in Language.PureScript.Types

type Rep (Constraint a) = D1 ('MetaData "Constraint" "Language.PureScript.Types" "purescript-0.15.9-73KndBh0GamC7RCYwFLhcE" 'False) (C1 ('MetaCons "Constraint" 'PrefixI 'True) ((S1 ('MetaSel ('Just "constraintAnn") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 a) :*: S1 ('MetaSel ('Just "constraintClass") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 (Qualified (ProperName 'ClassName)))) :*: (S1 ('MetaSel ('Just "constraintKindArgs") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 [Type a]) :*: (S1 ('MetaSel ('Just "constraintArgs") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 [Type a]) :*: S1 ('MetaSel ('Just "constraintData") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 (Maybe ConstraintData))))))

overConstraintArgs :: Functor f => ([Type a] -> f [Type a]) -> Constraint a -> f (Constraint a) Source #

typeToJSON :: forall a. (a -> Value) -> Type a -> Value Source #

constraintFromJSON :: forall a. Parser a -> (Value -> Parser a) -> Value -> Parser (Constraint a) Source #

typeFromJSON :: forall a. Parser a -> (Value -> Parser a) -> Value -> Parser (Type a) Source #

data RowListItem a Source #

Constructors

RowListItem 

Instances

Instances details
Foldable RowListItem Source # 
Instance details

Defined in Language.PureScript.Types

Methods

fold :: Monoid m => RowListItem m -> m #

foldMap :: Monoid m => (a -> m) -> RowListItem a -> m #

foldMap' :: Monoid m => (a -> m) -> RowListItem a -> m #

foldr :: (a -> b -> b) -> b -> RowListItem a -> b #

foldr' :: (a -> b -> b) -> b -> RowListItem a -> b #

foldl :: (b -> a -> b) -> b -> RowListItem a -> b #

foldl' :: (b -> a -> b) -> b -> RowListItem a -> b #

foldr1 :: (a -> a -> a) -> RowListItem a -> a #

foldl1 :: (a -> a -> a) -> RowListItem a -> a #

toList :: RowListItem a -> [a] #

null :: RowListItem a -> Bool #

length :: RowListItem a -> Int #

elem :: Eq a => a -> RowListItem a -> Bool #

maximum :: Ord a => RowListItem a -> a #

minimum :: Ord a => RowListItem a -> a #

sum :: Num a => RowListItem a -> a #

product :: Num a => RowListItem a -> a #

Traversable RowListItem Source # 
Instance details

Defined in Language.PureScript.Types

Methods

traverse :: Applicative f => (a -> f b) -> RowListItem a -> f (RowListItem b) #

sequenceA :: Applicative f => RowListItem (f a) -> f (RowListItem a) #

mapM :: Monad m => (a -> m b) -> RowListItem a -> m (RowListItem b) #

sequence :: Monad m => RowListItem (m a) -> m (RowListItem a) #

Functor RowListItem Source # 
Instance details

Defined in Language.PureScript.Types

Methods

fmap :: (a -> b) -> RowListItem a -> RowListItem b #

(<$) :: a -> RowListItem b -> RowListItem a #

Generic (RowListItem a) Source # 
Instance details

Defined in Language.PureScript.Types

Associated Types

type Rep (RowListItem a) :: Type -> Type #

Methods

from :: RowListItem a -> Rep (RowListItem a) x #

to :: Rep (RowListItem a) x -> RowListItem a #

Show a => Show (RowListItem a) Source # 
Instance details

Defined in Language.PureScript.Types

type Rep (RowListItem a) Source # 
Instance details

Defined in Language.PureScript.Types

type Rep (RowListItem a) = D1 ('MetaData "RowListItem" "Language.PureScript.Types" "purescript-0.15.9-73KndBh0GamC7RCYwFLhcE" 'False) (C1 ('MetaCons "RowListItem" 'PrefixI 'True) (S1 ('MetaSel ('Just "rowListAnn") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 a) :*: (S1 ('MetaSel ('Just "rowListLabel") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 Label) :*: S1 ('MetaSel ('Just "rowListType") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 (Type a)))))

rowToList :: Type a -> ([RowListItem a], Type a) Source #

Convert a row to a list of pairs of labels and types

rowToSortedList :: Type a -> ([RowListItem a], Type a) Source #

Convert a row to a list of pairs of labels and types, sorted by the labels.

rowFromList :: ([RowListItem a], Type a) -> Type a Source #

Convert a list of labels and types to a row

alignRowsWith :: (Label -> Type a -> Type a -> r) -> Type a -> Type a -> ([r], (([RowListItem a], Type a), ([RowListItem a], Type a))) Source #

Align two rows of types, splitting them into three parts:

  • Those types which appear in both rows
  • Those which appear only on the left
  • Those which appear only on the right

Note: importantly, we preserve the order of the types with a given label.

isMonoType :: Type a -> Bool Source #

Check whether a type is a monotype

mkForAll :: [(a, (Text, Maybe (Type a)))] -> Type a -> Type a Source #

Universally quantify a type

replaceTypeVars :: Text -> Type a -> Type a -> Type a Source #

Replace a type variable, taking into account variable shadowing

replaceAllTypeVars :: [(Text, Type a)] -> Type a -> Type a Source #

Replace named type variables with types

usedTypeVariables :: Type a -> [Text] Source #

Collect all type variables appearing in a type

freeTypeVariables :: Type a -> [Text] Source #

Collect all free type variables appearing in a type

completeBinderList :: Type a -> Maybe ([(a, (Text, Type a))], Type a) Source #

Collect a complete set of kind-annotated quantifiers at the front of a type.

quantify :: Type a -> Type a Source #

Universally quantify over all type variables appearing free in a type

moveQuantifiersToFront :: Type a -> Type a Source #

Move all universal quantifiers to the front of a type

containsForAll :: Type a -> Bool Source #

Check if a type contains forall

containsUnknowns :: Type a -> Bool Source #

Check if a type contains unknowns in a position that is relevant to constraint solving. (Kinds are not.)

unapplyTypes :: Type a -> (Type a, [Type a], [Type a]) Source #

srcInstanceType :: SourceSpan -> [(Text, SourceType)] -> Qualified (ProperName 'ClassName) -> [SourceType] -> SourceType Source #

Construct the type of an instance declaration from its parts. Used in error messages describing unnamed instances.

everywhereOnTypes :: (Type a -> Type a) -> Type a -> Type a Source #

everywhereOnTypesM :: Monad m => (Type a -> m (Type a)) -> Type a -> m (Type a) Source #

everywhereOnTypesTopDownM :: Monad m => (Type a -> m (Type a)) -> Type a -> m (Type a) Source #

everythingOnTypes :: (r -> r -> r) -> (Type a -> r) -> Type a -> r Source #

everythingWithContextOnTypes :: s -> r -> (r -> r -> r) -> (s -> Type a -> (s, r)) -> Type a -> r Source #

setAnnForType :: a -> Type a -> Type a Source #

eqType :: Type a -> Type b -> Bool Source #