unison-core1-0.0.0
Safe HaskellSafe-Inferred
LanguageHaskell2010

Unison.Pattern

Documentation

data Pattern loc Source #

Constructors

Unbound loc 
Var loc 
Boolean loc !Bool 
Int loc !Int64 
Nat loc !Word64 
Float loc !Double 
Text loc !Text 
Char loc !Char 
Constructor loc !ConstructorReference [Pattern loc] 
As loc (Pattern loc) 
EffectPure loc (Pattern loc) 
EffectBind loc !ConstructorReference [Pattern loc] (Pattern loc) 
SequenceLiteral loc [Pattern loc] 
SequenceOp loc (Pattern loc) !SeqOp (Pattern loc) 

Instances

Instances details
Foldable Pattern Source # 
Instance details

Defined in Unison.Pattern

Methods

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

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

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

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

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

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

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

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

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

toList :: Pattern a -> [a] #

null :: Pattern a -> Bool #

length :: Pattern a -> Int #

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

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

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

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

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

Traversable Pattern Source # 
Instance details

Defined in Unison.Pattern

Methods

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

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

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

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

Functor Pattern Source # 
Instance details

Defined in Unison.Pattern

Methods

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

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

Generic (Pattern loc) Source # 
Instance details

Defined in Unison.Pattern

Associated Types

type Rep (Pattern loc) :: Type -> Type #

Methods

from :: Pattern loc -> Rep (Pattern loc) x #

to :: Rep (Pattern loc) x -> Pattern loc #

Show (Pattern loc) Source # 
Instance details

Defined in Unison.Pattern

Methods

showsPrec :: Int -> Pattern loc -> ShowS #

show :: Pattern loc -> String #

showList :: [Pattern loc] -> ShowS #

Eq (Pattern loc) Source # 
Instance details

Defined in Unison.Pattern

Methods

(==) :: Pattern loc -> Pattern loc -> Bool #

(/=) :: Pattern loc -> Pattern loc -> Bool #

Ord loc => Ord (Pattern loc) Source # 
Instance details

Defined in Unison.Pattern

Methods

compare :: Pattern loc -> Pattern loc -> Ordering #

(<) :: Pattern loc -> Pattern loc -> Bool #

(<=) :: Pattern loc -> Pattern loc -> Bool #

(>) :: Pattern loc -> Pattern loc -> Bool #

(>=) :: Pattern loc -> Pattern loc -> Bool #

max :: Pattern loc -> Pattern loc -> Pattern loc #

min :: Pattern loc -> Pattern loc -> Pattern loc #

type Rep (Pattern loc) Source # 
Instance details

Defined in Unison.Pattern

type Rep (Pattern loc) = D1 ('MetaData "Pattern" "Unison.Pattern" "unison-core1-0.0.0-Kp7ZcNnt5XdB8ImvFwyntI" 'False) (((C1 ('MetaCons "Unbound" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 loc)) :+: (C1 ('MetaCons "Var" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 loc)) :+: C1 ('MetaCons "Boolean" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 loc) :*: S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 Bool)))) :+: ((C1 ('MetaCons "Int" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 loc) :*: S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 Int64)) :+: C1 ('MetaCons "Nat" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 loc) :*: S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 Word64))) :+: (C1 ('MetaCons "Float" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 loc) :*: S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 Double)) :+: C1 ('MetaCons "Text" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 loc) :*: S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 Text))))) :+: ((C1 ('MetaCons "Char" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 loc) :*: S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 Char)) :+: (C1 ('MetaCons "Constructor" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 loc) :*: (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 ConstructorReference) :*: S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 [Pattern loc]))) :+: C1 ('MetaCons "As" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 loc) :*: S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 (Pattern loc))))) :+: ((C1 ('MetaCons "EffectPure" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 loc) :*: S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 (Pattern loc))) :+: C1 ('MetaCons "EffectBind" 'PrefixI 'False) ((S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 loc) :*: S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 ConstructorReference)) :*: (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 [Pattern loc]) :*: S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 (Pattern loc))))) :+: (C1 ('MetaCons "SequenceLiteral" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 loc) :*: S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 [Pattern loc])) :+: C1 ('MetaCons "SequenceOp" 'PrefixI 'False) ((S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 loc) :*: S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 (Pattern loc))) :*: (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 SeqOp) :*: S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 (Pattern loc))))))))

data SeqOp Source #

Constructors

Cons 
Snoc 
Concat 

Instances

Instances details
Generic SeqOp Source # 
Instance details

Defined in Unison.Pattern

Associated Types

type Rep SeqOp :: Type -> Type #

Methods

from :: SeqOp -> Rep SeqOp x #

to :: Rep SeqOp x -> SeqOp #

Show SeqOp Source # 
Instance details

Defined in Unison.Pattern

Methods

showsPrec :: Int -> SeqOp -> ShowS #

show :: SeqOp -> String #

showList :: [SeqOp] -> ShowS #

Eq SeqOp Source # 
Instance details

Defined in Unison.Pattern

Methods

(==) :: SeqOp -> SeqOp -> Bool #

(/=) :: SeqOp -> SeqOp -> Bool #

Ord SeqOp Source # 
Instance details

Defined in Unison.Pattern

Methods

compare :: SeqOp -> SeqOp -> Ordering #

(<) :: SeqOp -> SeqOp -> Bool #

(<=) :: SeqOp -> SeqOp -> Bool #

(>) :: SeqOp -> SeqOp -> Bool #

(>=) :: SeqOp -> SeqOp -> Bool #

max :: SeqOp -> SeqOp -> SeqOp #

min :: SeqOp -> SeqOp -> SeqOp #

type Rep SeqOp Source # 
Instance details

Defined in Unison.Pattern

type Rep SeqOp = D1 ('MetaData "SeqOp" "Unison.Pattern" "unison-core1-0.0.0-Kp7ZcNnt5XdB8ImvFwyntI" 'False) (C1 ('MetaCons "Cons" 'PrefixI 'False) (U1 :: Type -> Type) :+: (C1 ('MetaCons "Snoc" 'PrefixI 'False) (U1 :: Type -> Type) :+: C1 ('MetaCons "Concat" 'PrefixI 'False) (U1 :: Type -> Type)))

loc :: Pattern loc -> loc Source #

setLoc :: Pattern loc -> loc -> Pattern loc Source #

foldMap' :: Monoid m => (Pattern loc -> m) -> Pattern loc -> m Source #

generalizedDependencies :: Ord r => (Reference -> r) -> (Reference -> ConstructorId -> r) -> (Reference -> r) -> (Reference -> ConstructorId -> r) -> (Reference -> r) -> Pattern loc -> Set r Source #