Safe Haskell | Safe-Inferred |
---|---|
Language | Haskell2010 |
Synopsis
- data CommandState = CommandState {}
- type OldInteractionScopes = Map InteractionId ScopeInfo
- initCommandState :: CommandQueue -> CommandState
- data CurrentFile = CurrentFile {}
- data Command' a
- type Command = Command' IOTCM
- type IOTCM = Maybe TopLevelModuleName -> IOTCM' Range
- data CommandQueue = CommandQueue {}
- type Interaction = Interaction' Range
- data Interaction' range
- = Cmd_load FilePath [String]
- | Cmd_compile CompilerBackend FilePath [String]
- | Cmd_constraints
- | Cmd_metas Rewrite
- | Cmd_no_metas
- | Cmd_show_module_contents_toplevel Rewrite String
- | Cmd_search_about_toplevel Rewrite String
- | Cmd_solveAll Rewrite
- | Cmd_solveOne Rewrite InteractionId range String
- | Cmd_autoOne Rewrite InteractionId range String
- | Cmd_autoAll Rewrite
- | Cmd_infer_toplevel Rewrite String
- | Cmd_compute_toplevel ComputeMode String
- | Cmd_load_highlighting_info FilePath
- | Cmd_tokenHighlighting FilePath Remove
- | Cmd_highlight InteractionId range String
- | ShowImplicitArgs Bool
- | ToggleImplicitArgs
- | ShowIrrelevantArgs Bool
- | ToggleIrrelevantArgs
- | Cmd_give UseForce InteractionId range String
- | Cmd_refine InteractionId range String
- | Cmd_intro Bool InteractionId range String
- | Cmd_refine_or_intro Bool InteractionId range String
- | Cmd_context Rewrite InteractionId range String
- | Cmd_helper_function Rewrite InteractionId range String
- | Cmd_infer Rewrite InteractionId range String
- | Cmd_goal_type Rewrite InteractionId range String
- | Cmd_elaborate_give Rewrite InteractionId range String
- | Cmd_goal_type_context Rewrite InteractionId range String
- | Cmd_goal_type_context_infer Rewrite InteractionId range String
- | Cmd_goal_type_context_check Rewrite InteractionId range String
- | Cmd_show_module_contents Rewrite InteractionId range String
- | Cmd_make_case InteractionId range String
- | Cmd_compute ComputeMode InteractionId range String
- | Cmd_why_in_scope InteractionId range String
- | Cmd_why_in_scope_toplevel String
- | Cmd_show_version
- | Cmd_abort
- | Cmd_exit
- data IOTCM' range = IOTCM FilePath HighlightingLevel HighlightingMethod (Interaction' range)
- data Remove
- parseIOTCM :: String -> Either String IOTCM
- type Parse a = ExceptT String (StateT String Identity) a
- readsToParse :: String -> (String -> Maybe (a, String)) -> Parse a
- parseToReadsPrec :: Parse a -> Int -> String -> [(a, String)]
- exact :: String -> Parse ()
- readParse :: Read a => Parse a
- parens' :: Parse a -> Parse a
- data CompilerBackend
- data Rewrite
- data ComputeMode
- data UseForce
- data OutputForm_boot tcErr a b = OutputForm Range [ProblemId] Blocker (OutputConstraint_boot tcErr a b)
- data OutputConstraint_boot tcErr a b
- = OfType b a
- | CmpInType Comparison a b b
- | CmpElim [Polarity] a [b] [b]
- | JustType b
- | CmpTypes Comparison b b
- | CmpLevels Comparison b b
- | CmpTeles Comparison b b
- | JustSort b
- | CmpSorts Comparison b b
- | Assign b a
- | TypedAssign b a a
- | PostponedCheckArgs b [a] a a
- | IsEmptyType a
- | SizeLtSat a
- | FindInstanceOF b a [(a, a, a)]
- | ResolveInstanceOF QName
- | PTSInstance b b
- | PostponedCheckFunDef QName a tcErr
- | CheckLock b b
- | DataSort QName b
- | UsableAtMod Modality b
- data OutputConstraint' a b = OfType' {}
- data OutputContextEntry name ty val
- = ContextVar name ty
- | ContextLet name ty val
Documentation
data CommandState Source #
Auxiliary state of an interactive computation.
CommandState | |
|
Instances
EncodeTCM CommandState Source # | |
Defined in Agda.Interaction.JSONTop | |
ToJSON CommandState Source # | |
Defined in Agda.Interaction.JSONTop toJSON :: CommandState -> Value # toEncoding :: CommandState -> Encoding # toJSONList :: [CommandState] -> Value # toEncodingList :: [CommandState] -> Encoding # omitField :: CommandState -> Bool # |
initCommandState :: CommandQueue -> CommandState Source #
Initial auxiliary interaction state
data CurrentFile Source #
Information about the current main module.
CurrentFile | |
|
Instances
EncodeTCM CurrentFile Source # | |
Defined in Agda.Interaction.JSONTop | |
ToJSON CurrentFile Source # | |
Defined in Agda.Interaction.JSONTop toJSON :: CurrentFile -> Value # toEncoding :: CurrentFile -> Encoding # toJSONList :: [CurrentFile] -> Value # toEncodingList :: [CurrentFile] -> Encoding # omitField :: CurrentFile -> Bool # | |
Show CurrentFile Source # | |
Defined in Agda.Interaction.Base showsPrec :: Int -> CurrentFile -> ShowS # show :: CurrentFile -> String # showList :: [CurrentFile] -> ShowS # |
A generalised command type.
type IOTCM = Maybe TopLevelModuleName -> IOTCM' Range Source #
IOTCM commands.
The commands are obtained by applying the functions to the current top-level module name, if any. Note that the top-level module name is not used by independent commands. For other commands the top-level module name should be known.
data CommandQueue Source #
Command queues.
CommandQueue | |
|
type Interaction = Interaction' Range Source #
An interactive computation.
data Interaction' range Source #
Cmd_load FilePath [String] |
|
Cmd_compile CompilerBackend FilePath [String] |
|
Cmd_constraints | |
Cmd_metas Rewrite | Show unsolved metas. If there are no unsolved metas but unsolved constraints show those instead. |
Cmd_no_metas | A command that fails if there are any unsolved meta-variables. By default no output is generated if the command is successful. |
Cmd_show_module_contents_toplevel Rewrite String | Shows all the top-level names in the given module, along with their types. Uses the top-level scope. |
Cmd_search_about_toplevel Rewrite String | Shows all the top-level names in scope which mention all the given identifiers in their type. |
Cmd_solveAll Rewrite | Solve (all goals / the goal at point) whose values are determined by the constraints. |
Cmd_solveOne Rewrite InteractionId range String | |
Cmd_autoOne Rewrite InteractionId range String | Solve (all goals / the goal at point) by using Mimer proof search. |
Cmd_autoAll Rewrite | |
Cmd_infer_toplevel Rewrite String | Parse the given expression (as if it were defined at the top-level of the current module) and infer its type. |
Cmd_compute_toplevel ComputeMode String | Parse and type check the given expression (as if it were defined at the top-level of the current module) and normalise it. |
Cmd_load_highlighting_info FilePath |
If the module does not exist, or its module name is malformed or cannot be determined, or the module has not already been visited, or the cached info is out of date, then no highlighting information is printed. This command is used to load syntax highlighting information when a new file is opened, and it would probably be annoying if jumping to the definition of an identifier reset the proof state, so this command tries not to do that. One result of this is that the command uses the current include directories, whatever they happen to be. |
Cmd_tokenHighlighting FilePath Remove | Tells Agda to compute token-based highlighting information for the file. This command works even if the file's module name does not match its location in the file system, or if the file is not scope-correct. Furthermore no file names are put in the generated output. Thus it is fine to put source code into a temporary file before calling this command. However, the file extension should be correct. If the second argument is |
Cmd_highlight InteractionId range String | Tells Agda to compute highlighting information for the expression just spliced into an interaction point. |
ShowImplicitArgs Bool | Tells Agda whether or not to show implicit arguments. |
ToggleImplicitArgs | Toggle display of implicit arguments. |
ShowIrrelevantArgs Bool | Tells Agda whether or not to show irrelevant arguments. |
ToggleIrrelevantArgs | Toggle display of irrelevant arguments. |
Cmd_give UseForce InteractionId range String | Goal commands If the range is |
Cmd_refine InteractionId range String | |
Cmd_intro Bool InteractionId range String | |
Cmd_refine_or_intro Bool InteractionId range String | |
Cmd_context Rewrite InteractionId range String | |
Cmd_helper_function Rewrite InteractionId range String | |
Cmd_infer Rewrite InteractionId range String | |
Cmd_goal_type Rewrite InteractionId range String | |
Cmd_elaborate_give Rewrite InteractionId range String | Grabs the current goal's type and checks the expression in the hole against it. Returns the elaborated term. |
Cmd_goal_type_context Rewrite InteractionId range String | Displays the current goal and context. |
Cmd_goal_type_context_infer Rewrite InteractionId range String | Displays the current goal and context and infers the type of an expression. |
Cmd_goal_type_context_check Rewrite InteractionId range String | Grabs the current goal's type and checks the expression in the hole against it. |
Cmd_show_module_contents Rewrite InteractionId range String | Shows all the top-level names in the given module, along with their types. Uses the scope of the given goal. |
Cmd_make_case InteractionId range String | |
Cmd_compute ComputeMode InteractionId range String | |
Cmd_why_in_scope InteractionId range String | |
Cmd_why_in_scope_toplevel String | |
Cmd_show_version | Displays version of the running Agda |
Cmd_abort | Abort the current computation. Does nothing if no computation is in progress. |
Cmd_exit | Exit the program. |
Instances
Instances
Foldable IOTCM' Source # | |
Defined in Agda.Interaction.Base fold :: Monoid m => IOTCM' m -> m # foldMap :: Monoid m => (a -> m) -> IOTCM' a -> m # foldMap' :: Monoid m => (a -> m) -> IOTCM' a -> m # foldr :: (a -> b -> b) -> b -> IOTCM' a -> b # foldr' :: (a -> b -> b) -> b -> IOTCM' a -> b # foldl :: (b -> a -> b) -> b -> IOTCM' a -> b # foldl' :: (b -> a -> b) -> b -> IOTCM' a -> b # foldr1 :: (a -> a -> a) -> IOTCM' a -> a # foldl1 :: (a -> a -> a) -> IOTCM' a -> a # elem :: Eq a => a -> IOTCM' a -> Bool # maximum :: Ord a => IOTCM' a -> a # minimum :: Ord a => IOTCM' a -> a # | |
Traversable IOTCM' Source # | |
Functor IOTCM' Source # | |
Read range => Read (IOTCM' range) Source # | |
Show range => Show (IOTCM' range) Source # | |
Used to indicate whether something should be removed or not.
parseIOTCM :: String -> Either String IOTCM Source #
An IOTCM
parser.
If the parse fails, then an error message is returned.
data CompilerBackend Source #
Available backends.
Instances
Pretty CompilerBackend Source # | |
Defined in Agda.Interaction.Base pretty :: CompilerBackend -> Doc Source # prettyPrec :: Int -> CompilerBackend -> Doc Source # prettyList :: [CompilerBackend] -> Doc Source # | |
Read CompilerBackend Source # | |
Defined in Agda.Interaction.Base | |
Show CompilerBackend Source # | |
Defined in Agda.Interaction.Base showsPrec :: Int -> CompilerBackend -> ShowS # show :: CompilerBackend -> String # showList :: [CompilerBackend] -> ShowS # | |
Eq CompilerBackend Source # | |
Defined in Agda.Interaction.Base (==) :: CompilerBackend -> CompilerBackend -> Bool # (/=) :: CompilerBackend -> CompilerBackend -> Bool # |
Ordered ascendingly by degree of normalization.
data ComputeMode Source #
Instances
EncodeTCM ComputeMode Source # | |
Defined in Agda.Interaction.JSONTop | |
ToJSON ComputeMode Source # | |
Defined in Agda.Interaction.JSONTop toJSON :: ComputeMode -> Value # toEncoding :: ComputeMode -> Encoding # toJSONList :: [ComputeMode] -> Value # toEncodingList :: [ComputeMode] -> Encoding # omitField :: ComputeMode -> Bool # | |
Read ComputeMode Source # | |
Defined in Agda.Interaction.Base readsPrec :: Int -> ReadS ComputeMode # readList :: ReadS [ComputeMode] # readPrec :: ReadPrec ComputeMode # readListPrec :: ReadPrec [ComputeMode] # | |
Show ComputeMode Source # | |
Defined in Agda.Interaction.Base showsPrec :: Int -> ComputeMode -> ShowS # show :: ComputeMode -> String # showList :: [ComputeMode] -> ShowS # | |
Eq ComputeMode Source # | |
Defined in Agda.Interaction.Base (==) :: ComputeMode -> ComputeMode -> Bool # (/=) :: ComputeMode -> ComputeMode -> Bool # |
WithForce | Ignore additional checks, like termination/positivity... |
WithoutForce | Don't ignore any checks. |
data OutputForm_boot tcErr a b Source #
OutputForm Range [ProblemId] Blocker (OutputConstraint_boot tcErr a b) |
Instances
data OutputConstraint_boot tcErr a b Source #
OfType b a | |
CmpInType Comparison a b b | |
CmpElim [Polarity] a [b] [b] | |
JustType b | |
CmpTypes Comparison b b | |
CmpLevels Comparison b b | |
CmpTeles Comparison b b | |
JustSort b | |
CmpSorts Comparison b b | |
Assign b a | |
TypedAssign b a a | |
PostponedCheckArgs b [a] a a | |
IsEmptyType a | |
SizeLtSat a | |
FindInstanceOF b a [(a, a, a)] | |
ResolveInstanceOF QName | |
PTSInstance b b | |
PostponedCheckFunDef QName a tcErr | |
CheckLock b b | |
DataSort QName b | |
UsableAtMod Modality b |
Instances
(Pretty a, Pretty b) => Pretty (OutputConstraint a b) Source # | |
Defined in Agda.Interaction.BasicOps pretty :: OutputConstraint a b -> Doc Source # prettyPrec :: Int -> OutputConstraint a b -> Doc Source # prettyList :: [OutputConstraint a b] -> Doc Source # | |
(ToConcrete a, ToConcrete b) => ToConcrete (OutputConstraint a b) Source # | |
Defined in Agda.Interaction.BasicOps type ConOfAbs (OutputConstraint a b) Source # toConcrete :: OutputConstraint a b -> AbsToCon (ConOfAbs (OutputConstraint a b)) Source # bindToConcrete :: OutputConstraint a b -> (ConOfAbs (OutputConstraint a b) -> AbsToCon b0) -> AbsToCon b0 Source # | |
Functor (OutputConstraint_boot tcErr a) Source # | |
Defined in Agda.Interaction.Base fmap :: (a0 -> b) -> OutputConstraint_boot tcErr a a0 -> OutputConstraint_boot tcErr a b # (<$) :: a0 -> OutputConstraint_boot tcErr a b -> OutputConstraint_boot tcErr a a0 # | |
type ConOfAbs (OutputConstraint a b) Source # | |
Defined in Agda.Interaction.BasicOps |
data OutputConstraint' a b Source #
A subset of OutputConstraint
.
Instances
(Pretty a, Pretty b) => Pretty (OutputConstraint' a b) Source # | |
Defined in Agda.Interaction.BasicOps pretty :: OutputConstraint' a b -> Doc Source # prettyPrec :: Int -> OutputConstraint' a b -> Doc Source # prettyList :: [OutputConstraint' a b] -> Doc Source # | |
(ToConcrete a, ToConcrete b) => ToConcrete (OutputConstraint' a b) Source # | |
Defined in Agda.Interaction.BasicOps type ConOfAbs (OutputConstraint' a b) Source # toConcrete :: OutputConstraint' a b -> AbsToCon (ConOfAbs (OutputConstraint' a b)) Source # bindToConcrete :: OutputConstraint' a b -> (ConOfAbs (OutputConstraint' a b) -> AbsToCon b0) -> AbsToCon b0 Source # | |
type ConOfAbs (OutputConstraint' a b) Source # | |
Defined in Agda.Interaction.BasicOps |
data OutputContextEntry name ty val Source #
ContextVar name ty | |
ContextLet name ty val |
Orphan instances
Read InteractionId Source # | |
readsPrec :: Int -> ReadS InteractionId # readList :: ReadS [InteractionId] # | |
Read RangeFile Source # | This instance fills in the |
Read AbsolutePath Source # | |
readsPrec :: Int -> ReadS AbsolutePath # readList :: ReadS [AbsolutePath] # | |
Read a => Read (Interval' a) Source # | |
Read a => Read (Position' a) Source # | |
Read a => Read (Range' a) Source # | Note that the grammar implemented by this instance does not necessarily match the current representation of ranges. |