Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
GHC
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Requirements
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Locked files
Build
Pipelines
Jobs
Pipeline schedules
Test cases
Artifacts
Deploy
Releases
Package Registry
Container Registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Code review analytics
Issue analytics
Insights
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Terms and privacy
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
gershomb
GHC
Commits
c1f67887
Commit
c1f67887
authored
5 years ago
by
Roland Senn
Committed by
Marge Bot
5 years ago
Browse files
Options
Downloads
Patches
Plain Diff
Improve doc for :type-at. (#14780)
parent
07cffc49
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
docs/users_guide/ghci.rst
+8
-1
8 additions, 1 deletion
docs/users_guide/ghci.rst
with
8 additions
and
1 deletion
docs/users_guide/ghci.rst
+
8
−
1
View file @
c1f67887
...
...
@@ -2937,7 +2937,7 @@ commonly used commands.
*X> :type +d length
length :: [a] -> Int
.. ghci-cmd:: :type-at; ⟨
module
⟩ ⟨line⟩ ⟨col⟩ ⟨end-line⟩ ⟨end-col⟩ [⟨name⟩]
.. ghci-cmd:: :type-at; ⟨
path
⟩ ⟨line⟩ ⟨col⟩ ⟨end-line⟩ ⟨end-col⟩ [⟨name⟩]
Reports the inferred type at the given span/position in the module, e.g.:
...
...
@@ -2949,6 +2949,13 @@ commonly used commands.
This command is useful when integrating GHCi with text editors and
IDEs for providing a show-type-under-point facility.
The first parameter (path) must be a file path and not a module name.
The type of this path is dependent on how the module was loaded into GHCi:
If the module was loaded by name, then the path name calculated by GHCi
as described in :ref:`ghci-modules-filenames` must be used.
If the module was loaded with an absolute or a relative path,
then the same path must be specified.
The last string parameter is useful for when the span is out of
date, i.e. the file changed and the code has moved. In which case
:ghci-cmd:`:type-at` falls back to a general :ghci-cmd:`:type` like lookup.
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment