[GHC] #15512: Rewrite rules should be able to produce custom compiler errors
GHC
ghc-devs at haskell.org
Thu Aug 16 10:36:55 UTC 2018
#15512: Rewrite rules should be able to produce custom compiler errors
-------------------------------------+-------------------------------------
Reporter: ChaiTRex | Owner: (none)
Type: feature request | Status: new
Priority: normal | Milestone: 8.6.1
Component: Compiler | Version: 8.4.3
Resolution: | Keywords:
Operating System: Unknown/Multiple | Architecture:
| Unknown/Multiple
Type of failure: None/Unknown | Test Case:
Blocked By: | Blocking:
Related Tickets: | Differential Rev(s):
Wiki Page: |
-------------------------------------+-------------------------------------
Comment (by simonpj):
You could rewrite
{{{
forall x. length (cycle x) = error "length of cycle error"
}}}
but it would still be a run-time error, not a compile-time error. It's
not clear how to achieve the latter. e.g.
{{{
let v = length (cycle x)
in if ... then ...v... else True
}}}
then `v` might never be evaluated.
--
Ticket URL: <http://ghc.haskell.org/trac/ghc/ticket/15512#comment:4>
GHC <http://www.haskell.org/ghc/>
The Glasgow Haskell Compiler
More information about the ghc-tickets
mailing list