inventory-0.1.0.0: Project statistics and definition analysis
Safe HaskellNone
LanguageHaskell2010

MatchSigs.Sig

Synopsis

Documentation

data Sig varIx Source #

The internal representation of a type. Function types are represented as a linked list with the init elems being the context followed by arguments of the function and the last being the result type.

Constructors

TyDescriptor !FastString !(Maybe Name) 
FreeVar !varIx 
Arg ![Sig varIx] 
Qual ![Sig varIx] 
Apply ![Sig varIx] ![[Sig varIx]] 
VarCtx ![varIx] 
Tuple ![[Sig varIx]] 
KindSig ![Sig varIx] ![Sig varIx] 

Instances

Instances details
Functor Sig Source # 
Instance details

Defined in MatchSigs.Sig

Methods

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

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

Foldable Sig Source # 
Instance details

Defined in MatchSigs.Sig

Methods

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

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

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

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

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

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

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

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

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

toList :: Sig a -> [a] #

null :: Sig a -> Bool #

length :: Sig a -> Int #

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

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

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

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

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

Eq varIx => Eq (Sig varIx) Source # 
Instance details

Defined in MatchSigs.Sig

Methods

(==) :: Sig varIx -> Sig varIx -> Bool #

(/=) :: Sig varIx -> Sig varIx -> Bool #

Ord varIx => Ord (Sig varIx) Source # 
Instance details

Defined in MatchSigs.Sig

Methods

compare :: Sig varIx -> Sig varIx -> Ordering #

(<) :: Sig varIx -> Sig varIx -> Bool #

(<=) :: Sig varIx -> Sig varIx -> Bool #

(>) :: Sig varIx -> Sig varIx -> Bool #

(>=) :: Sig varIx -> Sig varIx -> Bool #

max :: Sig varIx -> Sig varIx -> Sig varIx #

min :: Sig varIx -> Sig varIx -> Sig varIx #

Show varIx => Show (Sig varIx) Source # 
Instance details

Defined in MatchSigs.Sig

Methods

showsPrec :: Int -> Sig varIx -> ShowS #

show :: Sig varIx -> String #

showList :: [Sig varIx] -> ShowS #

sigsFromHie :: HieAST a -> Map Name [Sig FreeVarIdx] Source #

Produce a Map from function Names to their type signature's internal representation.

sigFingerprint :: [Sig a] -> [Sig ()] Source #

Used to produce an orderable key for matching up signatures that are likely to be equivalent. To allow for this, free vars must be homogenized which is what void does here.