<html>
  <head>

    <meta http-equiv="content-type" content="text/html; charset=ISO-8859-1">
  </head>
  <body bgcolor="#FFFFFF" text="#000000">
    Hi, I have an interpreter for external core and I would like to read
    the definitions in base:Prelude. After jumping over some obstacles
    [0], I find myself here:<br>
    <br>
    &gt; ghc --make -fext-core -I./include -cpp Prelude.hs<br>
    <br>
    GHC/Num.lhs:65:27:<br>
    &nbsp;&nbsp;&nbsp; Could not deduce (base:GHC.Num.Num a) arising from the literal
    `0'<br>
    &nbsp;&nbsp;&nbsp; from the context (Num a)<br>
    &nbsp;&nbsp;&nbsp;&nbsp;&nbsp; bound by the class declaration for `Num'<br>
    &nbsp;&nbsp;&nbsp;&nbsp;&nbsp; at GHC/Num.lhs:(42,1)-(65,31)<br>
    &nbsp;&nbsp;&nbsp; Possible fix:<br>
    &nbsp;&nbsp;&nbsp;&nbsp;&nbsp; add (base:GHC.Num.Num a) to the context of<br>
    &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; the class declaration for `Num'<br>
    &nbsp;&nbsp;&nbsp; In the first argument of `(-)', namely `0'<br>
    &nbsp;&nbsp;&nbsp; In the expression: 0 - x<br>
    &nbsp;&nbsp;&nbsp; In an equation for `negate': negate x = 0 - x<br>
    <br>
    If I jump over this one with some nonsense fix (e.g. negate = id)
    then I get<br>
    <br>
    GHC/Exception.lhs:47:14:<br>
    &nbsp;&nbsp;&nbsp; Cannot derive well-kinded instance of form `Typeable<br>
    &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; * (SomeException
    ...)'<br>
    &nbsp;&nbsp;&nbsp;&nbsp;&nbsp; Class `Typeable' expects an argument of kind `k'<br>
    &nbsp;&nbsp;&nbsp; In the data declaration for `SomeException'<br>
    <br>
    GHC/Exception.lhs:169:24:<br>
    &nbsp;&nbsp;&nbsp; Cannot derive well-kinded instance of form `Typeable<br>
    &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; * (ErrorCall ...)'<br>
    &nbsp;&nbsp;&nbsp;&nbsp;&nbsp; Class `Typeable' expects an argument of kind `k'<br>
    &nbsp;&nbsp;&nbsp; In the newtype declaration for `ErrorCall'<br>
    <br>
    GHC/Exception.lhs:186:22:<br>
    &nbsp;&nbsp;&nbsp; Cannot derive well-kinded instance of form `Typeable<br>
    &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; * (ArithException
    ...)'<br>
    &nbsp;&nbsp;&nbsp;&nbsp;&nbsp; Class `Typeable' expects an argument of kind `k'<br>
    &nbsp;&nbsp;&nbsp; In the data declaration for `ArithException'<br>
    <br>
    Do you have any tips that help me? I am using the HEAD version of
    base and GHC 7.6.2. <br>
    <br>
    I also tried base-4.6.0.0 but the file HsFFI.h is looked upon and is
    not found or is not generated by ./configure (ieee-flpt.h: is a
    similar case, although I could find this one on the web [1]).<br>
    <br>
    [0] Manually compiled GHC/Event/{Poll,Clock,EPoll} with hsc2hs<br>
    [1]
    <meta http-equiv="content-type" content="text/html;
      charset=ISO-8859-1">
    <a href="http://darcs.haskell.org/packages/base/include/ieee-flpt.h">http://darcs.haskell.org/packages/base/include/ieee-flpt.h</a><br>
    <br>
    Thanks<br>
  </body>
</html>