<blockquote style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;" class="gmail_quote">
Via cabal:<br><br>
    --constraint=&#39;base&lt;4&#39;<br><br>
or replace Control.Exception with Control.OldException<br><br>
or add &#39;base &lt; 4&#39;  to the depends in the .cabal file.<br></blockquote>


<br>Thanks, Don.<br><br>Trying your first suggestion, I get the same result for the first and third method, and a ghc panic on cat_evals for the second method.  All happening in ghc-6.10.3 installed via the Haskell Platform last week on OS X.<br>

<br>    bash-3.2$ cabal install lhs2tex --constraint=&#39;base&lt;4&#39;<br>    Resolving dependencies...<br>    [1 of 1] Compiling Main             ( /tmp/lhs2tex-1.1424460/lhs2tex-1.14/Setup.hs, /tmp/lhs2tex-1.1424460/lhs2tex-1.14/dist/setup/Main.o )<br>

    Linking /tmp/lhs2tex-1.1424460/lhs2tex-1.14/dist/setup/setup ...<br>    Configuring lhs2tex-1.14...<br>    cabal: Error: some packages failed to install:<br>    lhs2tex-1.14 failed during the configure step. The exception was:<br>

    exit: ExitFailure 11<br><br>Still fishy about compiling Main first.<br><br>Now I&#39;ll edit add the &#39;&lt; 4&#39; constraint on base, giving the same result:<br><br>    bash-3.2$ dirs<br>    ~/cabal<br>    bash-3.2$ cabal unpack lhs2tex<br>

    Unpacking lhs2tex-1.14...<br>    bash-3.2$ cd lhs2tex-1.14<br><br>[lhs2tex.cabal edit happens here]<br><br>    bash-3.2$ cabal install<br>    Resolving dependencies...<br>    [1 of 1] Compiling Main             ( Setup.hs, dist/setup/Main.o )<br>

    Linking ./dist/setup/setup ...<br>    Configuring lhs2tex-1.14...<br>    cabal: Error: some packages failed to install:<br>    lhs2tex-1.14 failed during the configure step. The exception was:<br>    exit: ExitFailure 11<br>

<br>Note that on linux, the package compiles without changing the base constraint. I don&#39;t know how.<br><br>Finally, use explicit ./configure &amp; make:<br><br>    bash-3.2$ ./configure<br>    bash: ./configure: Permission denied<br>

    bash-3.2$ sh configure<br>    checking for ghc... /usr/bin/ghc<br>    checking for hugs... no<br>    checking for a BSD-compatible install... /usr/bin/install -c<br>    checking whether ln -s works... yes<br>    checking for mv... /bin/mv<br>

    checking for cp... /bin/cp<br>    checking for rm... /bin/rm<br>    checking for mkdir... /bin/mkdir<br>    checking for touch... /usr/bin/touch<br>    checking for diff... /usr/bin/diff<br>    checking for grep... /usr/bin/grep<br>

    checking for sed... /usr/bin/sed<br>    checking for sort... /usr/bin/sort<br>    checking for uniq... /usr/bin/uniq<br>    checking for find... /usr/bin/find<br>    checking for latex... /usr/local/texlive/2008/bin/universal-darwin/latex<br>

    checking for pdflatex... /usr/local/texlive/2008/bin/universal-darwin/pdflatex<br>    checking for xdvi... /usr/local/texlive/2008/bin/universal-darwin/xdvi<br>    checking for gv... no<br>    checking for dvips... /usr/local/texlive/2008/bin/universal-darwin/dvips<br>

    checking for kpsewhich... /usr/local/texlive/2008/bin/universal-darwin/kpsewhich<br>    checking for a texmf tree... /usr/local/texlive/2008/../texmf-local<br>    checking for texmf.cnf... yes<br>    checking for the polytable package... /usr/local/texlive/2008/texmf-dist/tex/latex/polytable/polytable.sty<br>

    checking for version of polytable... 0.8.2<br>    checking whether polytable needs to be installed... no<br>    checking for mktexlsr... /usr/local/texlive/2008/bin/universal-darwin/mktexlsr<br>    configure: creating ./config.status<br>

    config.status: creating <a href="http://config.mk">config.mk</a><br>    config.status: creating Version.lhs<br>    config.status: creating lhs2TeX.1<br>    config.status: creating doc/InteractiveHugs.lhs<br>    config.status: creating doc/InteractivePre.lhs<br>

    Configuration succesfully completed.<br>    Say<br>         make               to compile and build documentation<br>         make bin           to compile the binary only<br>         make install       to (compile and) install<br>

