| Safe Haskell | None | 
|---|---|
| Language | Haskell2010 | 
Agda.TypeChecking.Rules.LHS
Synopsis
- checkLeftHandSide :: forall a. Call -> Maybe QName -> [NamedArg Pattern] -> Type -> Maybe Substitution -> [ProblemEq] -> (LHSResult -> TCM a) -> TCM a
 - data LHSResult = LHSResult {}
 - bindAsPatterns :: [AsBinding] -> TCM a -> TCM a
 - class IsFlexiblePattern a where
- maybeFlexiblePattern :: a -> MaybeT TCM FlexibleVarKind
 - isFlexiblePattern :: a -> TCM Bool
 
 - checkSortOfSplitVar :: (MonadTCM m, MonadReduce m, MonadError TCErr m, ReadTCState m, MonadDebug m, LensSort a, PrettyTCM a, LensSort ty, PrettyTCM ty) => DataOrRecord -> a -> Maybe ty -> m ()
 
Documentation
Arguments
| :: Call | Trace, e.g.   | 
| -> Maybe QName | The name of the definition we are checking.  | 
| -> [NamedArg Pattern] | The patterns.  | 
| -> Type | The expected type   | 
| -> Maybe Substitution | Module parameter substitution from with-abstraction.  | 
| -> [ProblemEq] | Patterns that have been stripped away by with-desugaring. ^ These should not contain any proper matches.  | 
| -> (LHSResult -> TCM a) | Continuation.  | 
| -> TCM a | 
Check a LHS. Main function.
checkLeftHandSide a ps a ret checks that user patterns ps eliminate
   the type a of the defined function, and calls continuation ret
   if successful.
Result of checking the LHS of a clause.
Constructors
| LHSResult | |
Fields 
  | |
Instances
| InstantiateFull LHSResult Source # | |
Defined in Agda.TypeChecking.Rules.LHS  | |
class IsFlexiblePattern a where Source #
A pattern is flexible if it is dotted or implicit, or a record pattern with only flexible subpatterns.
Minimal complete definition
Methods
maybeFlexiblePattern :: a -> MaybeT TCM FlexibleVarKind Source #
isFlexiblePattern :: a -> TCM Bool Source #
Instances
| IsFlexiblePattern Pattern Source # | |
Defined in Agda.TypeChecking.Rules.LHS Methods maybeFlexiblePattern :: Pattern -> MaybeT TCM FlexibleVarKind Source #  | |
| IsFlexiblePattern a => IsFlexiblePattern [a] Source # | Lists of flexible patterns are   | 
Defined in Agda.TypeChecking.Rules.LHS Methods maybeFlexiblePattern :: [a] -> MaybeT TCM FlexibleVarKind Source # isFlexiblePattern :: [a] -> TCM Bool Source #  | |
| IsFlexiblePattern a => IsFlexiblePattern (Arg a) Source # | |
Defined in Agda.TypeChecking.Rules.LHS Methods maybeFlexiblePattern :: Arg a -> MaybeT TCM FlexibleVarKind Source #  | |
| IsFlexiblePattern (Pattern' a) Source # | |
Defined in Agda.TypeChecking.Rules.LHS Methods maybeFlexiblePattern :: Pattern' a -> MaybeT TCM FlexibleVarKind Source #  | |
| IsFlexiblePattern a => IsFlexiblePattern (Named name a) Source # | |
Defined in Agda.TypeChecking.Rules.LHS Methods maybeFlexiblePattern :: Named name a -> MaybeT TCM FlexibleVarKind Source #  | |
checkSortOfSplitVar :: (MonadTCM m, MonadReduce m, MonadError TCErr m, ReadTCState m, MonadDebug m, LensSort a, PrettyTCM a, LensSort ty, PrettyTCM ty) => DataOrRecord -> a -> Maybe ty -> m () Source #