[GHC] #14732: -fdefer-typed-holes breaks a correct program
GHC
ghc-devs at haskell.org
Tue Jan 30 00:25:11 UTC 2018
#14732: -fdefer-typed-holes breaks a correct program
-------------------------------------+-------------------------------------
Reporter: MitchellSalad | Owner: (none)
Type: bug | Status: new
Priority: normal | Milestone:
Component: Compiler | Version: 8.2.2
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 RyanGlScott):
You need to compile the program with `-fdefer-typed-holes` to trigger the
error:
{{{
$ /opt/ghc/8.2.2/bin/ghc -fdefer-typed-holes Bug.hs
[1 of 1] Compiling Bug ( Bug.hs, Bug.o )
Bug.hs:29:11: error:
• Could not deduce (Unbox a) arising from a use of ‘zip’
from the context: GVector Vector (a, b)
bound by the RULE "stream/zip [Vector.Unboxed]"
at Bug.hs:(28,11)-(30,46)
Possible fix:
add (Unbox a) to the context of
the RULE "stream/zip [Vector.Unboxed]"
• In the first argument of ‘stream’, namely ‘(zip as bs)’
In the expression: stream (zip as bs)
When checking the transformation rule "stream/zip [Vector.Unboxed]"
|
29 | stream (zip as bs) = zipWith (,) (stream as)
| ^^^^^^^^^
}}}
This regression was introduced in 6746549772c5cc0ac66c0fce562f297f4d4b80a2
(`Add kind equalities to GHC.`).
--
Ticket URL: <http://ghc.haskell.org/trac/ghc/ticket/14732#comment:4>
GHC <http://www.haskell.org/ghc/>
The Glasgow Haskell Compiler
More information about the ghc-tickets
mailing list