diff --git a/examples/canvaswater.hs b/examples/canvaswater.hs
--- a/examples/canvaswater.hs
+++ b/examples/canvaswater.hs
@@ -50,11 +50,10 @@
 
 -- | A DOM element.
 data Element
-instance Foreign Element
 instance Eventable Element
 
 -- | Add an event listener to an element.
-addEventListener :: (Foreign a,Eventable a) => a -> String -> Fay () -> Bool -> Fay ()
+addEventListener :: (Eventable a) => a -> String -> Fay () -> Bool -> Fay ()
 addEventListener = ffi "%1['addEventListener'](%2,%3,%4)"
 
 -- | Get an element by its ID.
@@ -65,7 +64,6 @@
 -- Images
 
 data Image
-instance Foreign Image
 instance Eventable Image
 
 -- | Make a new image.
@@ -81,7 +79,6 @@
 
 -- | A canvas context.
 data Context
-instance Foreign Context
 
 -- | Get an element by its ID.
 getContext :: Element -> String -> Fay Context
@@ -116,25 +113,24 @@
 
 -- | A mutable reference like IORef.
 data Ref a
-instance Foreign a => Foreign (Ref a)
 
 -- | Make a new mutable reference.
-newRef :: Foreign a => a -> Fay (Ref a)
+newRef :: a -> Fay (Ref a)
 newRef = ffi "new Fay$$Ref(%1)"
 
 -- | Replace the value in the mutable reference.
-writeRef :: Foreign a => Ref a -> a -> Fay ()
+writeRef :: Ref a -> a -> Fay ()
 writeRef = ffi "Fay$$writeRef(%1,%2)"
 
 -- | Get the referred value from the mutable value.
-readRef :: Foreign a => Ref a -> Fay a
+readRef :: Ref a -> Fay a
 readRef = ffi "Fay$$readRef(%1)"
 
 --------------------------------------------------------------------------------
 -- Misc
 
 -- | Alert using window.alert.
-alert :: Foreign a => a -> Fay ()
+alert :: a -> Fay ()
 alert = ffi "window['alert'](%1)"
 
 -- | Alert using window.alert.
diff --git a/examples/console.hs b/examples/console.hs
--- a/examples/console.hs
+++ b/examples/console.hs
@@ -5,6 +5,7 @@
 
 main = putStrLn (showInt (fib 10))
 
+fib :: Int -> Int
 fib 0 = 0
 fib 1 = 1
 fib n = fib (n - 1) + fib (n - 2)
diff --git a/examples/data.hs b/examples/data.hs
--- a/examples/data.hs
+++ b/examples/data.hs
@@ -13,6 +13,5 @@
 
 data Foo = Foo { x :: Double, y :: String, z :: Foo } | Bar
   deriving (Show)
-instance Foreign Foo
 
 main = print (show (Foo 123 "abc" Bar))
diff --git a/examples/dom.hs b/examples/dom.hs
--- a/examples/dom.hs
+++ b/examples/dom.hs
@@ -12,10 +12,9 @@
 printBody :: Fay ()
 printBody = do
   result <- documentGetElements "body"
-  print result
+  putStrLn (showDOM result)
 
 data Element
-instance Foreign Element
 instance Show (Element)
 
 documentGetElements :: String -> Fay [Element]
@@ -23,3 +22,6 @@
 
 addEventListener :: String -> Fay () -> Bool -> Fay ()
 addEventListener = ffi "window['addEventListener'](%1,%2,%3)"
+
+showDOM :: [Element] -> String
+showDOM = ffi "%1"
diff --git a/examples/ref.hs b/examples/ref.hs
--- a/examples/ref.hs
+++ b/examples/ref.hs
@@ -17,13 +17,12 @@
 
 data Ref a
 instance Show (Ref a)
-instance Foreign a => Foreign (Ref a)
 
-newRef :: Foreign a => a -> Fay (Ref a)
+newRef :: a -> Fay (Ref a)
 newRef = ffi "new Fay$$Ref(%1)"
 
-writeRef :: Foreign a => Ref a -> a -> Fay ()
+writeRef :: Ref a -> a -> Fay ()
 writeRef = ffi "Fay$$writeRef(%1,%2)"
 
-readRef :: Foreign a => Ref a -> Fay a
+readRef :: Ref a -> Fay a
 readRef = ffi "Fay$$readRef(%1)"
diff --git a/fay.cabal b/fay.cabal
--- a/fay.cabal
+++ b/fay.cabal
@@ -1,5 +1,5 @@
 name:                fay
