Commits

Bryan O'Sullivan  committed 80004b5

Update the README with pointers to the double-conversion workaround.

  • Participants
  • Parent commits ed0ae90

Comments (0)

Files changed (2)

File README.markdown

-# Welcome to aeson
+# Welcome to blaze-textual
 
 blaze-textual is a fast Haskell library for rendering common Haskell
 datatypes in text form using the
 [blaze-builder](http://hackage.haskell.org/package/blaze-builder)
 library.
 
+# Important note for users of GHCi and Template Haskell
+
+To achieve excellent performance for rendering floating point numbers,
+this package uses the
+[double-conversion](http://hackage.haskell.org/package/double-conversion)
+package.
+
+Unfortunately, due to bugs in GHC, some uses of GHCi and Template
+Haskell can crash if this package is loaded.
+
+* [5289: Can't use ghci with a library linked against
+  libstdc++](http://hackage.haskell.org/trac/ghc/ticket/5289) (fixed
+  in GHC 7.2.1).
+
+* [5386: GHCi crashes with SIGFPE when using double-conversion
+  package](http://hackage.haskell.org/trac/ghc/ticket/5386) (not yet
+  fixed at the time of writing)
+
+If you are affected by these problems, you should expect the 5289
+crash to look like this:
+
+    Loading package double-conversion-0.2.0.0 ... can't load .so/.DLL for: stdc++
+
+The 5386 crash causes GHCi to die with a floating point exception
+(SIGFPE).
+
+To work around these bugs, this package includes an alternative,
+slower, floating point conversion that is written in pure Haskell.
+Because it is 10 times slower than the double-conversion package, it
+is not the default.
+
+To use it, reinstall this package by passing the `native` flag to
+`cabal`:
+
+    cabal install -fnative
+
+Afterwards, you will also need to reinstall any downstream packages
+that depend on this one, e.g. the [aeson JSON
+library](http://hackage.haskell.org/package/aeson):
+
+    cabal install aeson --reinstall
+
 # Join in!
 
 We are happy to receive bug reports, fixes, documentation

File blaze-textual.cabal

 description:
     A library for efficiently rendering Haskell datatypes to
     bytestrings.
+    .
+    /Note/: if you use GHCi or Template Haskell, please see the
+    @README@ file for important details about building this package,
+    and other packages that depend on it:
+    <https://github.com/mailrank/blaze-textual#readme>
 
 extra-source-files:
     README.markdown
+    tests/*.hs
 
 flag developer
   description: operate in developer mode