HORIZON HASKELLDocslts/ghc-10.0.x77a86622026-10-31Search packagesCtrl K
Theme: |

GHC 10.0.0.20260917 · lts/ghc-10.0.x · 77a8662 · 2026-10-31

ModuleAgda-2.8.0.2Haskell2010

Agda.TypeChecking.Positivity.Occurrence

Occurrences.

Synopsis
  • PackageAgda-2.8.0.2
  • Exports7
  • LanguageHaskell2010
  • LicenceMIT
  • SourceOccurrence.hs
datadata Occurrence

Subterm occurrences for positivity checking. The constructors are listed in increasing information they provide: Mixed <= JustPos <= StrictPos <= GuardPos <= Unused Mixed <= JustNeg <= Unused.

Constructors

  • Mixed

    Arbitrary occurrence (positive and negative).

  • JustNeg

    Negative occurrence.

  • JustPos

    Positive occurrence, but not strictly positive.

  • StrictPos

    Strictly positive occurrence.

  • GuardPos

    Guarded strictly positive occurrence (i.e., under ∞). For checking recursive records.

  • Unused
Instances16Bounded, Enum, Eq, Ord, Show, NFData, …
datadata OccursWhere

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.

Instances12Eq, Ord, Show, Generic, NFData, Pretty, …
datadata Where

One part of the description of an occurrence.

Constructors

Instances7Eq, Ord, Show, Generic, NFData, Pretty, …
valueproductOfEdgesInBoundedWalk
  1. :: (SemiRing e, Ord n)
  2. => e -> Occurrence
  3. -> Graph n e
  4. -> n
  5. -> n
  6. -> Occurrence
  7. -> Maybe e

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.