diff --git a/Data/Aeson/Encode.hs b/Data/Aeson/Encode.hs
--- a/Data/Aeson/Encode.hs
+++ b/Data/Aeson/Encode.hs
@@ -8,7 +8,8 @@
 -- Stability:   experimental
 -- Portability: portable
 --
--- Efficiently serialize a JSON value as a lazy 'L.ByteString'.
+-- Efficiently serialize a JSON value as a lazy 'L.ByteString',
+-- encoded as UTF-8.
 
 module Data.Aeson.Encode
     (
@@ -69,7 +70,9 @@
 
 fromNumber :: Number -> Builder
 fromNumber (I i) = integral i
-fromNumber (D d) = double d
+fromNumber (D d)
+    | isNaN d || isInfinite d = "null"
+    | otherwise               = double d
 
 -- | Efficiently serialize a JSON value as a lazy 'L.ByteString'.
 encode :: ToJSON a => a -> L.ByteString
diff --git a/Data/Aeson/Parser.hs b/Data/Aeson/Parser.hs
--- a/Data/Aeson/Parser.hs
+++ b/Data/Aeson/Parser.hs
@@ -8,7 +8,8 @@
 -- Stability:   experimental
 -- Portability: portable
 --
--- Efficiently and correctly parse a JSON string.
+-- Efficiently and correctly parse a JSON string.  The string must be
+-- encoded as UTF-8.
 
 module Data.Aeson.Parser
     (
diff --git a/Data/Aeson/Types.hs b/Data/Aeson/Types.hs
--- a/Data/Aeson/Types.hs
+++ b/Data/Aeson/Types.hs
@@ -393,13 +393,13 @@
     {-# INLINE parseJSON #-}
 
 instance ToJSON Float where
-    toJSON = Number . fromRational . toRational
+    toJSON = Number . realToFrac
     {-# INLINE toJSON #-}
 
 instance FromJSON Float where
-    parseJSON (Number n) = case n of
-                             D d -> pure . fromRational . toRational $ d
-                             I i -> pure (fromIntegral i)
+    parseJSON (Number n) = pure $ case n of
+                                    D d -> realToFrac d
+                                    I i -> fromIntegral i
     parseJSON Null       = pure (0/0)
     parseJSON v          = typeMismatch "Float" v
     {-# INLINE parseJSON #-}
@@ -409,9 +409,9 @@
     {-# INLINE toJSON #-}
 
 instance FromJSON (Ratio Integer) where
-    parseJSON (Number n) = case n of
-                             D d -> pure . toRational $ d
-                             I i -> pure (fromIntegral i)
+    parseJSON (Number n) = pure $ case n of
+                                    D d -> toRational d
+                                    I i -> fromIntegral i
     parseJSON v          = typeMismatch "Ratio Integer" v
     {-# INLINE parseJSON #-}
 
diff --git a/README.markdown b/README.markdown
--- a/README.markdown
+++ b/README.markdown
@@ -2,6 +2,17 @@
 
 aeson is a fast Haskell library for working with JSON data.
 
+# Important note for users of GHCi and Template Haskell
+
+This package depends on the [blaze-textual
+package](http://hackage.haskell.org/package/blaze-textual) , and is
+unfortunately subject to crashes if you use GHCi or Template Haskell
+in your work.
+
+For complete details, including a workaround, see the writeup in [the
+blaze-textual
+README](https://github.com/mailrank/blaze-textual#readme).
+
 # Join in!
 
 We are happy to receive bug reports, fixes, documentation enhancements,
diff --git a/aeson.cabal b/aeson.cabal
--- a/aeson.cabal
+++ b/aeson.cabal
@@ -1,5 +1,5 @@
 name:            aeson
-version:         0.3.2.9
+version:         0.3.2.10
 license:         BSD3
 license-file:    LICENSE
 category:        Text, Web, JSON
@@ -17,6 +17,11 @@
     A JSON parsing and encoding library optimized for ease of use
     and high performance.
     .
+    /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/aeson#readme>
+    .
     Parsing performance on a late 2010 MacBook Pro (2.66GHz Core i7),
     for mostly-English tweets from Twitter's JSON search API:
     .
@@ -111,7 +116,7 @@
     attoparsec >= 0.8.6.1,
     base == 4.*,
     blaze-builder >= 0.2.1.4,
-    blaze-textual,
+    blaze-textual >= 0.2.0.2,
     bytestring,
     containers,
     deepseq,
diff --git a/benchmarks/AesonEncode.hs b/benchmarks/AesonEncode.hs
--- a/benchmarks/AesonEncode.hs
+++ b/benchmarks/AesonEncode.hs
@@ -39,6 +39,6 @@
             _        -> error $ "failed to read " ++ show arg
     loop 0 r
     delta <- flip diffUTCTime start `fmap` getCurrentTime
-    let rate = fromIntegral count / (fromRational . toRational) delta :: Double
+    let rate = fromIntegral count / realToFrac delta :: Double
     putStrLn $ "  " ++ show delta
     putStrLn $ "  " ++ show (round rate) ++ " per second"
diff --git a/benchmarks/AesonParse.hs b/benchmarks/AesonParse.hs
--- a/benchmarks/AesonParse.hs
+++ b/benchmarks/AesonParse.hs
@@ -29,5 +29,5 @@
     (good, _) <- loop 0 0
     delta <- flip diffUTCTime start `fmap` getCurrentTime
     putStrLn $ "  " ++ show good ++ " good, " ++ show delta
-    let rate = fromIntegral count / (fromRational . toRational) delta :: Double
+    let rate = fromIntegral count / realToFrac delta :: Double
     putStrLn $ "  " ++ show (round rate) ++ " per second"
