For GHC related bugs,
the FEB page can be found
here.
The solution is either to work around the problem by compiling without -O,
or if you have picked up a source distribution, apply the following patch and rebuild:
*** ghc-0.26/ghc/compiler/stgSyn/CoreToStg.lhs Wed May 24 09:29:15 1995
--- partain/ghc/compiler/stgSyn/CoreToStg.lhs Tue Aug 22 18:12:27 1995
***************
*** 604,610 ****
-- default binder to the scrutinee.
--
new_env = case discrim of
! CoVar v -> addOneToIdEnv env binder (StgVarAtom v)
other -> env
\end{code}
--- 617,623 ----
-- default binder to the scrutinee.
--
new_env = case discrim of
! CoVar v -> addOneToIdEnv env binder (stgLookup env v)
other -> env
\end{code}
Function `trace' not defined (0.8)
The simplest solution is to upgrade to happy-0.9 :-)
Happy-0.8 was released with a version of the Glasgow Haskell
Compiler(ghc-0.23) that had the function `trace' built-in.
With the release of 0.26, `trace' was moved out of the user
namespace and renamed `_trace', hence the error msg you're seeing.
To fix, either define your own v. simple utility module Trace
module Trace where
trace = _trace -- that's it!
and add it to Happy-0.8, or add the following line to GenUtils.lhs:
#ifndef __GLASGOW_HASKELL__
> import
> Maybe (Maybe(..)) -- on a different line to confuse mkdependHS (!)
> import
> Trace
#else
> import Trace
#endif
and add -syslib hbc to OPT in the Makefile.