-
Notifications
You must be signed in to change notification settings - Fork 24
Enhanced errors #874
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Open
Thizizmyname
wants to merge
37
commits into
parapluu:development
Choose a base branch
from
Thizizmyname:enhanced-errors
base: development
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Enhanced errors #874
Changes from all commits
Commits
Show all changes
37 commits
Select commit
Hold shift + click to select a range
abd0f35
Basic implementation of new error-printer
Thizizmyname 0a8274a
test for NonAssignableLHSError
Thizizmyname ddc9b0b
Elias TCError now takes Environment instead of Backtrace
Thizizmyname 1bf6d72
Added Elias patch to include Environment into TCError
Thizizmyname 8f4f265
Update output of tests
Thizizmyname 3131c66
Updated Meta.hs for new way to print position
Thizizmyname 3939c13
Printer accepts multi-line errors with no additional arguments
Thizizmyname f826e76
Optimized code-input as well as refactored for future function
Thizizmyname b08e8b5
Reverted back to not show ranges in error position
Thizizmyname ec8364a
Swapped Text.PrettyPrint to Data.Text.Prettyprint.Doc
Thizizmyname a1a3acb
Remade errorprinter to use rich text Doc instead of ANSI Console
Thizizmyname a63903d
Refactoring and modularization
Thizizmyname b793649
Reverted to use pretty-1.1.3.* instead of prettyprinter-1.2.1
Thizizmyname 6303390
Added annotation for code blocks
Thizizmyname 8987ed4
List visible methods/functions and added method suggestions
Thizizmyname be98118
Minor touchups
Thizizmyname 48d95fd
Added functions for method-name analysis and refactorization
Thizizmyname 5452465
stupid typo
Thizizmyname 72dff6b
Working explainer with sub-par data structure
Thizizmyname c710af5
Added rudimentary fixed table
Thizizmyname b31315b
Ability to construct explanations of different error types
Thizizmyname 64297e4
Re-added instance Show for Error
Thizizmyname cbbea76
Added TypeMismatchError and explanation
Thizizmyname 959717f
Expose default function modules in visibleFunctions
Thizizmyname 3d9d3ff
Test using external file and pager for explanations
Thizizmyname 0d76dfe
Code cleanup
Thizizmyname f1473cc
Updated to latest 'development' branch
Thizizmyname 390d593
Alternative codeviewer with new multiline renderer
Thizizmyname 6c07c05
Added pretty rendering of warnings
Thizizmyname 02874a5
Uses now pager for every explanation
Thizizmyname 3905379
Added functionality for external explanations for specific errors and
Thizizmyname ddad6e8
Added graphical tests suite
Thizizmyname 475b895
Moved auxiliary info to long suggest
Thizizmyname 6f9b25b
Update from feedback
Thizizmyname ce3ee62
Merge branch 'development' into enhanced-errors
Thizizmyname 53ef4a6
feedback resolved and workarounds to solve stupidity
Thizizmyname dbdfa01
Updated from upstream parapluu/encore
Thizizmyname File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or 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 hidden or 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 |
|---|---|---|
| @@ -0,0 +1,19 @@ | ||
| Welcome to the Encore Compiler! | ||
| Here you will meet many wonderful methods and functions and whatnot! | ||
|
|
||
| To be able to compile an Encore program you will need to have a Main-class | ||
| with a main-method inside. | ||
| Lets try a simple "Hello World"! | ||
|
|
||
| For example: | ||
|
|
||
|
|
||
| ``` | ||
| active class Main | ||
|
|
||
| def main() : unit | ||
| println("hello world") | ||
| end | ||
|
|
||
| end | ||
| ``` |
This file contains hidden or 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 |
|---|---|---|
| @@ -0,0 +1,17 @@ | ||
| This error occurs when the compiler was unable to infer the concrete type of a | ||
| variable. It can occur for several cases, the most common of which is a | ||
| mismatch in the expected type that the compiler inferred for a variable's | ||
| initializing expression, and the actual type explicitly assigned to the | ||
| variable. | ||
|
|
||
| For example: | ||
|
|
||
| ``` | ||
| let x: int = "I am not a number!" | ||
| -- ~~~ ~~~~~~~~~~~~~~~~~~~~ | ||
| -- | | | ||
| -- | initializing expression; | ||
| -- | compiler infers type `String.String` | ||
| -- | | ||
| -- type `int` assigned to variable `x` | ||
| ``` |
This file contains hidden or 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 hidden or 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
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.