Bug report: "AThing evaluated unexpectedly tcTyVar a_alF"
The following code:
{-# LANGUAGE GADTs, EmptyDataDecls, TypeFamilies, TypeOperators, DataKinds, FlexibleInstances #-}
{- Defines a C-like printf function using DataKinds extensions. -}
module Printf where
-- format string parameterized by a list of types
data Format (fmt :: [*]) where
X :: Format '[] -- empty string, i.e. ""
L :: a -> String -> Format '[] -- string literal, e.g. "hello"
S :: a -> Format '[String] -- "%s"
I :: Format a -> Format '[Int, a] -- "%d"
produces the following error:
GHCi, version 7.10.3: http://www.haskell.org/ghc/ :? for help [1 of 1] Compiling Printf ( Printf.hs, interpreted )
Printf.hs:12:27:ghc: panic! (the 'impossible' happened)
(GHC version 7.10.3 for x86_64-unknown-linux):
AThing evaluated unexpectedly tcTyVar a_alF
Please report this as a GHC bug: http://www.haskell.org/ghc/reportabug
when run using **ghci Printf.hs**
on Liunx Ubuntu 16.04 LTS 64-bit with Intel® Core™ i7-7500U CPU @ 2.70GHz