Safe Haskell | Safe-Inferred |
---|---|
Language | Haskell2010 |
Compute eta short normal forms.
Synopsis
- data BinAppView
- binAppView :: Term -> BinAppView
- etaContract :: (MonadTCEnv m, HasConstInfo m, HasOptions m, TermLike a) => a -> m a
- etaOnce :: (MonadTCEnv m, HasConstInfo m, HasOptions m) => Term -> m Term
- etaCon :: (MonadTCEnv m, HasConstInfo m, HasOptions m) => ConHead -> ConInfo -> Elims -> (QName -> ConHead -> ConInfo -> Args -> m Term) -> m Term
- etaLam :: (MonadTCEnv m, HasConstInfo m, HasOptions m) => ArgInfo -> ArgName -> Term -> m Term
Documentation
binAppView :: Term -> BinAppView Source #
etaContract :: (MonadTCEnv m, HasConstInfo m, HasOptions m, TermLike a) => a -> m a Source #
Contracts all eta-redexes it sees without reducing.
etaOnce :: (MonadTCEnv m, HasConstInfo m, HasOptions m) => Term -> m Term Source #
:: (MonadTCEnv m, HasConstInfo m, HasOptions m) | |
=> ConHead | Constructor name |
-> ConInfo | Constructor info |
-> Elims | Constructor arguments |
-> (QName -> ConHead -> ConInfo -> Args -> m Term) | Eta-contraction workhorse, gets also name of record type. |
-> m Term | Returns |
If record constructor, call eta-contraction function.
:: (MonadTCEnv m, HasConstInfo m, HasOptions m) | |
=> ArgInfo | Info |
-> ArgName | Name |
-> Term | |
-> m Term |
|
Try to contract a lambda-abstraction Lam i (Abs x b)
.