[GHC] #14370: non-deferred typed hole despite -fdefer-typed-holes
GHC
ghc-devs at haskell.org
Thu Oct 19 10:02:18 UTC 2017
#14370: non-deferred typed hole despite -fdefer-typed-holes
-------------------------------------+-------------------------------------
Reporter: int-e | Owner: (none)
Type: bug | Status: new
Priority: normal | Milestone:
Component: Compiler | Version: 8.2.1
Resolution: | Keywords:
Operating System: Unknown/Multiple | Architecture:
Type of failure: Incorrect | Unknown/Multiple
error/warning at compile-time | Test Case:
Blocked By: | Blocking:
Related Tickets: | Differential Rev(s):
Wiki Page: |
-------------------------------------+-------------------------------------
Comment (by int-e):
Replying to [comment:1 monoidal]:
> Does
[https://downloads.haskell.org/~ghc/latest/docs/html/users_guide/glasgow_exts.html
#deferred-type-errors-in-ghci this] answer your question?
Yes and no. I still believe that the behavior is surprising, but this
means it's a feature, not a bug (I don't care enough to argue otherwise).
Btw, from this section I would conclude that `length [r]` should also
produce an error, since both typed holes and out of scope variables fall
under the headline
[https://downloads.haskell.org/~ghc/latest/docs/html/users_guide/glasgow_exts.html
#deferring-type-errors-to-runtime Deferring type errors to runtime].
In any case it appears that the documentation can be improved a bit.
* clarify in
[https://downloads.haskell.org/~ghc/latest/docs/html/users_guide/glasgow_exts.html
#deferred-type-errors-in-ghci Deferred type errors in GHCi] that this
applies to type checking errors (including typed holes) but not to name
resolution (out of scope variables)
* I didn't find the GHCi exception when reading
[https://downloads.haskell.org/~ghc/latest/docs/html/users_guide/glasgow_exts.html
#typed-holes Typed Holes] so a forward reference may be helpful
* The description of
[https://downloads.haskell.org/~ghc/latest/docs/html/users_guide/using-
warnings.html#ghc-flag--fdefer-type-errors -fdefer-type-errors] should
mention that it implies -fdefer-out-of-scope-variables
--
Ticket URL: <http://ghc.haskell.org/trac/ghc/ticket/14370#comment:2>
GHC <http://www.haskell.org/ghc/>
The Glasgow Haskell Compiler
More information about the ghc-tickets
mailing list