| Safe Haskell | None |
|---|---|
| Language | Haskell2010 |
Agda.TypeChecking.Positivity.Occurrence
Description
Occurrences.
Synopsis
- type PragmaPolarities = List1 (Ranged Occurrence)
- data Occurrence
- modalPolarityToOccurrence :: ModalPolarity -> Occurrence
- data OccursPath
- = Root
- | LeftOfArrow !OccursPath
- | DefArg !OccursPath !QName !Nat
- | MutDefArg !OccursPath !QName !Nat
- | UnderInf !OccursPath
- | VarArg !OccursPath !Nat !Occurrence
- | MetaArg !OccursPath
- | ConArgType !OccursPath !QName
- | IndArgType !OccursPath !QName
- | ConEndpoint !OccursPath !QName
- | InClause !OccursPath !Nat
- | Matched !OccursPath
- | InIndex !OccursPath
- | InDefOf !OccursPath !QName
- data OccursWhere = OccursWhere !Range !OccursPath
- data Node
- data Edge a = Edge !Occurrence !a
- mergeEdges :: Edge a -> Edge a -> Edge a
Documentation
type PragmaPolarities = List1 (Ranged Occurrence) Source #
List of polarities stemming from POLARITY pragma.
data Occurrence Source #
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 | No occurrence. |
Instances
data OccursPath Source #
Constructors
| Root | |
| LeftOfArrow !OccursPath | |
| DefArg !OccursPath !QName !Nat | in the nth argument of a defined constant |
| MutDefArg !OccursPath !QName !Nat | in the nth argument of a def in the current mutual block. (def given by Int index in the block) |
| UnderInf !OccursPath | in the principal argument of built-in ∞ |
| VarArg !OccursPath !Nat !Occurrence | as an argument to a bound variable with given polarity. The polarity is only used for warning printing. |
| MetaArg !OccursPath | as an argument of a metavariable |
| ConArgType !OccursPath !QName | in the type of a constructor |
| IndArgType !OccursPath !QName | in a datatype index of a constructor |
| ConEndpoint !OccursPath !QName | in an endpoint of a higher constructor |
| InClause !OccursPath !Nat | in the nth clause of a defined function |
| Matched !OccursPath | matched against in a clause of a defined function |
| InIndex !OccursPath | is an index of an inductive family |
| InDefOf !OccursPath !QName | in the definition of a constant |
Instances
| Pretty OccursPath Source # | |
Defined in Agda.TypeChecking.Positivity.Occurrence Methods pretty :: OccursPath -> Doc Source # prettyPrec :: Int -> OccursPath -> Doc Source # prettyList :: [OccursPath] -> Doc Source # | |
| NFData OccursPath Source # | |
Defined in Agda.TypeChecking.Positivity.Occurrence Methods rnf :: OccursPath -> () # | |
| Eq OccursPath Source # | |
Defined in Agda.TypeChecking.Positivity.Occurrence | |
| Show OccursPath Source # | |
Defined in Agda.TypeChecking.Positivity.Occurrence Methods showsPrec :: Int -> OccursPath -> ShowS # show :: OccursPath -> String # showList :: [OccursPath] -> ShowS # | |
data OccursWhere Source #
Constructors
| OccursWhere !Range !OccursPath |
Instances
| Pretty OccursWhere Source # | |
Defined in Agda.TypeChecking.Positivity.Occurrence Methods pretty :: OccursWhere -> Doc Source # prettyPrec :: Int -> OccursWhere -> Doc Source # prettyList :: [OccursWhere] -> Doc Source # | |
| Eq OccursWhere Source # | |
Defined in Agda.TypeChecking.Positivity.Occurrence | |
| Show OccursWhere Source # | |
Defined in Agda.TypeChecking.Positivity.Occurrence Methods showsPrec :: Int -> OccursWhere -> ShowS # show :: OccursWhere -> String # showList :: [OccursWhere] -> ShowS # | |
| PrettyTCMWithNode (Edge OccursWhere) Source # | |
Defined in Agda.TypeChecking.Positivity.OccurrenceAnalysis Methods prettyTCMWithNode :: (PrettyTCM n, MonadPretty m) => WithNode n (Edge OccursWhere) -> m Doc Source # | |
Constructors
| DefNode QName | Definition site of a mutual definition |
| ArgNode QName Int | Occurrence of the nth definition argument inside the definition. |
Constructors
| Edge !Occurrence !a |
Instances
| Functor Edge Source # | |
| PrettyTCMWithNode (Edge OccursWhere) Source # | |
Defined in Agda.TypeChecking.Positivity.OccurrenceAnalysis Methods prettyTCMWithNode :: (PrettyTCM n, MonadPretty m) => WithNode n (Edge OccursWhere) -> m Doc Source # | |
| Pretty a => PrettyTCMWithNode (Edge a) Source # | |
Defined in Agda.TypeChecking.Positivity Methods prettyTCMWithNode :: (PrettyTCM n, MonadPretty m) => WithNode n (Edge a) -> m Doc Source # | |
| Monoid a => SemiRing (Edge a) Source # | |
| Eq a => Eq (Edge a) Source # | |
| Ord a => Ord (Edge a) Source # | |
Defined in Agda.TypeChecking.Positivity.Occurrence | |
| Show a => Show (Edge a) Source # | |