-version:             0.14.1.0
+version:             0.14.2.0
 synopsis:            A compiler for Fay, a Haskell subset that compiles to JavaScript.
 description:         Fay is a proper subset of Haskell which is type-checked
                      with GHC, and compiled to JavaScript. It is lazy, pure, has a Fay monad,
@@ -21,39 +21,13 @@
                      .
                      /Release Notes/
                      .
-                     * Fix package resolving for nested dirs.
-                     .
-                     * Update test-cases for serialization.
-                     .
-                     * Fix fully specified parametrized type serialization.
-                     .
-                     * Full documentation.
-                     .
-                     * Change Language.Fay.* to Fay.*.
-                     .
-                     * Resolve packages using dataDir.
-                     .
-                     * Optimize FFI for embedded scripts.
-                     .
-                     * Option to not export built-ins.
-                     .
-                     * Flag to export only stdout.
-                     .
-                     * Output source of runtime rather than filename.
-                     .
-                     * Flag to output only the serialization dispatcher.
-                     .
-                     * Flag to exclude the serialization dispatcher.
-                     .
-                     * Flag to exclude stdlib from output.
-                     .
-                     * Flag to output naked decls (unwrapped).
+                     * Recursively check package directories for .hs files.
                      .
-                     * Flag to print out the runtime JS source.
+                     * Fix examples.
                      .
-                     * Flag to not export runtime.
+                     * Show line numbers in FFI errors.
                      .
-                     * Remove Language.Fay.Stdlib/Prelude, superseded by fay-base
+                     * Support () in pattern matches.
                      .
                      See full history at: <https://github.com/faylang/fay/commits>
 homepage:            http://fay-lang.org/
diff --git a/src/Fay.hs b/src/Fay.hs
--- a/src/Fay.hs
+++ b/src/Fay.hs
@@ -167,9 +167,9 @@
   InvalidDoBlock -> "invalid `do' block"
   RecursiveDoUnsupported -> "recursive `do' isn't supported"
   FfiNeedsTypeSig d -> "your FFI declaration needs a type signature: " ++ prettyPrint d
-  FfiFormatBadChars cs -> "invalid characters for FFI format string: " ++ show cs
-  FfiFormatNoSuchArg i -> "no such argument in FFI format string: " ++ show i
-  FfiFormatIncompleteArg -> "incomplete `%' syntax in FFI format string"
+  FfiFormatBadChars      srcloc cs -> printSrcLoc srcloc ++ ": invalid characters for FFI format string: " ++ show cs
+  FfiFormatNoSuchArg     srcloc i  -> printSrcLoc srcloc ++ ": no such argument in FFI format string: " ++ show i
+  FfiFormatIncompleteArg srcloc    -> printSrcLoc srcloc ++ ": incomplete `%' syntax in FFI format string"
   FfiFormatInvalidJavaScript srcloc code err ->
     printSrcLoc srcloc ++ ":" ++
     "\ninvalid JavaScript code in FFI format string:\n"
diff --git a/src/Fay/Compiler.hs b/src/Fay/Compiler.hs
--- a/src/Fay/Compiler.hs
+++ b/src/Fay/Compiler.hs
@@ -55,7 +55,7 @@
   cs <- defaultCompileState
   rs <- defaultCompileReader config
   runCompile rs
-             (cs { stateFilePath = filepath })
+             cs
              (parseResult (throwError . uncurry ParseError)
                           (fmap (\x -> execState (runPrinter (printJS x)) printConfig) . with)
                           (parseFay filepath from))
diff --git a/src/Fay/Compiler/Defaults.hs b/src/Fay/Compiler/Defaults.hs
--- a/src/Fay/Compiler/Defaults.hs
+++ b/src/Fay/Compiler/Defaults.hs
@@ -36,7 +36,6 @@
   , stateRecords = []
   , stateImported = [("Fay.Types",types)]
   , stateNameDepth = 1
-  , stateFilePath = "<unknown>"
   , stateLocalScope = S.empty
   , stateModuleScope = def
   }
diff --git a/src/Fay/Compiler/FFI.hs b/src/Fay/Compiler/FFI.hs
--- a/src/Fay/Compiler/FFI.hs
+++ b/src/Fay/Compiler/FFI.hs
@@ -39,7 +39,7 @@
            -> Type   -- ^ Type signature.
            -> Compile [JsStmt]
 compileFFI srcloc name formatstr sig = do
