[GHC] #12583: Deriving standalone Ix instance for GADT leads to GHC panic
GHC
ghc-devs at haskell.org
Sun Sep 11 14:40:41 UTC 2016
#12583: Deriving standalone Ix instance for GADT leads to GHC panic
-------------------------------------+-------------------------------------
Reporter: RyanGlScott | Owner:
Type: bug | Status: patch
Priority: normal | Milestone:
Component: Compiler | Version: 8.0.1
Resolution: | Keywords:
Operating System: Unknown/Multiple | Architecture:
Type of failure: Compile-time | Unknown/Multiple
crash | Test Case:
Blocked By: | Blocking:
Related Tickets: | Differential Rev(s): Phab:D2521
Wiki Page: |
-------------------------------------+-------------------------------------
Comment (by Ryan Scott <ryan.gl.scott@…>):
In [changeset:"7b7ea8f40e7400b8c183595a85bb2c65c9f9bb29/ghc" 7b7ea8f/ghc]:
{{{
#!CommitTicketReference repository="ghc"
revision="7b7ea8f40e7400b8c183595a85bb2c65c9f9bb29"
Fix derived Ix instances for one-constructor GADTs
Summary:
Standalone-derived `Ix` instances would panic on GADTs with exactly
one constructor, since the list of fields was being passed to a function
that
uses `foldl1` in order to generate an implementation for `inRange`. This
adds a
simple check that makes `inRange` be `True` whenever a product type has no
fields.
Fixes #12583.
Test Plan: make test TEST=12583
Reviewers: simonpj, austin, bgamari
Reviewed By: bgamari
Subscribers: thomie
Differential Revision: https://phabricator.haskell.org/D2521
GHC Trac Issues: #12583
}}}
--
Ticket URL: <http://ghc.haskell.org/trac/ghc/ticket/12583#comment:2>
GHC <http://www.haskell.org/ghc/>
The Glasgow Haskell Compiler
More information about the ghc-tickets
mailing list