[GHC] #15026: Type deduction panic
GHC
ghc-devs at haskell.org
Wed Apr 11 21:38:52 UTC 2018
#15026: Type deduction panic
-------------------------------------+-------------------------------------
Reporter: moomin | Owner: (none)
Type: bug | Status: new
Priority: normal | Milestone: 8.6.1
Component: Compiler | Version: 8.2.2
Keywords: | Operating System: Windows
Architecture: | Type of failure: Poor/confusing
Unknown/Multiple | error message
Test Case: | Blocked By:
Blocking: | Related Tickets:
Differential Rev(s): | Wiki Page:
-------------------------------------+-------------------------------------
{{{#!lhs
> {-# LANGUAGE DeriveFunctor #-}
> module Bug where
> import qualified Data.Set as S
> import Data.Foldable (fold, foldMap, toList)
> import Data.List.Split (splitOn)
> import Data.Monoid -- ((<>), Sum, mempty, mappend)
> import Data.Functor.Foldable
> newtype Component = Component (Int,Int) deriving (Eq, Ord, Show)
> data Day24State v a = Day24State {
> valueToMatch :: Int,
> componentsToUse :: S.Set Component,
> componentMetric :: v,
> nextStates :: [a]
> } deriving (Functor, Show)
> type Day24StateFix v a = Fix (Day24State v)
}}}
Now in GHCI type
> :t Data.Functor.Foldable.ana f (undefined :: Day24StateFix Component)
Produces
ghc.EXE: panic! (the 'impossible' happened)
(GHC version 8.0.2 for x86_64-unknown-mingw32):
initTc: unsolved constraints
WC {wc_insol = [W] f_akbJ :: t_akbI[tau:3] (CHoleCan: f)}
Please report this as a GHC bug: http://www.haskell.org/ghc/reportabug
--
Ticket URL: <http://ghc.haskell.org/trac/ghc/ticket/15026>
GHC <http://www.haskell.org/ghc/>
The Glasgow Haskell Compiler
More information about the ghc-tickets
mailing list