Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[ refactor ] Generalize types of conversion checker & checkInternal
- Loading branch information
1 parent
0da2467
commit 86120bd
Showing
9 changed files
with
233 additions
and
162 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,17 +1,39 @@ | ||
{-# LANGUAGE KindSignatures #-} | ||
|
||
module Agda.TypeChecking.CheckInternal where | ||
|
||
import Agda.Syntax.Internal | ||
import Agda.TypeChecking.Monad.Base (TCM) | ||
import Agda.TypeChecking.Monad | ||
import Agda.TypeChecking.Monad.Builtin (HasBuiltins) | ||
import Agda.TypeChecking.Monad.Statistics (MonadStatistics) | ||
import Agda.TypeChecking.Warnings | ||
import Agda.Utils.Except ( MonadError ) | ||
|
||
type MonadCheckInternal m = | ||
( MonadReduce m | ||
, MonadAddContext m | ||
, MonadConstraint m | ||
, MonadMetaSolver m | ||
, MonadError TCErr m | ||
, MonadWarning m | ||
, MonadDebug m | ||
, MonadStatistics m | ||
, MonadFresh ProblemId m | ||
, MonadFresh Int m | ||
, HasBuiltins m | ||
, HasConstInfo m | ||
, HasOptions m | ||
) | ||
|
||
data Action | ||
data Action (m :: * -> *) | ||
|
||
defaultAction :: Action | ||
eraseUnusedAction :: Action | ||
defaultAction :: Monad m => Action m | ||
eraseUnusedAction :: Action TCM | ||
|
||
checkType :: Type -> TCM () | ||
checkType' :: Type -> TCM Sort | ||
checkSort :: Action -> Sort -> TCM Sort | ||
checkInternal :: Term -> Type -> TCM () | ||
checkInternal' :: Action -> Term -> Type -> TCM Term | ||
infer :: Term -> TCM Type | ||
shouldBeSort :: Type -> TCM Sort | ||
checkType :: (MonadCheckInternal m) => Type -> m () | ||
checkType' :: (MonadCheckInternal m) => Type -> m Sort | ||
checkSort :: (MonadCheckInternal m) => Action m -> Sort -> m Sort | ||
checkInternal :: (MonadCheckInternal m) => Term -> Type -> m () | ||
checkInternal' :: (MonadCheckInternal m) => Action m -> Term -> Type -> m Term | ||
infer :: (MonadCheckInternal m) => Term -> m Type | ||
shouldBeSort :: (MonadCheckInternal m) => Type -> m Sort |
Oops, something went wrong.