-  inner <- formatFFI formatstr (zip params funcFundamentalTypes)
+  inner <- formatFFI srcloc formatstr (zip params funcFundamentalTypes)
   case JS.parse JS.parseExpression (prettyPrint name) (printJSString (wrapReturn inner)) of
     Left err -> throwError (FfiFormatInvalidJavaScript srcloc inner (show err))
     Right exp  -> do
@@ -268,10 +268,11 @@
   _              -> 0
 
 -- | Format the FFI format string with the given arguments.
-formatFFI :: String                      -- ^ The format string.
+formatFFI :: SrcLoc                     -- ^ Location of the original FFI decl.
+          -> String                     -- ^ The format string.
           -> [(JsName,FundamentalType)] -- ^ Arguments.
-          -> Compile String              -- ^ The JS code.
-formatFFI formatstr args = go formatstr where
+          -> Compile String             -- ^ The JS code.
+formatFFI srcloc formatstr args = go formatstr where
   go ('%':'*':xs) = do
     these <- mapM inject (zipWith const [1..] args)
     rest <- go xs
@@ -279,10 +280,10 @@
   go ('%':'%':xs) = do
     rest <- go xs
     return ('%' : rest)
-  go ['%'] = throwError FfiFormatIncompleteArg
+  go ['%'] = throwError (FfiFormatIncompleteArg srcloc)
   go ('%':(span isDigit -> (op,xs))) =
     case readMay op of
-     Nothing -> throwError (FfiFormatBadChars op)
+     Nothing -> throwError (FfiFormatBadChars srcloc op)
      Just n -> do
        this <- inject n
        rest <- go xs
@@ -293,7 +294,7 @@
 
   inject n =
     case listToMaybe (drop (n-1) args) of
-      Nothing -> throwError (FfiFormatNoSuchArg n)
+      Nothing -> throwError (FfiFormatNoSuchArg srcloc n)
       Just (arg,typ) -> do
         return (printJSString (fayToJs SerializeAnywhere typ (JsName arg)))
 
diff --git a/src/Fay/Compiler/Pattern.hs b/src/Fay/Compiler/Pattern.hs
--- a/src/Fay/Compiler/Pattern.hs
+++ b/src/Fay/Compiler/Pattern.hs
@@ -107,6 +107,7 @@
   let boolIf b = return [JsIf (JsEq forcedExp (JsLit (JsBool b))) body []]
   case cons of
     -- Special-casing on the booleans.
+    Special UnitCon -> return (JsExpStmt forcedExp : body)
     "True" -> boolIf True
     "False" -> boolIf False
     -- Everything else, generic:
diff --git a/src/Fay/Compiler/Print.hs b/src/Fay/Compiler/Print.hs
--- a/src/Fay/Compiler/Print.hs
+++ b/src/Fay/Compiler/Print.hs
@@ -90,6 +90,8 @@
 
 -- | Print a single statement.
 instance Printable JsStmt where
+  printJS (JsExpStmt e) =
+    printJS e +> ";" +> newline
   printJS (JsBlock stmts) =
     "{ " +> stmts +> "}"
   printJS (JsVar name expr) =
diff --git a/src/Fay/Types.hs b/src/Fay/Types.hs
--- a/src/Fay/Types.hs
+++ b/src/Fay/Types.hs
@@ -82,7 +82,6 @@
 -- | State of the compiler.
 data CompileState = CompileState
   { _stateExports     :: Map ModuleName (Set QName) -- ^ Collects exports from modules
-  , stateFilePath     :: FilePath                   -- ^ Current file path. TODO: Used?
   , stateRecordTypes  :: [(QName,[QName])]          -- ^ Map types to constructors
   , stateRecords      :: [(QName,[QName])]          -- ^ Map constructors to fields
   , stateImported     :: [(ModuleName,FilePath)]    -- ^ Map of all imported modules and their source locations.
@@ -207,9 +206,9 @@
   | RecursiveDoUnsupported
   | Couldn'tFindImport ModuleName [FilePath]
   | FfiNeedsTypeSig Decl
-  | FfiFormatBadChars String
-  | FfiFormatNoSuchArg Int
-  | FfiFormatIncompleteArg
+  | FfiFormatBadChars SrcLoc String
+  | FfiFormatNoSuchArg SrcLoc Int
+  | FfiFormatIncompleteArg SrcLoc
   | FfiFormatInvalidJavaScript SrcLoc String String
   | UnableResolveUnqualified Name
   | UnableResolveQualified QName
@@ -236,6 +235,7 @@
   | JsSetPropExtern JsName JsName JsExp
   | JsContinue
   | JsBlock [JsStmt]
+  | JsExpStmt JsExp
   deriving (Show,Eq)
 
 -- | Expression type.
