Skip to content
GitLab
Projects Groups Topics Snippets
  • /
  • Help
    • Help
    • Support
    • Community forum
    • Submit feedback
  • Register
  • Sign in
  • GHC GHC
  • Project information
    • Project information
    • Activity
    • Labels
    • Members
  • Repository
    • Repository
    • Files
    • Commits
    • Branches
    • Tags
    • Contributor statistics
    • Graph
    • Compare revisions
    • Locked files
  • Issues 5.6k
    • Issues 5.6k
    • List
    • Boards
    • Service Desk
    • Milestones
    • Iterations
  • Merge requests 661
    • Merge requests 661
  • CI/CD
    • CI/CD
    • Pipelines
    • Jobs
    • Artifacts
    • Schedules
    • Test cases
  • Deployments
    • Deployments
    • Releases
  • Packages and registries
    • Packages and registries
    • Model experiments
  • Analytics
    • Analytics
    • CI/CD
    • Code review
    • Insights
    • Issue
    • Repository
  • Wiki
    • Wiki
  • Snippets
    • Snippets
  • Activity
  • Graph
  • Create a new issue
  • Jobs
  • Commits
  • Issue Boards
Collapse sidebar
  • Glasgow Haskell CompilerGlasgow Haskell Compiler
  • GHCGHC
  • Wiki
  • Proposal
  • custom type errors

custom type errors · Changes

