| Safe Haskell | None |
|---|---|
| Language | Haskell2010 |
Agda.TypeChecking.Positivity.Warnings
Synopsis
- data OccursWhere = OccursWhere Range (Seq Where) (Seq Where)
- data Where
- boundToEverySome :: Map Occurrence [(Occurrence -> Bool, Occurrence -> Bool)]
- productOfEdgesInBoundedWalk :: (SemiRing e, Ord n) => (e -> Occurrence) -> Graph n e -> n -> n -> Occurrence -> Maybe e
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
One part of the description of an occurrence.
Constructors
| LeftOfArrow | |
| DefArg QName Nat | in the nth argument of a define constant |
| UnderInf | in the principal argument of built-in ∞ |
| VarArg Occurrence 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 | is an index of an inductive family |
| InDefOf QName | in the definition of a constant |
Instances
| Pretty Where Source # | |||||
| NFData Where Source # | |||||
Defined in Agda.TypeChecking.Positivity.Warnings | |||||
| Eq Where Source # | |||||
| Ord Where Source # | |||||
| Generic Where Source # | |||||
Defined in Agda.TypeChecking.Positivity.Warnings Associated Types
| |||||
| Show Where Source # | |||||
| type Rep Where Source # | |||||
Defined in Agda.TypeChecking.Positivity.Warnings type Rep Where = D1 ('MetaData "Where" "Agda.TypeChecking.Positivity.Warnings" "Agda-2.9.0-inplace" '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 "UnderInf" 'PrefixI 'False) (U1 :: Type -> Type))) :+: (C1 ('MetaCons "VarArg" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 Occurrence) :*: 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)))))) | |||||
boundToEverySome :: Map Occurrence [(Occurrence -> Bool, Occurrence -> Bool)] Source #
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 . In this case the returned value is
foldr1 otimes
(map occ c) <= bound for one such walk Just (foldr1 otimes c)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.