<html>
  <head>
    <meta content="text/html; charset=ISO-8859-1"
      http-equiv="Content-Type">
  </head>
  <body bgcolor="#FFFFFF" text="#000000">
    <div class="moz-cite-prefix">FWIW, some very core libraries do this:<br>
      <meta http-equiv="content-type" content="text/html;
        charset=ISO-8859-1">
      <a
href="http://hackage.haskell.org/packages/archive/bytestring/0.10.2.0/doc/html/src/Data-ByteString.html">http://hackage.haskell.org/packages/archive/bytestring/0.10.2.0/doc/html/src/Data-ByteString.html</a><br>
      <br>
      (see very top of linked source file)<br>
      <br>
      Perhaps a more general solution would be for GHC to take the
      internet explorer route and require a special javascript include
      in each source file to get compatibility :)<br>
      <br>
      -A<br>
      <br>
      On 11/23/2012 03:34 PM, Roman Cheplyaka wrote:<br>
    </div>
    <blockquote cite="mid:20121123233427.GA27705@sniper" type="cite">
      <pre wrap="">* Herbert Valerio Riedel <a class="moz-txt-link-rfc2396E" href="mailto:hvr@gnu.org">&lt;hvr@gnu.org&gt;</a> [2012-11-24 00:06:44+0100]
</pre>
      <blockquote type="cite">
        <pre wrap="">Roman Cheplyaka <a class="moz-txt-link-rfc2396E" href="mailto:roma@ro-che.info">&lt;roma@ro-che.info&gt;</a> writes:
</pre>
        <blockquote type="cite">
          <pre wrap="">It has been pointed out before that in order for Safe Haskell to be
useful, libraries (especially core libraries) should be annotated
properly with Safe Haskell LANGUAGE pragmas.

However, that would make these libraries unusable with alternative
Haskell implementations, even if otherwise they these libraries are
Haskell2010.

To quote the standard:

  If a Haskell implementation does not recognize or support a particular
  language feature that a source file requests (or cannot support the
  combination of language features requested), any attempt to compile or
  otherwise use that file with that Haskell implementation must fail
  with an error. 

Should it be advised to surround safe annotations with CPP #ifs?
Or does anyone see a better way out of this contradiction?
</pre>
        </blockquote>
        <pre wrap="">
...but IIRC CPP isn't part of Haskell2010, or is it?
</pre>
      </blockquote>
      <pre wrap="">
It isn't indeed. But:

1) it's a very basic extension which is supported by (almost?) all
   existing implementations; or
2) if you want to be 100% Haskell2010, you can name your file *.cpphs and
   let Cabal do preprocessing.

1) is a compromise and 2) is not very practical, so I'm eager to hear
other alternatives.

Roman

_______________________________________________
Haskell-Cafe mailing list
<a class="moz-txt-link-abbreviated" href="mailto:Haskell-Cafe@haskell.org">Haskell-Cafe@haskell.org</a>
<a class="moz-txt-link-freetext" href="http://www.haskell.org/mailman/listinfo/haskell-cafe">http://www.haskell.org/mailman/listinfo/haskell-cafe</a>
</pre>
    </blockquote>
    <br>
  </body>
</html>