Mikan
Safe HaskellNone
LanguageHaskell2010

Mikan.TypeChecking.Positivity.Warnings

Synopsis

Documentation

data OccursWhere Source #

Description of an occurrence.

Constructors

OccursWhere Range (Seq Where) (Seq Where)

The elements of the sequences, read from left to right, explain how to get to the occurrence. The second sequence includes the main information, and if the first sequence is non-empty, then it includes information about the context of the second sequence.

Instances

Instances details
Pretty OccursWhere Source # 
Instance details

Defined in Mikan.TypeChecking.Positivity.Warnings

Null OccursWhere Source # 
Instance details

Defined in Mikan.TypeChecking.Positivity.Warnings

NFData OccursWhere Source # 
Instance details

Defined in Mikan.TypeChecking.Positivity.Warnings

Methods

rnf :: OccursWhere -> () #

Generic OccursWhere Source # 
Instance details

Defined in Mikan.TypeChecking.Positivity.Warnings

Associated Types

type Rep OccursWhere 
Instance details

Defined in Mikan.TypeChecking.Positivity.Warnings

type Rep OccursWhere = D1 ('MetaData "OccursWhere" "Mikan.TypeChecking.Positivity.Warnings" "Mikan-2.9.0-CZbYRMbHmng2A9zjJ31VFu" 'False) (C1 ('MetaCons "OccursWhere" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 Range) :*: (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 (Seq Where)) :*: S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 (Seq Where)))))
Show OccursWhere Source # 
Instance details

Defined in Mikan.TypeChecking.Positivity.Warnings

Eq OccursWhere Source # 
Instance details

Defined in Mikan.TypeChecking.Positivity.Warnings

Ord OccursWhere Source # 
Instance details

Defined in Mikan.TypeChecking.Positivity.Warnings

PrettyTCM (Seq OccursWhere) Source # 
Instance details

Defined in Mikan.TypeChecking.Positivity

type Rep OccursWhere Source # 
Instance details

Defined in Mikan.TypeChecking.Positivity.Warnings

type Rep OccursWhere = D1 ('MetaData "OccursWhere" "Mikan.TypeChecking.Positivity.Warnings" "Mikan-2.9.0-CZbYRMbHmng2A9zjJ31VFu" 'False) (C1 ('MetaCons "OccursWhere" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 Range) :*: (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 (Seq Where)) :*: S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 (Seq Where)))))

data Where Source #

One part of the description of an occurrence.

Constructors

LeftOfArrow 
DefArg QName Nat

in the nth argument of a define constant

VarArg Nat

as an argument to a bound variable.

MetaArg

as an argument of a metavariable

ConArgType QName

in the type of a constructor

IndArgType QName

in a datatype index of a constructor

ConEndpoint QName

in an endpoint of a higher constructor

InClause Nat

in the nth clause of a defined function

Matched

matched against in a clause of a defined function

InIndex

in an index of an inductive family

InDefOf QName

in the definition of a constant

InLevel

in a sort expression. printed as "a universe level"

Instances

Instances details
Pretty Where Source # 
Instance details

Defined in Mikan.TypeChecking.Positivity.Warnings

NFData Where Source # 
Instance details

Defined in Mikan.TypeChecking.Positivity.Warnings

Methods

rnf :: Where -> () #

Generic Where Source # 
Instance details

Defined in Mikan.TypeChecking.Positivity.Warnings

Associated Types

type Rep Where 
Instance details

Defined in Mikan.TypeChecking.Positivity.Warnings

type Rep Where = D1 ('MetaData "Where" "Mikan.TypeChecking.Positivity.Warnings" "Mikan-2.9.0-CZbYRMbHmng2A9zjJ31VFu" 'False) (((C1 ('MetaCons "LeftOfArrow" 'PrefixI 'False) (U1 :: Type -> Type) :+: (C1 ('MetaCons "DefArg" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 QName) :*: S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 Nat)) :+: C1 ('MetaCons "VarArg" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 Nat)))) :+: (C1 ('MetaCons "MetaArg" 'PrefixI 'False) (U1 :: Type -> Type) :+: (C1 ('MetaCons "ConArgType" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 QName)) :+: C1 ('MetaCons "IndArgType" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 QName))))) :+: ((C1 ('MetaCons "ConEndpoint" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 QName)) :+: (C1 ('MetaCons "InClause" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 Nat)) :+: C1 ('MetaCons "Matched" 'PrefixI 'False) (U1 :: Type -> Type))) :+: (C1 ('MetaCons "InIndex" 'PrefixI 'False) (U1 :: Type -> Type) :+: (C1 ('MetaCons "InDefOf" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 QName)) :+: C1 ('MetaCons "InLevel" 'PrefixI 'False) (U1 :: Type -> Type)))))

