id	summary	reporter	owner	description	type	status	priority	milestone	version	resolution	keywords	cc
68	Internal error when splicing Template Haskell code	spl		"The following two modules form a minimal testcase that produce an internal error from Haddock.

A.hs:
{{{
{-# LANGUAGE TemplateHaskell #-}
module A where
import Language.Haskell.TH
a = litE (charL 'a')
}}}

B.hs:
{{{
{-# LANGUAGE TemplateHaskell #-}
module B where
import A
b = $a
}}}

At the command line:
{{{
$ haddock B.hs 
haddock: internal Haddock or GHC error: Maybe.fromJust: Nothing

$ haddock --version
Haddock version 2.4.1, (c) Simon Marlow 2006
Ported to use the GHC API by David Waern 2006-2008

$ haddock --ghc-version
6.10.1
}}}

Notes:
   * The error also shows up in 2.3.0.
   * The error does not show up if you change B.hs to {{{b = $(litE (charL 'a'))}}}."	defect	closed	major		2.4.1	fixed	TH	leather@…