<br>[edit happens here, changing Control.Exception to Control.OldException.]<br><br>    bash-3.2$ ./configure<br>    bash: ./configure: Permission denied<br>    bash-3.2$ sh configure<br>    checking for ghc... /usr/bin/ghc<br>

    checking for hugs... no<br>    checking for a BSD-compatible install... /usr/bin/install -c<br>    checking whether ln -s works... yes<br>    checking for mv... /bin/mv<br>    checking for cp... /bin/cp<br>    checking for rm... /bin/rm<br>

    checking for mkdir... /bin/mkdir<br>    checking for touch... /usr/bin/touch<br>    checking for diff... /usr/bin/diff<br>    checking for grep... /usr/bin/grep<br>    checking for sed... /usr/bin/sed<br>    checking for sort... /usr/bin/sort<br>

    checking for uniq... /usr/bin/uniq<br>    checking for find... /usr/bin/find<br>    checking for latex... /usr/local/texlive/2008/bin/universal-darwin/latex<br>    checking for pdflatex... /usr/local/texlive/2008/bin/universal-darwin/pdflatex<br>

    checking for xdvi... /usr/local/texlive/2008/bin/universal-darwin/xdvi<br>    checking for gv... no<br>    checking for dvips... /usr/local/texlive/2008/bin/universal-darwin/dvips<br>    checking for kpsewhich... /usr/local/texlive/2008/bin/universal-darwin/kpsewhich<br>

    checking for a texmf tree... /usr/local/texlive/2008/../texmf-local<br>    checking for texmf.cnf... yes<br>    checking for the polytable package... /usr/local/texlive/2008/texmf-dist/tex/latex/polytable/polytable.sty<br>

    checking for version of polytable... 0.8.2<br>    checking whether polytable needs to be installed... no<br>    checking for mktexlsr... /usr/local/texlive/2008/bin/universal-darwin/mktexlsr<br>    configure: creating ./config.status<br>

    config.status: creating <a href="http://config.mk">config.mk</a><br>    config.status: creating Version.lhs<br>    config.status: creating lhs2TeX.1<br>    config.status: creating doc/InteractiveHugs.lhs<br>    config.status: creating doc/InteractivePre.lhs<br>

    Configuration succesfully completed.<br>    Say<br>         make               to compile and build documentation<br>         make bin           to compile the binary only<br>         make install       to (compile and) install<br>

    bash-3.2$ make<br>    [...]<br>    /usr/bin/grep &quot;^%include &quot; Main.lhs | /usr/bin/sed -e &#39;s,^%include ,Main.tex : ,&#39; | /usr/bin/sort | /usr/bin/uniq &gt; Main.ld; \<br>            /bin/cp Main.ld Main.ldd; \<br>

            /usr/bin/sed -e &#39;s/#.*//&#39; -e &#39;s/^[^:]*: *//&#39; -e &#39;s/ *\\$//&#39; -e &#39;/^$/ d&#39; -e &#39;s/$/ :/&#39; &lt; Main.ldd &gt;&gt; Main.ld; \<br>            /bin/rm -f Main.ldd<br>    /usr/bin/ghc -O --make -o lhs2TeX Main.lhs<br>

    [ 1 of 19] Compiling Document         ( Document.lhs, Document.o )<br>    [ 2 of 19] Compiling Auxiliaries      ( Auxiliaries.lhs, Auxiliaries.o )<br>    [ 3 of 19] Compiling StateT           ( StateT.lhs, StateT.o )<br>

    [ 4 of 19] Compiling Verbatim         ( Verbatim.lhs, Verbatim.o )<br>    [ 5 of 19] Compiling Value            ( Value.lhs, Value.o )<br>    [ 6 of 19] Compiling FiniteMap        ( FiniteMap.lhs, FiniteMap.o )<br>    [ 7 of 19] Compiling TeXCommands      ( TeXCommands.lhs, TeXCommands.o )<br>

    [ 8 of 19] Compiling HsLexer          ( HsLexer.lhs, HsLexer.o )<br>    [ 9 of 19] Compiling TeXParser        ( TeXParser.lhs, TeXParser.o )<br>    [10 of 19] Compiling Parser           ( Parser.lhs, Parser.o )<br>    [11 of 19] Compiling Directives       ( Directives.lhs, Directives.o )<br>

    [12 of 19] Compiling Typewriter       ( Typewriter.lhs, Typewriter.o )<br>    [13 of 19] Compiling MathCommon       ( MathCommon.lhs, MathCommon.o )<br>    [14 of 19] Compiling MathPoly         ( MathPoly.lhs, MathPoly.o )<br>

    [15 of 19] Compiling NewCode          ( NewCode.lhs, NewCode.o )<br>    [16 of 19] Compiling Math             ( Math.lhs, Math.o )<br>    [17 of 19] Compiling FileNameUtils    ( FileNameUtils.lhs, FileNameUtils.o )<br>

    [18 of 19] Compiling Version          ( Version.lhs, Version.o )<br>    [19 of 19] Compiling Main             ( Main.lhs, Main.o )<br>    ghc: panic! (the &#39;impossible&#39; happened)<br>      (GHC version 6.10.3 for i386-apple-darwin):<br>

            cat_evals<br>        base:GHC.Arr.Array{d rau}<br>        [ww{v aFwM} [lid], ww1{v aFwN} [lid], ww2{v aFwO} [lid]]<br>        [!, !, _, _]<br><br>    Please report this as a GHC bug:  <a href="http://www.haskell.org/ghc/reportabug">http://www.haskell.org/ghc/reportabug</a><br>

<br>    make: *** [lhs2TeX] Error 1<br>    bash-3.2$ <br><br>Hm!  Gremlins.<br><br>    - Conal<br><br><div class="gmail_quote">On Mon, Jul 27, 2009 at 11:22 AM, Don Stewart <span dir="ltr">&lt;<a href="mailto:dons@galois.com">dons@galois.com</a>&gt;</span> wrote:<br>

<blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">conal:<br>
<div><div></div><div class="h5">&gt; Fails during configuration:<br>
&gt;<br>
&gt; bash-3.2$ cabal install lhs2tex<br>
&gt;     Resolving dependencies...<br>
&gt;     [1 of 1] Compiling Main             ( /tmp/lhs2tex-1.1423397/lhs2tex-1.14/<br>
&gt; Setup.hs, /tmp/lhs2tex-1.1423397/lhs2tex-1.14/dist/setup/Main.o )<br>
&gt;     Linking /tmp/lhs2tex-1.1423397/lhs2tex-1.14/dist/setup/setup ...<br>
&gt;     Configuring lhs2tex-1.14...<br>
&gt;     cabal: Error: some packages failed to install:<br>
&gt;     lhs2tex-1.14 failed during the configure step. The exception was:<br>
&gt;     exit: ExitFailure 11<br>
&gt;<br>
&gt; Note that the the first module to be compiled is Main.  On my linux machine,<br>
&gt; Main is the *last* of several modules to be compiled.<br>
&gt;<br>
&gt; Here&#39;s my failure log: <a href="http://moonpatio.com/fastcgi/hpaste.fcgi/view?id=3096#" target="_blank">http://moonpatio.com/fastcgi/hpaste.fcgi/view?id=3096#</a><br>
&gt; a3096 .<br>
&gt;<br>
&gt; If instead I use ./configure and make, i get errors due to use of the old<br>
&gt; Exception API:<br>
&gt;<br>
&gt;     ...<br>
&gt;     [17 of 19] Compiling FileNameUtils    ( FileNameUtils.lhs, FileNameUtils.o<br>
&gt; )<br>
&gt;<br>
&gt;     FileNameUtils.lhs:81:35:<br>
&gt;         Ambiguous type variable `b&#39; in the constraint:<br>
&gt;           `GHC.Exception.Exception b&#39;<br>
&gt;             arising from a use of `catch&#39; at FileNameUtils.lhs:(81,35)-(89,60)<br>
&gt;         Probable fix: add a type signature that fixes these type variable(s)<br>
&gt;     ...<br>
&gt;<br>
&gt; Suggestions greatly appreciated!<br>
<br>
</div></div>Via cabal:<br>
<br>
    --constraint=&#39;base&lt;4&#39;<br>
<br>
or replace Control.Exception with Control.OldException<br>
<br>
or add &#39;base &lt; 4&#39;  to the depends in the .cabal file.<br>
<font color="#888888"><br>
-- Don<br>
</font></blockquote></div><br>