[GHC] #15893: View Patterns affect typechecking in an unpredictable manner
GHC
ghc-devs at haskell.org
Wed Nov 14 09:58:49 UTC 2018
#15893: View Patterns affect typechecking in an unpredictable manner
-------------------------------------+-------------------------------------
Reporter: theindigamer | Owner: (none)
Type: bug | Status: new
Priority: normal | Milestone: ⊥
Component: Compiler | Version: 8.4.3
Resolution: | Keywords: ViewPatterns
Operating System: Unknown/Multiple | Architecture:
Type of failure: GHC rejects | Unknown/Multiple
valid program | Test Case:
Blocked By: | Blocking:
Related Tickets: | Differential Rev(s):
Wiki Page: |
-------------------------------------+-------------------------------------
Comment (by simonpj):
Wow. Here's an example with no dependencies
{{{
bar :: Int -> (Int,Int)
bar i = (t_pre, t_post)
where
f :: Int -> Int
f j = j
(f -> t_pre, f -> t_post) = (i+1, i-1)
}}}
We get
{{{
T15893.hs:10:6: error:
* Variable not in scope: f :: Int -> t
* Perhaps you meant `f' (line 9)
|
10 | (f -> t_pre, f -> t_post) = (i+1, i-1)
| ^
}}}
--
Ticket URL: <http://ghc.haskell.org/trac/ghc/ticket/15893#comment:1>
GHC <http://www.haskell.org/ghc/>
The Glasgow Haskell Compiler
More information about the ghc-tickets
mailing list