Methods

from :: Where -> Rep Where x #

to :: Rep Where x -> Where #

Show Where Source # 
Instance details

Defined in Mikan.TypeChecking.Positivity.Warnings

Methods

showsPrec :: Int -> Where -> ShowS #

show :: Where -> String #

showList :: [Where] -> ShowS #

Eq Where Source # 
Instance details

Defined in Mikan.TypeChecking.Positivity.Warnings

Methods

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

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

Ord Where Source # 
Instance details

Defined in Mikan.TypeChecking.Positivity.Warnings

Methods

compare :: Where -> Where -> Ordering #

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

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

(>) :: Where -> Where -> Bool #

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

max :: Where -> Where -> Where #

min :: Where -> Where -> Where #

type Rep Where Source # 
Instance details

Defined in Mikan.TypeChecking.Positivity.Warnings

type Rep Where = D1 ('MetaData "Where" "Mikan.TypeChecking.Positivity.Warnings" "Mikan-2.9.0-CZbYRMbHmng2A9zjJ31VFu" 'False) (((C1 ('MetaCons "LeftOfArrow" 'PrefixI 'False) (U1 :: Type -> Type) :+: (C1 ('MetaCons "DefArg" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 QName) :*: S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 Nat)) :+: C1 ('MetaCons "VarArg" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 Nat)))) :+: (C1 ('MetaCons "MetaArg" 'PrefixI 'False) (U1 :: Type -> Type) :+: (C1 ('MetaCons "ConArgType" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 QName)) :+: C1 ('MetaCons "IndArgType" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 QName))))) :+: ((C1 ('MetaCons "ConEndpoint" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 QName)) :+: (C1 ('MetaCons "InClause" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 Nat)) :+: C1 ('MetaCons "Matched" 'PrefixI 'False) (U1 :: Type -> Type))) :+: (C1 ('MetaCons "InIndex" 'PrefixI 'False) (U1 :: Type -> Type) :+: (C1 ('MetaCons "InDefOf" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 QName)) :+: C1 ('MetaCons "InLevel" 'PrefixI 'False) (U1 :: Type -> Type)))))

boundToEverySome :: Map Occurrence [(Occurrence -> Bool, Occurrence -> Bool)] Source #

The map contains bindings of the form bound |-> ess, satisfying the following property: for every non-empty list w, foldr1 otimes w <= bound iff or [ all every w && any some w | (every, some) <- ess ].

productOfEdgesInBoundedWalk :: (SemiRing e, Ord n) => (e -> Occurrence) -> Graph n e -> n -> n -> Occurrence -> Maybe e Source #

productOfEdgesInBoundedWalk occ g u v bound returns a value distinct from Nothing iff there is a walk c (a list of edges) in g, from u to v, for which the product foldr1 otimes (map occ c) <= bound. In this case the returned value is Just (foldr1 otimes c) for one such walk c.

Preconditions: u and v must belong to g, and bound must belong to the domain of boundToEverySome.

There is a property for this function in Internal.Utils.Graph.AdjacencyMap.Unidirectional.