Page history
Fix markdown link syntax authored Mar 29, 2019 by Tobias Dammers's avatar Tobias Dammers
Hide whitespace changes
Inline Side-by-side
proposal/custom-type-errors.md
View page @ 6530fd1d
......@@ -2,10 +2,10 @@
This page outlines the design for a GHC feature to provide support for user-specified type errors.
The main idea was [ presented by Lennart Augustsson at the 2015 Haskell Symposium in Vancouver BC](https://youtu.be/ZlZbSiYrqcQ).
The main idea was [presented by Lennart Augustsson at the 2015 Haskell Symposium in Vancouver BC](https://youtu.be/ZlZbSiYrqcQ).
The relevant ticket is [\#9637](https://gitlab.haskell.org//ghc/ghc/issues/9637).
The relevant ticket is [\#9637](https://gitlab.haskell.org/ghc/ghc/issues/9637).
## Status
......@@ -16,23 +16,23 @@ Use Keyword = `CustomTypeErrors` to ensure that a ticket ends up on these lists.
Open Tickets:
<table><tr><th><a href="https://gitlab.haskell.org//ghc/ghc/issues/11099">#11099</a></th>
<table><tr><th><a href="https://gitlab.haskell.org/ghc/ghc/issues/11099">#11099</a></th>
<td>Incorrect warning about redundant constraints</td></tr>
<tr><th><a href="https://gitlab.haskell.org//ghc/ghc/issues/11503">#11503</a></th>
<tr><th><a href="https://gitlab.haskell.org/ghc/ghc/issues/11503">#11503</a></th>
<td>TypeError woes (incl. pattern match checker)</td></tr>
<tr><th><a href="https://gitlab.haskell.org//ghc/ghc/issues/11967">#11967</a></th>
<tr><th><a href="https://gitlab.haskell.org/ghc/ghc/issues/11967">#11967</a></th>
<td>Custom message when showing functions, comparing functions, ...</td></tr>
<tr><th><a href="https://gitlab.haskell.org//ghc/ghc/issues/12048">#12048</a></th>
<tr><th><a href="https://gitlab.haskell.org/ghc/ghc/issues/12048">#12048</a></th>
<td>Allow CustomTypeErrors in type synonyms (+ evaluate nested type family?)</td></tr>
<tr><th><a href="https://gitlab.haskell.org//ghc/ghc/issues/12049">#12049</a></th>
<tr><th><a href="https://gitlab.haskell.org/ghc/ghc/issues/12049">#12049</a></th>
<td>`OverloadedStrings` for types</td></tr>
<tr><th><a href="https://gitlab.haskell.org//ghc/ghc/issues/13775">#13775</a></th>
<tr><th><a href="https://gitlab.haskell.org/ghc/ghc/issues/13775">#13775</a></th>
<td>Type family expansion is too lazy, allows accepting of ill-typed terms</td></tr>
<tr><th><a href="https://gitlab.haskell.org//ghc/ghc/issues/14141">#14141</a></th>
<tr><th><a href="https://gitlab.haskell.org/ghc/ghc/issues/14141">#14141</a></th>
<td>Custom type errors don&apos;t trigger when matching on a GADT constructor with an error in the constraint</td></tr>
<tr><th><a href="https://gitlab.haskell.org//ghc/ghc/issues/14771">#14771</a></th>
<tr><th><a href="https://gitlab.haskell.org/ghc/ghc/issues/14771">#14771</a></th>
<td>TypeError reported too eagerly</td></tr>
<tr><th><a href="https://gitlab.haskell.org//ghc/ghc/issues/14983">#14983</a></th>
<tr><th><a href="https://gitlab.haskell.org/ghc/ghc/issues/14983">#14983</a></th>
<td>Have custom type errors imply Void</td></tr></table>
......@@ -40,23 +40,23 @@ Open Tickets:
Closed Tickets:
<table><tr><th><a href="https://gitlab.haskell.org//ghc/ghc/issues/11391">#11391</a></th>
<table><tr><th><a href="https://gitlab.haskell.org/ghc/ghc/issues/11391">#11391</a></th>
<td>TypeError is fragile</td></tr>
<tr><th><a href="https://gitlab.haskell.org//ghc/ghc/issues/12104">#12104</a></th>
<tr><th><a href="https://gitlab.haskell.org/ghc/ghc/issues/12104">#12104</a></th>
<td>Type families, `TypeError`, and `-fdefer-type-errors` cause &quot;opt_univ fell into a hole&quot;</td></tr>
<tr><th><a href="https://gitlab.haskell.org//ghc/ghc/issues/12119">#12119</a></th>
<tr><th><a href="https://gitlab.haskell.org/ghc/ghc/issues/12119">#12119</a></th>
<td>Can&apos;t create injective type family equation with TypeError as the RHS</td></tr>
<tr><th><a href="https://gitlab.haskell.org//ghc/ghc/issues/12237">#12237</a></th>
<tr><th><a href="https://gitlab.haskell.org/ghc/ghc/issues/12237">#12237</a></th>
<td>Constraint resolution vs. type family resolution vs. TypeErrors</td></tr>
<tr><th><a href="https://gitlab.haskell.org//ghc/ghc/issues/14339">#14339</a></th>
<tr><th><a href="https://gitlab.haskell.org/ghc/ghc/issues/14339">#14339</a></th>
<td>GHC 8.2.1 regression when combining GND with TypeError (solveDerivEqns: probable loop)</td></tr>
<tr><th><a href="https://gitlab.haskell.org//ghc/ghc/issues/15052">#15052</a></th>
<tr><th><a href="https://gitlab.haskell.org/ghc/ghc/issues/15052">#15052</a></th>
<td>DeriveAnyClass instances may skip TypeError constraints</td></tr>
<tr><th><a href="https://gitlab.haskell.org//ghc/ghc/issues/15232">#15232</a></th>
<tr><th><a href="https://gitlab.haskell.org/ghc/ghc/issues/15232">#15232</a></th>
<td>TypeError is reported as &quot;redundant constraint&quot; starting with GHC 8.2</td></tr>
<tr><th><a href="https://gitlab.haskell.org//ghc/ghc/issues/16362">#16362</a></th>
<tr><th><a href="https://gitlab.haskell.org/ghc/ghc/issues/16362">#16362</a></th>
<td>Deriving a class via an instance that has a TypeError constraint using standalone deriving fails during compilation.</td></tr>
<tr><th><a href="https://gitlab.haskell.org//ghc/ghc/issues/16377">#16377</a></th>
<tr><th><a href="https://gitlab.haskell.org/ghc/ghc/issues/16377">#16377</a></th>
<td>`TypeError` in a pattern should flag inaccessible code</td></tr></table>
......@@ -374,4 +374,4 @@ testNotOk s = get s (Proxy :: Proxy "B")
The Helium people have also addressed the problem of customizable error messages.
See Heeren, Hage, Swierstra on [ Scripting the Type Inference Process](http://www.staff.science.uu.nl/~hage0101/scriptingthetypeinferencer.pdf).
See Heeren, Hage, Swierstra on [Scripting the Type Inference Process](http://www.staff.science.uu.nl/~hage0101/scriptingthetypeinferencer.pdf).
Clone repository
  • Adventures in GHC compile times
  • All things layout
  • AndreasK
  • AndreasPK
  • Back End and Run Time System
  • Backpack refactoring
  • Backpack units
  • Brief Guide for Compiling GHC to iOS
  • Building GHC on Windows with Stack protector support (SSP) (using Make)
  • CAFs
  • CafInfo rework
  • Compiling Case Expressions in ghc
  • Compiling Data.Aeson Error
  • Contributing a Patch
  • Core interface section
View All Pages