diff --git a/hindent.cabal b/hindent.cabal
--- a/hindent.cabal
+++ b/hindent.cabal
@@ -1,5 +1,5 @@
 name:                hindent
-version:             4.3.9
+version:             4.3.10
 synopsis:            Extensible Haskell pretty printer
 description:         Extensible Haskell pretty printer. Both a library and an executable.
                      .
@@ -15,6 +15,14 @@
 cabal-version:       >=1.8
 data-files:          elisp/hindent.el vim/hindent.vim
 extra-source-files:  README.md
+                     test/chris-done/expected/*.exp
+                     test/chris-done/tests/*.test
+                     test/gibiansky/expected/*.exp
+                     test/gibiansky/tests/*.test
+                     test/fundamental/expected/*.exp
+                     test/fundamental/tests/*.test
+                     test/johan-tibell/expected/*.exp
+                     test/johan-tibell/tests/*.test
 
 library
   hs-source-dirs:    src/
@@ -32,6 +40,7 @@
                    , monad-loops
                    , mtl
                    , text
+                   , transformers
 
 executable hindent
   hs-source-dirs:    src/main
diff --git a/src/HIndent.hs b/src/HIndent.hs
--- a/src/HIndent.hs
+++ b/src/HIndent.hs
@@ -22,6 +22,8 @@
   )
   where
 
+import           Control.Monad.Trans.Maybe
+import           Data.Functor.Identity
 import           HIndent.Pretty
 import           HIndent.Styles.ChrisDone (chrisDone)
 import           HIndent.Styles.Fundamental (fundamental)
@@ -67,8 +69,11 @@
 prettyPrint style m =
   case style of
     Style _name _author _desc st extenders config ->
-      psOutput (execState (runPrinter m)
-                          (PrintState 0 mempty False 0 1 st extenders config False False))
+      maybe (error "Printer failed with mzero call.")
+            psOutput
+            (runIdentity
+               (runMaybeT (execStateT (runPrinter m)
+                                      (PrintState 0 mempty False 0 1 st extenders config False False))))
 
 -- | Parse mode, includes all extensions, doesn't assume any fixities.
 parseMode :: ParseMode
diff --git a/src/HIndent/Pretty.hs b/src/HIndent/Pretty.hs
--- a/src/HIndent/Pretty.hs
+++ b/src/HIndent/Pretty.hs
@@ -59,6 +59,8 @@
   )
   where
 
+import           Control.Monad.Trans.Maybe
+import           Data.Functor.Identity
 import           HIndent.Types
 
 import           Language.Haskell.Exts.Comments
@@ -97,7 +99,10 @@
            printComments Before a
            depend
              (case listToMaybe (mapMaybe (makePrinter s) es) of
-                Just (Printer m) -> modify (execState m)
+                Just (Printer m) ->
+                  modify (\s ->
+                            fromMaybe s
+                                      (runIdentity (runMaybeT (execStateT m s))))
                 Nothing -> prettyNoExt a)
              (printComments After a)
   where makePrinter s (Extender f) =
diff --git a/src/HIndent/Styles/Gibiansky.hs b/src/HIndent/Styles/Gibiansky.hs
--- a/src/HIndent/Styles/Gibiansky.hs
+++ b/src/HIndent/Styles/Gibiansky.hs
@@ -458,13 +458,21 @@
 writeCaseAlts :: [Alt NodeInfo] -> Printer State ()
 writeCaseAlts alts = do
   allSingle <- and <$> mapM isSingle alts
-  withCaseContext True $ indented indentSpaces $
-    if allSingle
-      then do
-        maxPatLen <- maximum <$> mapM (patternLen . altPattern) alts
-        lined $ map (prettyCase $ Just maxPatLen) alts
-      else lined $ map (prettyCase Nothing) alts
+  withCaseContext True $ indented indentSpaces $ do
+    prettyPr <- if allSingle
+                then do
+                  maxPatLen <- maximum <$> mapM (patternLen . altPattern) alts
+                  return $ prettyCase (Just maxPatLen)
+                else return $ prettyCase Nothing
 
+    case alts of 
+      [] -> return ()
+      first:rest -> do
+        prettyPr first
+        forM_ (zip alts rest) $ \(prev, cur) -> do
+          replicateM_ (max 1 $ lineDelta cur prev) newline
+          prettyPr cur
+
   where
     isSingle :: Alt NodeInfo -> Printer State Bool
     isSingle alt' = fst <$> sandbox
@@ -635,6 +643,7 @@
   onSeparateLines binds
 writeWhereBinds binds = prettyNoExt binds
 
+-- Print all the ASTs on separate lines, respecting user spacing.
 onSeparateLines :: (Pretty ast, Annotated ast) => [ast NodeInfo] -> Printer State ()
 onSeparateLines vals@(first:rest) = do
   pretty first
diff --git a/src/HIndent/Types.hs b/src/HIndent/Types.hs
--- a/src/HIndent/Types.hs
+++ b/src/HIndent/Types.hs
@@ -19,9 +19,12 @@
   ) where
 
 import Control.Applicative
-import Control.Monad.State.Strict (MonadState(..),State)
+import Control.Monad
+import Control.Monad.State.Strict (MonadState(..),StateT)
+import Control.Monad.Trans.Maybe
 import Data.Data
 import Data.Default
+import Data.Functor.Identity
 import Data.Int (Int64)
 import Data.Text (Text)
 import Data.Text.Lazy.Builder (Builder)
@@ -30,8 +33,8 @@
 
 -- | A pretty printing monad.
 newtype Printer s a =
-  Printer {runPrinter :: State (PrintState s) a}
-  deriving (Applicative,Monad,Functor,MonadState (PrintState s))
+  Printer {runPrinter :: StateT (PrintState s) (MaybeT Identity) a}
+  deriving (Applicative,Monad,Functor,MonadState (PrintState s),MonadPlus,Alternative)
 
 -- | The state of the pretty printer.
 data PrintState s =
diff --git a/test/chris-done/expected/1.exp b/test/chris-done/expected/1.exp
new file mode 100644
--- /dev/null
+++ b/test/chris-done/expected/1.exp
@@ -0,0 +1,11 @@
+import Data.Text
+
+import Data.Text
+
+import qualified Data.Text as T
+
+import qualified Data.Text (a, b, c)
+
+import Data.Text (a, b, c)
+
+import Data.Text hiding (a, b, c)
diff --git a/test/chris-done/expected/10.exp b/test/chris-done/expected/10.exp
new file mode 100644
--- /dev/null
+++ b/test/chris-done/expected/10.exp
@@ -0,0 +1,40 @@
+unless hello $
+case thing of
+  Left a -> 3
+  Right b -> 5
+
+when hello $
+case thing of
+  Left a -> 3
+  Right b -> 5
+
+a = 
+  \line -> 
+    case a of
+      Left a -> a
+      Right b -> b
+
+map (\x -> x)
+    [1,2,3]
+
+forM_ lst $
+\x -> do putStrLn x
+
+forM_ lst $ \x -> putStrLn x
+
+Value <$> thing <*> secondThing
+
+Value <$> thing <*> secondThing <*> thirdThing <*> fourthThing <*>
+Just thisissolong <*>
+Just stilllonger
+
+f e = 5
+  where a = b
+
+a = b
+  where c = d
+        e = f
+
+a = b
+  where c = d
+        e = f
diff --git a/test/chris-done/expected/11.exp b/test/chris-done/expected/11.exp
new file mode 100644
--- /dev/null
+++ b/test/chris-done/expected/11.exp
@@ -0,0 +1,56 @@
+data A
+  = B              -- ^ hi
+  | C Int         -- ^ hi
+  | D Float       -- ^ hi
+  | E Float
+      Float -- ^ hi
+
+data A
+  = B              -- ^ hi
+                   -- continuing the comment
+  | C Int         -- ^ hi
+  | D Float       -- ^ hi
+  | E Float
+      Float -- ^ hi
+            -- continuing the comment
+
+a = 
+  case x of
+    Nothing -> 2
+    Just something -> 3
+
+a = 
+  case x of
+    Nothing -> do putStrLn "hi"
+    Just something -> 3
+
+a = 
+  case x of
+    Nothing -> 
+      case y of
+        1 -> 2
+        3 -> 4
+    Just something -> 3
+
+a = 
+  case x of
+    Nothing -> 2
+    Just x -> 10
+    Just something -> 3
+
+a = 
+  case x of
+    Nothing -> 2
+    Just x -> 10
+    Just something -> do putStrLn "hello"
+
+data X =
+  X {a :: Int    -- ^ hi
+    ,b :: String -- ^ hi
+    }
+
+data X =
+  X {a :: Int    -- ^ hi
+    ,b :: String -- ^ hi
+                 -- continued
+    }
diff --git a/test/chris-done/expected/12.exp b/test/chris-done/expected/12.exp
new file mode 100644
--- /dev/null
+++ b/test/chris-done/expected/12.exp
@@ -0,0 +1,37 @@
+module Main where
+
+module Main where
+
+module Main () where
+
+module Main () where
+
+module Main (main) where
+
+module Main (main, main2) where
+
+module Main (main, main2) where
+
+module Main (main, main2, main3) where
+
+module Main (main, main2, main3, main4) where
+
+module Main (main, main2, main3, main4) where
+
+module Main (main, main2, main3, main4, main5) where
+
+module Main (main, main2, main3, main4, main5) where
+
+module Main (main, main2, main3, main4, main5, main6) where
+
+module Main (main, main2, main3, main4, main5, main6) where
+
+module Main (main, main2, main3, main4, main5) where
+
+module Main (main, main2, main3, main4, main5) where
+
+module Main (main) where
+import Text.Hello
+
+module Main (main, main2, main3, main4, main5) where
+import Text.Hello
diff --git a/test/chris-done/expected/13.exp b/test/chris-done/expected/13.exp
new file mode 100644
--- /dev/null
+++ b/test/chris-done/expected/13.exp
@@ -0,0 +1,27 @@
+a = b
+  where blah = blah
+        -- hello
+        -- bye
+        hello = hello
+
+a = b
+  where blah = blah
+        -- bye
+        hello = hello
+
+foo = x -- test
+  where x = blah
+
+foo = x
+  where 
+        -- another test
+        x = blah
+
+f = 
+  case undefined of
+    Just p
+    -- If it's the potato.
+      | zot -> undefined
+      |
+      -- The geriatric concumbine.
+        otherwise -> hael
diff --git a/test/chris-done/expected/14.exp b/test/chris-done/expected/14.exp
new file mode 100644
--- /dev/null
+++ b/test/chris-done/expected/14.exp
@@ -0,0 +1,10 @@
+x = \y -> y
+
+(1,2)
+
+f x = 3
+f x = 3
+
+f x
+  | x == y = 3
+  | x == y = 3
diff --git a/test/chris-done/expected/15.exp b/test/chris-done/expected/15.exp
new file mode 100644
--- /dev/null
+++ b/test/chris-done/expected/15.exp
@@ -0,0 +1,42 @@
+a = 
+  veryLongLongLongName veryLongLongLongArg veryLongLongLongArg veryLongLongLongArg
+
+a = 
+  veryLongLongLongName veryLongLongLongArg
+                       veryLongLongLongArg
+                       veryLongLongLongArg
+                       veryLongLongLongArg
+
+a = 
+  veryLongLongLongName veryLongLongLongArg
+                       veryLongLongLongArg
+                       veryLongLongLongArg
+                       veryLongLongLongArg
+                       veryLongLongLongArg
+
+a = 
+  veryLongLongLongName veryLongLongLongArg
+                       veryLongLongLongArg
+                       veryLongLongLongArg
+                       veryLongLongLongArg
+                       veryLongLongLongArg
+                       veryLongLongLongArg
+
+a = 
+  veryLongLongLongName veryLongLongLongLongLongLongLongLongLongLongLongLongLongLongLongLongLongLongLongArg
+                       veryLongLongLongArg
+                       veryLongLongLongArg
+                       veryLongLongLongArg
+                       veryLongLongLongArg
+                       veryLongLongLongArg
+
+tests = 
+  hello [name "space space space space space space space space space space space" thing
+        ,name "space space space space space space space space space space space" thing
+        ,name "space space space space space space space space space space space" thing]
+
+tests = 
+  hello goodbye
+        [name "space space space space space space space space space space space" thing
+        ,name "space space space space space space space space space space space" thing
+        ,name "space space space space space space space space space space space" thing]
diff --git a/test/chris-done/expected/16.exp b/test/chris-done/expected/16.exp
new file mode 100644
--- /dev/null
+++ b/test/chris-done/expected/16.exp
@@ -0,0 +1,3 @@
+instance A B where
+  f x = 3
+  f y = 3
diff --git a/test/chris-done/expected/17.exp b/test/chris-done/expected/17.exp
new file mode 100644
--- /dev/null
+++ b/test/chris-done/expected/17.exp
@@ -0,0 +1,3 @@
+type EventSource a = (AddHandler a,a -> IO ())
+
+type EventSource a = (AddHandler a,a -> IO ())
diff --git a/test/chris-done/expected/18.exp b/test/chris-done/expected/18.exp
new file mode 100644
--- /dev/null
+++ b/test/chris-done/expected/18.exp
@@ -0,0 +1,19 @@
+a = b {c = "d"}
+
+a = 
+  b {c = "d"
+    ,e = "f"}
+
+longLines = 
+  longLines {longLines = "word word word word"
+            ,wordWordWordWord = "long lines long long long"}
+
+a = B {c = "d"}
+
+a = 
+  B {c = "d"
+    ,e = "f"}
+
+longLines = 
+  LongLines {longLines = "word word word word"
+            ,wordWordWordWord = "long lines long long long"}
diff --git a/test/chris-done/expected/19.exp b/test/chris-done/expected/19.exp
new file mode 100644
--- /dev/null
+++ b/test/chris-done/expected/19.exp
@@ -0,0 +1,15 @@
+value = value
+  where b = 
+          case x of
+            x -> x
+            y -> y
+        a :: b
+        a = 3
+
+value = value
+  where b = 
+          case x of
+            x -> x
+            y -> y
+        a :: b
+        a = 3
diff --git a/test/chris-done/expected/2.exp b/test/chris-done/expected/2.exp
new file mode 100644
--- /dev/null
+++ b/test/chris-done/expected/2.exp
@@ -0,0 +1,27 @@
+fun :: a -> b
+
+fun :: a -> f b -> g c d
+
+fun :: Class a
+    => a -> b -> c
+
+fun :: (Class a,Class b)
+    => a -> b -> c
+
+fun :: a -> b -> c
+
+fun :: a -> b -> c
+
+fun :: a -> b -> c
+
+fun :: a
+    -> b -- ^ Hello
+    -> c
+
+fun :: a -> b -> c -- ^ Hello
+
+fun :: (Class a,Class b)
+    => a -> b -> c -- ^ Hello
+
+fun :: (Class a,Class b)
+    => a -> b -> c -- ^ Hello
diff --git a/test/chris-done/expected/3.exp b/test/chris-done/expected/3.exp
new file mode 100644
--- /dev/null
+++ b/test/chris-done/expected/3.exp
@@ -0,0 +1,45 @@
+let x = y
+    z = w
+in x
+
+let x = y
+    z = w
+in x
+
+a = 
+  let x = y
+      z = w
+  in x
+
+a = 
+  let x = y
+      z = w
+  in x
+
+let x = y
+    z = w
+in x
+
+let z = w
+in x
+
+a = 
+  let z = w
+  in x
+
+a = 
+  let z = w
+  in x
+
+f x = 
+  let g x = 5
+      g x = 5
+  in 3
+
+f = 
+  let y = z
+  in z
+
+f x = 
+  let y = z
+  in z
diff --git a/test/chris-done/expected/4.exp b/test/chris-done/expected/4.exp
new file mode 100644
--- /dev/null
+++ b/test/chris-done/expected/4.exp
@@ -0,0 +1,51 @@
+data A =
+  B 
+
+data A =
+  B  -- ^ Hello
+
+data A =
+  B  -- ^ Hello
+
+data A =
+  B  -- ^ Hello
+
+data A
+  = B 
+  | C 
+
+data A
+  = B 
+  | C 
+  | D 
+
+data A
+  = B 
+  | C 
+  | D 
+
+data A
+  = B 
+  | C 
+  | D 
+
+data A
+  = B 
+  | C 
+  | D 
+  deriving (Show)
+
+data A
+  = B 
+  | C 
+  | D 
+  deriving (Show,Eq)
+
+data A =
+  B Int
+  deriving (Show,Eq)
+
+data A
+  = B Int
+  | C String
+  deriving (Show,Eq)
diff --git a/test/chris-done/expected/5.exp b/test/chris-done/expected/5.exp
new file mode 100644
--- /dev/null
+++ b/test/chris-done/expected/5.exp
@@ -0,0 +1,45 @@
+data A =
+  B {field :: Int}
+
+data A =
+  B {field :: Int
+    ,field2 :: Char}
+
+data A =
+  B {field :: Int
+    ,field2 :: Char
+    ,field3 :: String}
+
+data A =
+  B {field :: Int
+    ,field2 :: Char
+    ,field3 :: String}
+  deriving (Show)
+
+data A =
+  B {field :: Int
+    ,field2 :: Char
+    ,field3 :: String}
+  deriving (Show)
+
+data A =
+  B {field :: Int
+    ,field2 :: Char
+    ,field3 :: String}
+  deriving (Show,Eq)
+
+data A =
+  B {field :: Int
+    ,field2 :: Char
+    ,field3 :: String}
+  deriving (Show,Eq)
+
+data A =
+  B {field :: Int -- ^ Field 1
+    }
+
+data A =
+  B {field :: Int  -- ^ Field 1
+    ,field2 :: Char   -- ^ field 2
+    ,field3 :: String}
+  deriving (Show)
diff --git a/test/chris-done/expected/6.exp b/test/chris-done/expected/6.exp
new file mode 100644
--- /dev/null
+++ b/test/chris-done/expected/6.exp
@@ -0,0 +1,45 @@
+a = 
+  case f x of
+    1 -> 1
+    2 -> 3
+    3 -> 4
+    _ -> 100
+
+a = 
+  case f x of
+    1 -> 1
+    2 -> 3
+    3 -> 4
+    _ -> 100
+
+a = 
+  case f x of
+    1 -> 1
+    2 -> 3
+    3 -> 4
+    _ -> 100
+
+a = 
+  case f x of
+    Nothing -> 1
+    Just x -> 3
+
+a = 
+  case f x of
+    Nothing -> 1
+    Just x -> 3
+
+a = 
+  case f x of
+    Nothing -> 1
+    Just x -> 3
+
+a = 
+  case f x of
+    Nothing -> do return 3
+    Just x -> return ()
+
+a = 
+  case f x of
+    Nothing -> do return 3
+    Just x -> do return 5
diff --git a/test/chris-done/expected/7.exp b/test/chris-done/expected/7.exp
new file mode 100644
--- /dev/null
+++ b/test/chris-done/expected/7.exp
@@ -0,0 +1,23 @@
+a = b
+  where value = 3
+        value' = 5
+
+a = b
+  where value = 3
+        value' = 5
+
+a = b
+  where value = 3
+        value' = 5
+
+a = b
+  where value = 3
+        value' = 5
+
+a = do return ()
+  where value = 3
+        value' = 5
+
+a = do return ()
+  where value = 3
+        value' = 5
diff --git a/test/chris-done/expected/8.exp b/test/chris-done/expected/8.exp
new file mode 100644
--- /dev/null
+++ b/test/chris-done/expected/8.exp
@@ -0,0 +1,29 @@
+a = [1,2,3]
+
+a = [1,2,3]
+
+a = [1,2,3]
+
+a = 
+  [Just theRightAnswerWithAVeryLongLine
+  ,Just theRightAnswerWithAVeryLongLine
+  ,Just theRightAnswerWithAVeryLongLine
+  ,Nothing]
+
+a = 
+  [Just theRightAnswerWithAVeryLongLine
+  ,Just theRightAnswerWithAVeryLongLine
+  ,Just theRightAnswerWithAVeryLongLine
+  ,Nothing]
+
+a = 
+  [Just theRightAnswerWithAVeryLongLine
+  ,Just theRightAnswerWithAVeryLongLine
+  ,Just theRightAnswerWithAVeryLongLine
+  ,Nothing]
+
+a = 
+  [Just theRightAnswerWithAVeryLongLine
+  ,Just theRightAnswerWithAVeryLongLine
+  ,Just theRightAnswerWithAVeryLongLine
+  ,Nothing]
diff --git a/test/chris-done/expected/9.exp b/test/chris-done/expected/9.exp
new file mode 100644
--- /dev/null
+++ b/test/chris-done/expected/9.exp
@@ -0,0 +1,16 @@
+import Data.Attoparsec.ByteString
+import Data.Attoparsec.Expr
+import Data.ByteString (split)
+
+import Data.Attoparsec.ByteString
+import qualified Data.Attoparsec.Expr as X
+import Data.ByteString (split)
+
+main :: IO ()
+main = return ()
+
+main :: IO ()
+main = return ()
+
+main :: a -> b -> c
+main = return ()
diff --git a/test/chris-done/tests/1.test b/test/chris-done/tests/1.test
new file mode 100644
--- /dev/null
+++ b/test/chris-done/tests/1.test
@@ -0,0 +1,11 @@
+import Data.Text
+
+import    Data.Text
+
+import qualified Data.Text as T
+
+import qualified Data.Text (a, b, c)
+
+import Data.Text (a, b, c)
+
+import Data.Text hiding (a, b, c)
diff --git a/test/chris-done/tests/10.test b/test/chris-done/tests/10.test
new file mode 100644
--- /dev/null
+++ b/test/chris-done/tests/10.test
@@ -0,0 +1,41 @@
+unless hello $
+  case thing of
+    Left a -> 3
+    Right b -> 5
+
+when hello $
+  case thing of
+    Left a -> 3
+    Right b -> 5
+
+a = \line ->
+   case a of
+     Left a -> a
+     Right b -> b
+
+map (\x -> x) [1, 2, 3]
+
+forM_ lst $ \x -> do
+  putStrLn x
+
+forM_ lst $ \x ->
+  putStrLn x
+
+Value <$> thing <*> secondThing
+
+Value <$> thing <*> secondThing <*> thirdThing <*> fourthThing <*> Just thisissolong <*> Just stilllonger
+
+f e = 5
+  where
+    a = b
+
+a = b
+  where
+    c = d
+    e = f
+
+a = b
+  where
+    c = d
+
+    e = f
diff --git a/test/chris-done/tests/11.test b/test/chris-done/tests/11.test
new file mode 100644
--- /dev/null
+++ b/test/chris-done/tests/11.test
@@ -0,0 +1,46 @@
+data A = B             -- ^ hi
+       | C Int         -- ^ hi
+       | D Float       -- ^ hi
+       | E Float Float -- ^ hi
+
+data A = B             -- ^ hi
+                       -- continuing the comment
+       | C Int         -- ^ hi
+       | D Float       -- ^ hi
+       | E Float Float -- ^ hi
+                       -- continuing the comment
+
+a = case x of
+  Nothing -> 2
+  Just something -> 3
+
+a = case x of
+  Nothing -> do
+    putStrLn "hi"
+  Just something -> 3
+
+a = case x of
+  Nothing -> case y of
+    1 -> 2
+    3 -> 4
+  Just something -> 3
+
+a = case x of
+  Nothing -> 2
+  Just x -> 10
+  Just something -> 3
+
+a = case x of
+  Nothing -> 2
+  Just x -> 10
+  Just something -> do
+    putStrLn "hello"
+
+data X = X { a :: Int    -- ^ hi
+           , b :: String -- ^ hi
+           }
+
+data X = X { a :: Int    -- ^ hi
+           , b :: String -- ^ hi
+                         -- continued
+           }
diff --git a/test/chris-done/tests/12.test b/test/chris-done/tests/12.test
new file mode 100644
--- /dev/null
+++ b/test/chris-done/tests/12.test
@@ -0,0 +1,86 @@
+module Main where
+
+module Main
+  where
+
+module Main () where
+
+module Main (
+  ) where
+
+module Main (main) where
+
+module Main (main, main2) where
+
+module Main (main,
+  main2) where
+
+module Main (main, main2, main3) where
+
+module Main (main, main2, main3, main4) where
+
+module Main (main,
+   main2,   main3,
+   main4) where
+
+module Main (
+    main,
+    main2,
+    main3,
+    main4,
+    main5,
+    ) where
+
+module Main ( main, main2, main3, main4,
+    main5,
+    ) where
+
+module Main (
+    main,
+    main2,
+    main3,
+    main4,
+    main5,
+    main6,
+    ) where
+
+module Main (
+    main, main2, main3, main4, main5, main6,
+    ) where
+
+module Main (
+    -- * A thing
+    main,
+    main2,
+
+    -- * Another thing
+    main3,
+    main4,
+
+    -- ** Another thing
+    main5,
+    ) where
+
+module Main (
+    -- * A thing
+    main, main2,
+
+    -- * Another thing
+    main3, main4,
+
+    -- ** Another thing
+    main5,) where
+
+module Main (main) where
+>
+import Text.Hello
+
+module Main (
+    main,
+    main2,
+    main3,
+    main4,
+    main5,
+    ) where
+>
+import Text.Hello
diff --git a/test/chris-done/tests/13.test b/test/chris-done/tests/13.test
new file mode 100644
--- /dev/null
+++ b/test/chris-done/tests/13.test
@@ -0,0 +1,29 @@
+a = b
+  where
+    blah = blah
+
+    -- hello
+    -- bye
+    hello = hello
+
+a = b
+  where
+    blah = blah
+
+    -- bye
+    hello = hello
+
+foo = x -- test
+  where
+    x = blah
+
+foo = x
+  where -- another test
+    x = blah
+
+f = case undefined of
+      Just p
+        -- If it's the potato.
+        | zot  -> undefined
+        -- The geriatric concumbine.
+        | otherwise -> hael
diff --git a/test/chris-done/tests/14.test b/test/chris-done/tests/14.test
new file mode 100644
--- /dev/null
+++ b/test/chris-done/tests/14.test
@@ -0,0 +1,10 @@
+x = \y -> y
+
+(1, 2)
+
+f x = 3
+f x = 3
+
+f x
+  | x == y = 3
+  | x == y = 3
diff --git a/test/chris-done/tests/15.test b/test/chris-done/tests/15.test
new file mode 100644
--- /dev/null
+++ b/test/chris-done/tests/15.test
@@ -0,0 +1,21 @@
+a = veryLongLongLongName veryLongLongLongArg veryLongLongLongArg veryLongLongLongArg
+
+a = veryLongLongLongName veryLongLongLongArg veryLongLongLongArg veryLongLongLongArg veryLongLongLongArg
+
+a = veryLongLongLongName veryLongLongLongArg veryLongLongLongArg veryLongLongLongArg veryLongLongLongArg veryLongLongLongArg
+
+a = veryLongLongLongName veryLongLongLongArg veryLongLongLongArg veryLongLongLongArg veryLongLongLongArg veryLongLongLongArg veryLongLongLongArg
+
+a = veryLongLongLongName veryLongLongLongLongLongLongLongLongLongLongLongLongLongLongLongLongLongLongLongArg veryLongLongLongArg veryLongLongLongArg veryLongLongLongArg veryLongLongLongArg veryLongLongLongArg
+
+tests = hello
+  [ name "space space space space space space space space space space space" thing
+  , name "space space space space space space space space space space space" thing
+  , name "space space space space space space space space space space space" thing
+  ]
+
+tests = hello goodbye
+  [ name "space space space space space space space space space space space" thing
+  , name "space space space space space space space space space space space" thing
+  , name "space space space space space space space space space space space" thing
+  ]
diff --git a/test/chris-done/tests/16.test b/test/chris-done/tests/16.test
new file mode 100644
--- /dev/null
+++ b/test/chris-done/tests/16.test
@@ -0,0 +1,3 @@
+instance A B where
+  f x = 3
+  f y = 3
diff --git a/test/chris-done/tests/17.test b/test/chris-done/tests/17.test
new file mode 100644
--- /dev/null
+++ b/test/chris-done/tests/17.test
@@ -0,0 +1,4 @@
+type EventSource a = (AddHandler a, a -> IO ())
+
+type EventSource a = (AddHandler a,
+  a -> IO ())
diff --git a/test/chris-done/tests/18.test b/test/chris-done/tests/18.test
new file mode 100644
--- /dev/null
+++ b/test/chris-done/tests/18.test
@@ -0,0 +1,11 @@
+a = b { c = "d" }
+
+a = b { c = "d", e = "f" }
+
+longLines = longLines { longLines = "word word word word", wordWordWordWord = "long lines long long long" }
+
+a = B { c = "d" }
+
+a = B { c = "d", e = "f" }
+
+longLines = LongLines { longLines = "word word word word", wordWordWordWord = "long lines long long long" }
diff --git a/test/chris-done/tests/19.test b/test/chris-done/tests/19.test
new file mode 100644
--- /dev/null
+++ b/test/chris-done/tests/19.test
@@ -0,0 +1,16 @@
+value = value
+  where
+    b = case x of
+      x -> x
+      y -> y
+    a :: b
+    a = 3
+
+value = value
+  where
+    b = case x of
+      x -> x
+      y -> y
+
+    a :: b
+    a = 3
diff --git a/test/chris-done/tests/2.test b/test/chris-done/tests/2.test
new file mode 100644
--- /dev/null
+++ b/test/chris-done/tests/2.test
@@ -0,0 +1,32 @@
+fun :: a -> b
+
+fun :: a -> f b -> g c d
+
+fun :: Class a => a -> b -> c
+
+fun :: (Class a, Class b) => a -> b -> c
+
+fun :: a
+    -> b
+    -> c
+
+fun :: a
+ -> b
+ -> c
+
+fun :: a
+ -> b
+   -> c
+
+fun :: a -> b -- ^ Hello
+   -> c
+
+fun :: a -> b
+   -> c -- ^ Hello
+
+fun :: (Class a, Class b) => a -> b
+   -> c -- ^ Hello
+
+fun :: (Class a, Class b) =>
+ a -> b
+   -> c -- ^ Hello
diff --git a/test/chris-done/tests/3.test b/test/chris-done/tests/3.test
new file mode 100644
--- /dev/null
+++ b/test/chris-done/tests/3.test
@@ -0,0 +1,38 @@
+let x = y
+    z = w in x
+
+let x = y
+    z = w
+    in x
+
+a = let x = y
+        z = w
+    in x
+
+a = let
+      x = y
+      z = w
+    in x
+
+let
+  x = y
+  z = w in x
+
+let
+  z = w in x
+
+a = let
+      z = w
+    in x
+
+a = let z = w
+    in x
+
+f x =
+  let g x = 5
+      g x = 5
+  in 3
+
+f = let y = z in z
+
+f x = let y = z in z
diff --git a/test/chris-done/tests/4.test b/test/chris-done/tests/4.test
new file mode 100644
--- /dev/null
+++ b/test/chris-done/tests/4.test
@@ -0,0 +1,36 @@
+data A = B
+
+data A = B -- ^ Hello
+
+data A = 
+  B -- ^ Hello
+
+data A
+  = B -- ^ Hello
+
+data A = B | C
+
+data A = B | C | D
+
+data A = B | C 
+  | D
+
+data A = B 
+  | C 
+  | D
+
+data A = B 
+  | C 
+  | D
+  deriving Show
+
+data A = B 
+  | C 
+  | D
+  deriving (Show, Eq)
+
+data A = B Int
+  deriving (Show, Eq)
+
+data A = B Int | C String
+  deriving (Show, Eq)
diff --git a/test/chris-done/tests/5.test b/test/chris-done/tests/5.test
new file mode 100644
--- /dev/null
+++ b/test/chris-done/tests/5.test
@@ -0,0 +1,27 @@
+data A = B { field :: Int }
+
+data A = B { field :: Int, field2 :: Char }
+
+data A = B { field :: Int, field2 :: Char, field3 :: String }
+
+data A = B { field :: Int,
+  field2 :: Char, field3 :: String } deriving Show
+
+data A = B { field :: Int,
+  field2 :: Char,
+  field3 :: String } deriving Show
+
+data A = B { field :: Int
+  , field2 :: Char
+  , field3 :: String } deriving (Show, Eq)
+
+data A = B { field :: Int
+  , field2 :: Char
+  , field3 :: String } deriving (Show, Eq)
+
+data A = B { field :: Int -- ^ Field 1
+   }
+
+data A = B { field :: Int, -- ^ Field 1
+  field2 :: Char,  -- ^ field 2
+  field3 :: String } deriving Show
diff --git a/test/chris-done/tests/6.test b/test/chris-done/tests/6.test
new file mode 100644
--- /dev/null
+++ b/test/chris-done/tests/6.test
@@ -0,0 +1,41 @@
+a = case f x of
+  1 -> 1
+  2 -> 3
+  3 -> 4
+  _ -> 100
+
+a = case f x of
+    1 -> 1
+    2 -> 3
+    3 -> 4
+    _ -> 100
+
+a = case 
+         f x of
+    1 -> 1
+    2 -> 3
+    3 -> 4
+    _ -> 100
+
+a = case f x of
+      Nothing -> 1
+      Just x  -> 3
+
+a = case f x of
+      Nothing -> 1
+      Just x -> 3
+
+a = case f x of
+      Nothing     -> 1
+      Just x -> 3
+
+a = case f x of
+      Nothing -> do
+        return 3
+      Just x -> return ()
+
+a = case f x of
+      Nothing -> do
+        return 3
+      Just x -> do
+        return 5
diff --git a/test/chris-done/tests/7.test b/test/chris-done/tests/7.test
new file mode 100644
--- /dev/null
+++ b/test/chris-done/tests/7.test
@@ -0,0 +1,30 @@
+a = b
+  where
+    value = 3
+    value' = 5
+
+a = b where
+  value = 3
+  value' = 5
+
+a = b
+  where value = 3
+        value' = 5
+
+a =
+  b where
+      value = 3
+      value' = 5
+
+a = do
+  return ()
+
+  where
+    value = 3
+    value' = 5
+
+a = do
+  return ()
+  where
+    value = 3
+    value' = 5
diff --git a/test/chris-done/tests/8.test b/test/chris-done/tests/8.test
new file mode 100644
--- /dev/null
+++ b/test/chris-done/tests/8.test
@@ -0,0 +1,24 @@
+a = [1, 2, 3]
+
+a = [1, 2
+    , 3]
+
+a = [ 1
+    , 2
+    , 3]
+
+a = [ Just theRightAnswerWithAVeryLongLine
+    , Just theRightAnswerWithAVeryLongLine
+    , Just theRightAnswerWithAVeryLongLine
+    , Nothing
+    ]
+
+a = [Just theRightAnswerWithAVeryLongLine, Just theRightAnswerWithAVeryLongLine, Just theRightAnswerWithAVeryLongLine, Nothing]
+
+a = [ Just theRightAnswerWithAVeryLongLine, Just theRightAnswerWithAVeryLongLine
+    , Just theRightAnswerWithAVeryLongLine, Nothing]
+
+a = [ Just theRightAnswerWithAVeryLongLine
+    , Just theRightAnswerWithAVeryLongLine
+    , Just theRightAnswerWithAVeryLongLine
+    , Nothing]
diff --git a/test/chris-done/tests/9.test b/test/chris-done/tests/9.test
new file mode 100644
--- /dev/null
+++ b/test/chris-done/tests/9.test
@@ -0,0 +1,19 @@
+import Data.Attoparsec.ByteString
+import Data.Attoparsec.Expr
+import Data.ByteString (split)
+
+import Data.Attoparsec.ByteString
+import qualified Data.Attoparsec.Expr as X
+import Data.ByteString (split)
+
+main :: IO ()
+main = return ()
+
+main :: IO ()
+main =
+  return ()
+
+main :: a -> b
+     ->  c
+main =
+  return ()
diff --git a/test/fundamental/expected/1.exp b/test/fundamental/expected/1.exp
new file mode 100644
--- /dev/null
+++ b/test/fundamental/expected/1.exp
@@ -0,0 +1,11 @@
+import Data.Text
+
+import Data.Text
+
+import qualified Data.Text as T
+
+import qualified Data.Text (a, b, c)
+
+import Data.Text (a, b, c)
+
+import Data.Text hiding (a, b, c)
diff --git a/test/fundamental/expected/10.exp b/test/fundamental/expected/10.exp
new file mode 100644
--- /dev/null
+++ b/test/fundamental/expected/10.exp
@@ -0,0 +1,63 @@
+unless
+  hello $ case thing of
+            Left a -> 
+              3
+            Right b -> 
+              5
+
+when
+  hello $ case thing of
+            Left a -> 
+              3
+            Right b -> 
+              5
+
+a = 
+  \line -> 
+     case a of
+       Left a -> 
+         a
+       Right b -> 
+         b
+
+map
+  (\x -> 
+      x)
+  [1
+  ,2
+  ,3]
+
+forM_
+  lst $ \x -> 
+           do putStrLn
+                x
+
+forM_
+  lst $ \x -> 
+           putStrLn
+             x
+
+Value <$> thing <*> secondThing
+
+Value <$> thing <*> secondThing <*> thirdThing <*> fourthThing <*> Just
+                                                                     thisissolong <*> Just
+                                                                                        stilllonger
+
+f e = 
+  5
+  where a = 
+          b
+
+a = 
+  b
+  where c = 
+          d
+        e = 
+          f
+
+a = 
+  b
+  where c = 
+          d
+        e = 
+          f
diff --git a/test/fundamental/expected/11.exp b/test/fundamental/expected/11.exp
new file mode 100644
--- /dev/null
+++ b/test/fundamental/expected/11.exp
@@ -0,0 +1,71 @@
+data A
+  = B              -- ^ hi
+  | C Int         -- ^ hi
+  | D Float       -- ^ hi
+  | E Float
+      Float -- ^ hi
+
+data A
+  = B              -- ^ hi
+                   -- continuing the comment
+  | C Int         -- ^ hi
+  | D Float       -- ^ hi
+  | E Float
+      Float -- ^ hi
+            -- continuing the comment
+
+a = 
+  case x of
+    Nothing -> 
+      2
+    Just something -> 
+      3
+
+a = 
+  case x of
+    Nothing -> 
+      do putStrLn
+           "hi"
+    Just something -> 
+      3
+
+a = 
+  case x of
+    Nothing -> 
+      case y of
+        1 -> 
+          2
+        3 -> 
+          4
+    Just something -> 
+      3
+
+a = 
+  case x of
+    Nothing -> 
+      2
+    Just x -> 
+      10
+    Just something -> 
+      3
+
+a = 
+  case x of
+    Nothing -> 
+      2
+    Just x -> 
+      10
+    Just something -> 
+      do putStrLn
+           "hello"
+
+data X =
+  X {a :: Int    -- ^ hi
+    ,b :: String -- ^ hi
+    }
+
+data X =
+  X {a :: Int    -- ^ hi
+    ,b :: String -- ^ hi
+                 -- continued
+    }
diff --git a/test/fundamental/expected/12.exp b/test/fundamental/expected/12.exp
new file mode 100644
--- /dev/null
+++ b/test/fundamental/expected/12.exp
@@ -0,0 +1,37 @@
+module Main where
+
+module Main where
+
+module Main () where
+
+module Main () where
+
+module Main (main) where
+
+module Main (main, main2) where
+
+module Main (main, main2) where
+
+module Main (main, main2, main3) where
+
+module Main (main, main2, main3, main4) where
+
+module Main (main, main2, main3, main4) where
+
+module Main (main, main2, main3, main4, main5) where
+
+module Main (main, main2, main3, main4, main5) where
+
+module Main (main, main2, main3, main4, main5, main6) where
+
+module Main (main, main2, main3, main4, main5, main6) where
+
+module Main (main, main2, main3, main4, main5) where
+
+module Main (main, main2, main3, main4, main5) where
+
+module Main (main) where
+import Text.Hello
+
+module Main (main, main2, main3, main4, main5) where
+import Text.Hello
diff --git a/test/fundamental/expected/13.exp b/test/fundamental/expected/13.exp
new file mode 100644
--- /dev/null
+++ b/test/fundamental/expected/13.exp
@@ -0,0 +1,39 @@
+a = 
+  b
+  where blah = 
+          blah
+        -- hello
+        -- bye
+        hello = 
+          hello
+
+a = 
+  b
+  where blah = 
+          blah
+        -- bye
+        hello = 
+          hello
+
+foo = 
+  x -- test
+  where x = 
+          blah
+
+foo = 
+  x
+  where 
+        -- another test
+        x = 
+          blah
+
+f = 
+  case undefined of
+    Just p
+    -- If it's the potato.
+      | zot -> 
+        undefined
+      |
+      -- The geriatric concumbine.
+        otherwise -> 
+        hael
diff --git a/test/fundamental/expected/14.exp b/test/fundamental/expected/14.exp
new file mode 100644
--- /dev/null
+++ b/test/fundamental/expected/14.exp
@@ -0,0 +1,17 @@
+x = 
+  \y -> 
+     y
+
+(1
+,2)
+
+f x = 
+  3
+f x = 
+  3
+
+f x
+  | x == y = 
+    3
+  | x == y = 
+    3
diff --git a/test/fundamental/expected/15.exp b/test/fundamental/expected/15.exp
new file mode 100644
--- /dev/null
+++ b/test/fundamental/expected/15.exp
@@ -0,0 +1,63 @@
+a = 
+  veryLongLongLongName
+    veryLongLongLongArg
+    veryLongLongLongArg
+    veryLongLongLongArg
+
+a = 
+  veryLongLongLongName
+    veryLongLongLongArg
+    veryLongLongLongArg
+    veryLongLongLongArg
+    veryLongLongLongArg
+
+a = 
+  veryLongLongLongName
+    veryLongLongLongArg
+    veryLongLongLongArg
+    veryLongLongLongArg
+    veryLongLongLongArg
+    veryLongLongLongArg
+
+a = 
+  veryLongLongLongName
+    veryLongLongLongArg
+    veryLongLongLongArg
+    veryLongLongLongArg
+    veryLongLongLongArg
+    veryLongLongLongArg
+    veryLongLongLongArg
+
+a = 
+  veryLongLongLongName
+    veryLongLongLongLongLongLongLongLongLongLongLongLongLongLongLongLongLongLongLongArg
+    veryLongLongLongArg
+    veryLongLongLongArg
+    veryLongLongLongArg
+    veryLongLongLongArg
+    veryLongLongLongArg
+
+tests = 
+  hello
+    [name
+       "space space space space space space space space space space space"
+       thing
+    ,name
+       "space space space space space space space space space space space"
+       thing
+    ,name
+       "space space space space space space space space space space space"
+       thing]
+
+tests = 
+  hello
+    goodbye
+    [name
+       "space space space space space space space space space space space"
+       thing
+    ,name
+       "space space space space space space space space space space space"
+       thing
+    ,name
+       "space space space space space space space space space space space"
+       thing]
diff --git a/test/fundamental/expected/16.exp b/test/fundamental/expected/16.exp
new file mode 100644
--- /dev/null
+++ b/test/fundamental/expected/16.exp
@@ -0,0 +1,5 @@
+instance A B where
+  f x = 
+    3
+  f y = 
+    3
diff --git a/test/fundamental/expected/17.exp b/test/fundamental/expected/17.exp
new file mode 100644
--- /dev/null
+++ b/test/fundamental/expected/17.exp
@@ -0,0 +1,3 @@
+type EventSource a = (AddHandler a,a -> IO ())
+
+type EventSource a = (AddHandler a,a -> IO ())
diff --git a/test/fundamental/expected/18.exp b/test/fundamental/expected/18.exp
new file mode 100644
--- /dev/null
+++ b/test/fundamental/expected/18.exp
@@ -0,0 +1,31 @@
+a = 
+  b {c = 
+         "d"}
+
+a = 
+  b {c = 
+         "d"
+    ,e = 
+         "f"}
+
+longLines = 
+  longLines {longLines = 
+                 "word word word word"
+            ,wordWordWordWord = 
+                 "long lines long long long"}
+
+a = 
+  B {c = 
+         "d"}
+
+a = 
+  B {c = 
+         "d"
+    ,e = 
+         "f"}
+
+longLines = 
+  LongLines {longLines = 
+                 "word word word word"
+            ,wordWordWordWord = 
+                 "long lines long long long"}
diff --git a/test/fundamental/expected/19.exp b/test/fundamental/expected/19.exp
new file mode 100644
--- /dev/null
+++ b/test/fundamental/expected/19.exp
@@ -0,0 +1,23 @@
+value = 
+  value
+  where b = 
+          case x of
+            x -> 
+              x
+            y -> 
+              y
+        a :: b
+        a = 
+          3
+
+value = 
+  value
+  where b = 
+          case x of
+            x -> 
+              x
+            y -> 
+              y
+        a :: b
+        a = 
+          3
diff --git a/test/fundamental/expected/2.exp b/test/fundamental/expected/2.exp
new file mode 100644
--- /dev/null
+++ b/test/fundamental/expected/2.exp
@@ -0,0 +1,22 @@
+fun :: a -> b
+
+fun :: a -> f b -> g c d
+
+fun :: Class a => a -> b -> c
+
+fun :: (Class a,Class b) => a -> b -> c
+
+fun :: a -> b -> c
+
+fun :: a -> b -> c
+
+fun :: a -> b -> c
+
+fun :: a -> b -- ^ Hello
+             -> c
+
+fun :: a -> b -> c -- ^ Hello
+
+fun :: (Class a,Class b) => a -> b -> c -- ^ Hello
+
+fun :: (Class a,Class b) => a -> b -> c -- ^ Hello
diff --git a/test/fundamental/expected/3.exp b/test/fundamental/expected/3.exp
new file mode 100644
--- /dev/null
+++ b/test/fundamental/expected/3.exp
@@ -0,0 +1,62 @@
+let x = 
+      y
+    z = 
+      w
+in x
+
+let x = 
+      y
+    z = 
+      w
+in x
+
+a = 
+  let x = 
+        y
+      z = 
+        w
+  in x
+
+a = 
+  let x = 
+        y
+      z = 
+        w
+  in x
+
+let x = 
+      y
+    z = 
+      w
+in x
+
+let z = 
+      w
+in x
+
+a = 
+  let z = 
+        w
+  in x
+
+a = 
+  let z = 
+        w
+  in x
+
+f x = 
+  let g x = 
+        5
+      g x = 
+        5
+  in 3
+
+f = 
+  let y = 
+        z
+  in z
+
+f x = 
+  let y = 
+        z
+  in z
diff --git a/test/fundamental/expected/4.exp b/test/fundamental/expected/4.exp
new file mode 100644
--- /dev/null
+++ b/test/fundamental/expected/4.exp
@@ -0,0 +1,51 @@
+data A =
+  B 
+
+data A =
+  B  -- ^ Hello
+
+data A =
+  B  -- ^ Hello
+
+data A =
+  B  -- ^ Hello
+
+data A
+  = B 
+  | C 
+
+data A
+  = B 
+  | C 
+  | D 
+
+data A
+  = B 
+  | C 
+  | D 
+
+data A
+  = B 
+  | C 
+  | D 
+
+data A
+  = B 
+  | C 
+  | D 
+  deriving (Show)
+
+data A
+  = B 
+  | C 
+  | D 
+  deriving (Show,Eq)
+
+data A =
+  B Int
+  deriving (Show,Eq)
+
+data A
+  = B Int
+  | C String
+  deriving (Show,Eq)
diff --git a/test/fundamental/expected/5.exp b/test/fundamental/expected/5.exp
new file mode 100644
--- /dev/null
+++ b/test/fundamental/expected/5.exp
@@ -0,0 +1,45 @@
+data A =
+  B {field :: Int}
+
+data A =
+  B {field :: Int
+    ,field2 :: Char}
+
+data A =
+  B {field :: Int
+    ,field2 :: Char
+    ,field3 :: String}
+
+data A =
+  B {field :: Int
+    ,field2 :: Char
+    ,field3 :: String}
+  deriving (Show)
+
+data A =
+  B {field :: Int
+    ,field2 :: Char
+    ,field3 :: String}
+  deriving (Show)
+
+data A =
+  B {field :: Int
+    ,field2 :: Char
+    ,field3 :: String}
+  deriving (Show,Eq)
+
+data A =
+  B {field :: Int
+    ,field2 :: Char
+    ,field3 :: String}
+  deriving (Show,Eq)
+
+data A =
+  B {field :: Int -- ^ Field 1
+    }
+
+data A =
+  B {field :: Int  -- ^ Field 1
+    ,field2 :: Char   -- ^ field 2
+    ,field3 :: String}
+  deriving (Show)
diff --git a/test/fundamental/expected/6.exp b/test/fundamental/expected/6.exp
new file mode 100644
--- /dev/null
+++ b/test/fundamental/expected/6.exp
@@ -0,0 +1,79 @@
+a = 
+  case f
+         x of
+    1 -> 
+      1
+    2 -> 
+      3
+    3 -> 
+      4
+    _ -> 
+      100
+
+a = 
+  case f
+         x of
+    1 -> 
+      1
+    2 -> 
+      3
+    3 -> 
+      4
+    _ -> 
+      100
+
+a = 
+  case f
+         x of
+    1 -> 
+      1
+    2 -> 
+      3
+    3 -> 
+      4
+    _ -> 
+      100
+
+a = 
+  case f
+         x of
+    Nothing -> 
+      1
+    Just x -> 
+      3
+
+a = 
+  case f
+         x of
+    Nothing -> 
+      1
+    Just x -> 
+      3
+
+a = 
+  case f
+         x of
+    Nothing -> 
+      1
+    Just x -> 
+      3
+
+a = 
+  case f
+         x of
+    Nothing -> 
+      do return
+           3
+    Just x -> 
+      return
+        ()
+
+a = 
+  case f
+         x of
+    Nothing -> 
+      do return
+           3
+    Just x -> 
+      do return
+           5
diff --git a/test/fundamental/expected/7.exp b/test/fundamental/expected/7.exp
new file mode 100644
--- /dev/null
+++ b/test/fundamental/expected/7.exp
@@ -0,0 +1,43 @@
+a = 
+  b
+  where value = 
+          3
+        value' = 
+          5
+
+a = 
+  b
+  where value = 
+          3
+        value' = 
+          5
+
+a = 
+  b
+  where value = 
+          3
+        value' = 
+          5
+
+a = 
+  b
+  where value = 
+          3
+        value' = 
+          5
+
+a = 
+  do return
+       ()
+  where value = 
+          3
+        value' = 
+          5
+
+a = 
+  do return
+       ()
+  where value = 
+          3
+        value' = 
+          5
diff --git a/test/fundamental/expected/8.exp b/test/fundamental/expected/8.exp
new file mode 100644
--- /dev/null
+++ b/test/fundamental/expected/8.exp
@@ -0,0 +1,50 @@
+a = 
+  [1
+  ,2
+  ,3]
+
+a = 
+  [1
+  ,2
+  ,3]
+
+a = 
+  [1
+  ,2
+  ,3]
+
+a = 
+  [Just
+     theRightAnswerWithAVeryLongLine
+  ,Just
+     theRightAnswerWithAVeryLongLine
+  ,Just
+     theRightAnswerWithAVeryLongLine
+  ,Nothing]
+
+a = 
+  [Just
+     theRightAnswerWithAVeryLongLine
+  ,Just
+     theRightAnswerWithAVeryLongLine
+  ,Just
+     theRightAnswerWithAVeryLongLine
+  ,Nothing]
+
+a = 
+  [Just
+     theRightAnswerWithAVeryLongLine
+  ,Just
+     theRightAnswerWithAVeryLongLine
+  ,Just
+     theRightAnswerWithAVeryLongLine
+  ,Nothing]
+
+a = 
+  [Just
+     theRightAnswerWithAVeryLongLine
+  ,Just
+     theRightAnswerWithAVeryLongLine
+  ,Just
+     theRightAnswerWithAVeryLongLine
+  ,Nothing]
diff --git a/test/fundamental/expected/9.exp b/test/fundamental/expected/9.exp
new file mode 100644
--- /dev/null
+++ b/test/fundamental/expected/9.exp
@@ -0,0 +1,22 @@
+import Data.Attoparsec.ByteString
+import Data.Attoparsec.Expr
+import Data.ByteString (split)
+
+import Data.Attoparsec.ByteString
+import qualified Data.Attoparsec.Expr as X
+import Data.ByteString (split)
+
+main :: IO ()
+main = 
+  return
+    ()
+
+main :: IO ()
+main = 
+  return
+    ()
+
+main :: a -> b -> c
+main = 
+  return
+    ()
diff --git a/test/fundamental/tests/1.test b/test/fundamental/tests/1.test
new file mode 100644
--- /dev/null
+++ b/test/fundamental/tests/1.test
@@ -0,0 +1,11 @@
+import Data.Text
+
+import    Data.Text
+
+import qualified Data.Text as T
+
+import qualified Data.Text (a, b, c)
+
+import Data.Text (a, b, c)
+
+import Data.Text hiding (a, b, c)
diff --git a/test/fundamental/tests/10.test b/test/fundamental/tests/10.test
new file mode 100644
--- /dev/null
+++ b/test/fundamental/tests/10.test
@@ -0,0 +1,41 @@
+unless hello $
+  case thing of
+    Left a -> 3
+    Right b -> 5
+
+when hello $
+  case thing of
+    Left a -> 3
+    Right b -> 5
+
+a = \line ->
+   case a of
+     Left a -> a
+     Right b -> b
+
+map (\x -> x) [1, 2, 3]
+
+forM_ lst $ \x -> do
+  putStrLn x
+
+forM_ lst $ \x ->
+  putStrLn x
+
+Value <$> thing <*> secondThing
+
+Value <$> thing <*> secondThing <*> thirdThing <*> fourthThing <*> Just thisissolong <*> Just stilllonger
+
+f e = 5
+  where
+    a = b
+
+a = b
+  where
+    c = d
+    e = f
+
+a = b
+  where
+    c = d
+
+    e = f
diff --git a/test/fundamental/tests/11.test b/test/fundamental/tests/11.test
new file mode 100644
--- /dev/null
+++ b/test/fundamental/tests/11.test
@@ -0,0 +1,46 @@
+data A = B             -- ^ hi
+       | C Int         -- ^ hi
+       | D Float       -- ^ hi
+       | E Float Float -- ^ hi
+
+data A = B             -- ^ hi
+                       -- continuing the comment
+       | C Int         -- ^ hi
+       | D Float       -- ^ hi
+       | E Float Float -- ^ hi
+                       -- continuing the comment
+
+a = case x of
+  Nothing -> 2
+  Just something -> 3
+
+a = case x of
+  Nothing -> do
+    putStrLn "hi"
+  Just something -> 3
+
+a = case x of
+  Nothing -> case y of
+    1 -> 2
+    3 -> 4
+  Just something -> 3
+
+a = case x of
+  Nothing -> 2
+  Just x -> 10
+  Just something -> 3
+
+a = case x of
+  Nothing -> 2
+  Just x -> 10
+  Just something -> do
+    putStrLn "hello"
+
+data X = X { a :: Int    -- ^ hi
+           , b :: String -- ^ hi
+           }
+
+data X = X { a :: Int    -- ^ hi
+           , b :: String -- ^ hi
+                         -- continued
+           }
diff --git a/test/fundamental/tests/12.test b/test/fundamental/tests/12.test
new file mode 100644
--- /dev/null
+++ b/test/fundamental/tests/12.test
@@ -0,0 +1,86 @@
+module Main where
+
+module Main
+  where
+
+module Main () where
+
+module Main (
+  ) where
+
+module Main (main) where
+
+module Main (main, main2) where
+
+module Main (main,
+  main2) where
+
+module Main (main, main2, main3) where
+
+module Main (main, main2, main3, main4) where
+
+module Main (main,
+   main2,   main3,
+   main4) where
+
+module Main (
+    main,
+    main2,
+    main3,
+    main4,
+    main5,
+    ) where
+
+module Main ( main, main2, main3, main4,
+    main5,
+    ) where
+
+module Main (
+    main,
+    main2,
+    main3,
+    main4,
+    main5,
+    main6,
+    ) where
+
+module Main (
+    main, main2, main3, main4, main5, main6,
+    ) where
+
+module Main (
+    -- * A thing
+    main,
+    main2,
+
+    -- * Another thing
+    main3,
+    main4,
+
+    -- ** Another thing
+    main5,
+    ) where
+
+module Main (
+    -- * A thing
+    main, main2,
+
+    -- * Another thing
+    main3, main4,
+
+    -- ** Another thing
+    main5,) where
+
+module Main (main) where
+>
+import Text.Hello
+
+module Main (
+    main,
+    main2,
+    main3,
+    main4,
+    main5,
+    ) where
+>
+import Text.Hello
diff --git a/test/fundamental/tests/13.test b/test/fundamental/tests/13.test
new file mode 100644
--- /dev/null
+++ b/test/fundamental/tests/13.test
@@ -0,0 +1,29 @@
+a = b
+  where
+    blah = blah
+
+    -- hello
+    -- bye
+    hello = hello
+
+a = b
+  where
+    blah = blah
+
+    -- bye
+    hello = hello
+
+foo = x -- test
+  where
+    x = blah
+
+foo = x
+  where -- another test
+    x = blah
+
+f = case undefined of
+      Just p
+        -- If it's the potato.
+        | zot  -> undefined
+        -- The geriatric concumbine.
+        | otherwise -> hael
diff --git a/test/fundamental/tests/14.test b/test/fundamental/tests/14.test
new file mode 100644
--- /dev/null
+++ b/test/fundamental/tests/14.test
@@ -0,0 +1,10 @@
+x = \y -> y
+
+(1, 2)
+
+f x = 3
+f x = 3
+
+f x
+  | x == y = 3
+  | x == y = 3
diff --git a/test/fundamental/tests/15.test b/test/fundamental/tests/15.test
new file mode 100644
--- /dev/null
+++ b/test/fundamental/tests/15.test
@@ -0,0 +1,21 @@
+a = veryLongLongLongName veryLongLongLongArg veryLongLongLongArg veryLongLongLongArg
+
+a = veryLongLongLongName veryLongLongLongArg veryLongLongLongArg veryLongLongLongArg veryLongLongLongArg
+
+a = veryLongLongLongName veryLongLongLongArg veryLongLongLongArg veryLongLongLongArg veryLongLongLongArg veryLongLongLongArg
+
+a = veryLongLongLongName veryLongLongLongArg veryLongLongLongArg veryLongLongLongArg veryLongLongLongArg veryLongLongLongArg veryLongLongLongArg
+
+a = veryLongLongLongName veryLongLongLongLongLongLongLongLongLongLongLongLongLongLongLongLongLongLongLongArg veryLongLongLongArg veryLongLongLongArg veryLongLongLongArg veryLongLongLongArg veryLongLongLongArg
+
+tests = hello
+  [ name "space space space space space space space space space space space" thing
+  , name "space space space space space space space space space space space" thing
+  , name "space space space space space space space space space space space" thing
+  ]
+
+tests = hello goodbye
+  [ name "space space space space space space space space space space space" thing
+  , name "space space space space space space space space space space space" thing
+  , name "space space space space space space space space space space space" thing
+  ]
diff --git a/test/fundamental/tests/16.test b/test/fundamental/tests/16.test
new file mode 100644
--- /dev/null
+++ b/test/fundamental/tests/16.test
@@ -0,0 +1,3 @@
+instance A B where
+  f x = 3
+  f y = 3
diff --git a/test/fundamental/tests/17.test b/test/fundamental/tests/17.test
new file mode 100644
--- /dev/null
+++ b/test/fundamental/tests/17.test
@@ -0,0 +1,4 @@
+type EventSource a = (AddHandler a, a -> IO ())
+
+type EventSource a = (AddHandler a,
+  a -> IO ())
diff --git a/test/fundamental/tests/18.test b/test/fundamental/tests/18.test
new file mode 100644
--- /dev/null
+++ b/test/fundamental/tests/18.test
@@ -0,0 +1,11 @@
+a = b { c = "d" }
+
+a = b { c = "d", e = "f" }
+
+longLines = longLines { longLines = "word word word word", wordWordWordWord = "long lines long long long" }
+
+a = B { c = "d" }
+
+a = B { c = "d", e = "f" }
+
+longLines = LongLines { longLines = "word word word word", wordWordWordWord = "long lines long long long" }
diff --git a/test/fundamental/tests/19.test b/test/fundamental/tests/19.test
new file mode 100644
--- /dev/null
+++ b/test/fundamental/tests/19.test
@@ -0,0 +1,16 @@
+value = value
+  where
+    b = case x of
+      x -> x
+      y -> y
+    a :: b
+    a = 3
+
+value = value
+  where
+    b = case x of
+      x -> x
+      y -> y
+
+    a :: b
+    a = 3
diff --git a/test/fundamental/tests/2.test b/test/fundamental/tests/2.test
new file mode 100644
--- /dev/null
+++ b/test/fundamental/tests/2.test
@@ -0,0 +1,32 @@
+fun :: a -> b
+
+fun :: a -> f b -> g c d
+
+fun :: Class a => a -> b -> c
+
+fun :: (Class a, Class b) => a -> b -> c
+
+fun :: a
+    -> b
+    -> c
+
+fun :: a
+ -> b
+ -> c
+
+fun :: a
+ -> b
+   -> c
+
+fun :: a -> b -- ^ Hello
+   -> c
+
+fun :: a -> b
+   -> c -- ^ Hello
+
+fun :: (Class a, Class b) => a -> b
+   -> c -- ^ Hello
+
+fun :: (Class a, Class b) =>
+ a -> b
+   -> c -- ^ Hello
diff --git a/test/fundamental/tests/3.test b/test/fundamental/tests/3.test
new file mode 100644
--- /dev/null
+++ b/test/fundamental/tests/3.test
@@ -0,0 +1,38 @@
+let x = y
+    z = w in x
+
+let x = y
+    z = w
+    in x
+
+a = let x = y
+        z = w
+    in x
+
+a = let
+      x = y
+      z = w
+    in x
+
+let
+  x = y
+  z = w in x
+
+let
+  z = w in x
+
+a = let
+      z = w
+    in x
+
+a = let z = w
+    in x
+
+f x =
+  let g x = 5
+      g x = 5
+  in 3
+
+f = let y = z in z
+
+f x = let y = z in z
diff --git a/test/fundamental/tests/4.test b/test/fundamental/tests/4.test
new file mode 100644
--- /dev/null
+++ b/test/fundamental/tests/4.test
@@ -0,0 +1,36 @@
+data A = B
+
+data A = B -- ^ Hello
+
+data A = 
+  B -- ^ Hello
+
+data A
+  = B -- ^ Hello
+
+data A = B | C
+
+data A = B | C | D
+
+data A = B | C 
+  | D
+
+data A = B 
+  | C 
+  | D
+
+data A = B 
+  | C 
+  | D
+  deriving Show
+
+data A = B 
+  | C 
+  | D
+  deriving (Show, Eq)
+
+data A = B Int
+  deriving (Show, Eq)
+
+data A = B Int | C String
+  deriving (Show, Eq)
diff --git a/test/fundamental/tests/5.test b/test/fundamental/tests/5.test
new file mode 100644
--- /dev/null
+++ b/test/fundamental/tests/5.test
@@ -0,0 +1,27 @@
+data A = B { field :: Int }
+
+data A = B { field :: Int, field2 :: Char }
+
+data A = B { field :: Int, field2 :: Char, field3 :: String }
+
+data A = B { field :: Int,
+  field2 :: Char, field3 :: String } deriving Show
+
+data A = B { field :: Int,
+  field2 :: Char,
+  field3 :: String } deriving Show
+
+data A = B { field :: Int
+  , field2 :: Char
+  , field3 :: String } deriving (Show, Eq)
+
+data A = B { field :: Int
+  , field2 :: Char
+  , field3 :: String } deriving (Show, Eq)
+
+data A = B { field :: Int -- ^ Field 1
+   }
+
+data A = B { field :: Int, -- ^ Field 1
+  field2 :: Char,  -- ^ field 2
+  field3 :: String } deriving Show
diff --git a/test/fundamental/tests/6.test b/test/fundamental/tests/6.test
new file mode 100644
--- /dev/null
+++ b/test/fundamental/tests/6.test
@@ -0,0 +1,41 @@
+a = case f x of
+  1 -> 1
+  2 -> 3
+  3 -> 4
+  _ -> 100
+
+a = case f x of
+    1 -> 1
+    2 -> 3
+    3 -> 4
+    _ -> 100
+
+a = case 
+         f x of
+    1 -> 1
+    2 -> 3
+    3 -> 4
+    _ -> 100
+
+a = case f x of
+      Nothing -> 1
+      Just x  -> 3
+
+a = case f x of
+      Nothing -> 1
+      Just x -> 3
+
+a = case f x of
+      Nothing     -> 1
+      Just x -> 3
+
+a = case f x of
+      Nothing -> do
+        return 3
+      Just x -> return ()
+
+a = case f x of
+      Nothing -> do
+        return 3
+      Just x -> do
+        return 5
diff --git a/test/fundamental/tests/7.test b/test/fundamental/tests/7.test
new file mode 100644
--- /dev/null
+++ b/test/fundamental/tests/7.test
@@ -0,0 +1,30 @@
+a = b
+  where
+    value = 3
+    value' = 5
+
+a = b where
+  value = 3
+  value' = 5
+
+a = b
+  where value = 3
+        value' = 5
+
+a =
+  b where
+      value = 3
+      value' = 5
+
+a = do
+  return ()
+
+  where
+    value = 3
+    value' = 5
+
+a = do
+  return ()
+  where
+    value = 3
+    value' = 5
diff --git a/test/fundamental/tests/8.test b/test/fundamental/tests/8.test
new file mode 100644
--- /dev/null
+++ b/test/fundamental/tests/8.test
@@ -0,0 +1,24 @@
+a = [1, 2, 3]
+
+a = [1, 2
+    , 3]
+
+a = [ 1
+    , 2
+    , 3]
+
+a = [ Just theRightAnswerWithAVeryLongLine
+    , Just theRightAnswerWithAVeryLongLine
+    , Just theRightAnswerWithAVeryLongLine
+    , Nothing
+    ]
+
+a = [Just theRightAnswerWithAVeryLongLine, Just theRightAnswerWithAVeryLongLine, Just theRightAnswerWithAVeryLongLine, Nothing]
+
+a = [ Just theRightAnswerWithAVeryLongLine, Just theRightAnswerWithAVeryLongLine
+    , Just theRightAnswerWithAVeryLongLine, Nothing]
+
+a = [ Just theRightAnswerWithAVeryLongLine
+    , Just theRightAnswerWithAVeryLongLine
+    , Just theRightAnswerWithAVeryLongLine
+    , Nothing]
diff --git a/test/fundamental/tests/9.test b/test/fundamental/tests/9.test
new file mode 100644
--- /dev/null
+++ b/test/fundamental/tests/9.test
@@ -0,0 +1,19 @@
+import Data.Attoparsec.ByteString
+import Data.Attoparsec.Expr
+import Data.ByteString (split)
+
+import Data.Attoparsec.ByteString
+import qualified Data.Attoparsec.Expr as X
+import Data.ByteString (split)
+
+main :: IO ()
+main = return ()
+
+main :: IO ()
+main =
+  return ()
+
+main :: a -> b
+     ->  c
+main =
+  return ()
diff --git a/test/gibiansky/expected/1.exp b/test/gibiansky/expected/1.exp
new file mode 100644
--- /dev/null
+++ b/test/gibiansky/expected/1.exp
@@ -0,0 +1,11 @@
+import           Data.Text
+
+import           Data.Text
+
+import qualified Data.Text as T
+
+import qualified Data.Text (a, b, c)
+
+import           Data.Text (a, b, c)
+
+import           Data.Text hiding (a, b, c)
diff --git a/test/gibiansky/expected/10.exp b/test/gibiansky/expected/10.exp
new file mode 100644
--- /dev/null
+++ b/test/gibiansky/expected/10.exp
@@ -0,0 +1,44 @@
+unless hello $
+  case thing of
+    Left a  -> 3
+    Right b -> 5
+
+when hello $
+  case thing of
+    Left a  -> 3
+    Right b -> 5
+
+a = \line -> case a of
+  Left a  -> a
+  Right b -> b
+
+map (\x -> x) [1, 2, 3]
+
+forM_ lst $ \x -> do
+  putStrLn x
+
+forM_ lst $ \x -> putStrLn x
+
+Value <$> thing <*> secondThing
+
+Value <$> thing
+      <*> secondThing
+      <*> thirdThing
+      <*> fourthThing
+      <*> Just thisissolong
+      <*> Just stilllonger
+
+f e = 5
+  where
+    a = b
+
+a = b
+  where
+    c = d
+    e = f
+
+a = b
+  where
+    c = d
+
+    e = f
diff --git a/test/gibiansky/expected/11.exp b/test/gibiansky/expected/11.exp
new file mode 100644
--- /dev/null
+++ b/test/gibiansky/expected/11.exp
@@ -0,0 +1,52 @@
+data A = B             -- ^ hi
+       | C Int         -- ^ hi
+       | D Float       -- ^ hi
+       | E Float Float -- ^ hi
+
+data A = B             -- ^ hi
+                       -- continuing the comment
+       | C Int         -- ^ hi
+       | D Float       -- ^ hi
+       | E Float Float -- ^ hi
+                       -- continuing the comment
+
+a =
+  case x of
+    Nothing        -> 2
+    Just something -> 3
+
+a =
+  case x of
+    Nothing -> do
+      putStrLn "hi"
+    Just something -> 3
+
+a =
+  case x of
+    Nothing ->
+      case y of
+        1 -> 2
+        3 -> 4
+    Just something -> 3
+
+a =
+  case x of
+    Nothing        -> 2
+    Just x         -> 10
+    Just something -> 3
+
+a =
+  case x of
+    Nothing -> 2
+    Just x -> 10
+    Just something -> do
+      putStrLn "hello"
+
+data X = X { a :: Int    -- ^ hi
+           , b :: String -- ^ hi
+           }
+
+data X = X { a :: Int    -- ^ hi
+           , b :: String -- ^ hi
+                         -- continued
+           }
diff --git a/test/gibiansky/expected/12.exp b/test/gibiansky/expected/12.exp
new file mode 100644
--- /dev/null
+++ b/test/gibiansky/expected/12.exp
@@ -0,0 +1,93 @@
+module Main where
+
+module Main where
+
+module Main () where
+
+module Main () where
+
+module Main (main) where
+
+module Main (main, main2) where
+
+module Main (main, main2) where
+
+module Main (main, main2, main3) where
+
+module Main (main, main2, main3, main4) where
+
+module Main (main, main2, main3, main4) where
+
+module Main (
+    main,
+    main2,
+    main3,
+    main4,
+    main5,
+    ) where
+
+module Main (
+    main,
+    main2,
+    main3,
+    main4,
+    main5,
+    ) where
+
+module Main (
+    main,
+    main2,
+    main3,
+    main4,
+    main5,
+    main6,
+    ) where
+
+module Main (
+    main,
+    main2,
+    main3,
+    main4,
+    main5,
+    main6,
+    ) where
+
+module Main (
+    -- * A thing
+    main,
+    main2,
+
+    -- * Another thing
+    main3,
+    main4,
+
+    -- ** Another thing
+    main5,
+    ) where
+
+module Main (
+    -- * A thing
+    main,
+    main2,
+
+    -- * Another thing
+    main3,
+    main4,
+
+    -- ** Another thing
+    main5,
+    ) where
+
+module Main (main) where
+>
+import           Text.Hello
+
+module Main (
+    main,
+    main2,
+    main3,
+    main4,
+    main5,
+    ) where
+>
+import           Text.Hello
diff --git a/test/gibiansky/expected/13.exp b/test/gibiansky/expected/13.exp
new file mode 100644
--- /dev/null
+++ b/test/gibiansky/expected/13.exp
@@ -0,0 +1,31 @@
+a = b
+  where
+    blah = blah
+
+    -- hello
+    -- bye
+    hello = hello
+
+a = b
+  where
+    blah = blah
+
+    -- bye
+    hello = hello
+
+foo = x -- test
+  where
+    x = blah
+
+foo = x
+  where
+    -- another test
+    x = blah
+
+f =
+  case undefined of
+    Just p
+      -- If it's the potato.
+      | zot -> undefined
+      -- The geriatric concumbine.
+      | otherwise -> hael
diff --git a/test/gibiansky/expected/14.exp b/test/gibiansky/expected/14.exp
new file mode 100644
--- /dev/null
+++ b/test/gibiansky/expected/14.exp
@@ -0,0 +1,10 @@
+x = \y -> y
+
+(1, 2)
+
+f x = 3
+f x = 3
+
+f x
+  | x == y = 3
+  | x == y = 3
diff --git a/test/gibiansky/expected/15.exp b/test/gibiansky/expected/15.exp
new file mode 100644
--- /dev/null
+++ b/test/gibiansky/expected/15.exp
@@ -0,0 +1,39 @@
+a = veryLongLongLongName veryLongLongLongArg veryLongLongLongArg veryLongLongLongArg
+
+a = veryLongLongLongName veryLongLongLongArg veryLongLongLongArg veryLongLongLongArg
+      veryLongLongLongArg
+
+a = veryLongLongLongName
+      veryLongLongLongArg
+      veryLongLongLongArg
+      veryLongLongLongArg
+      veryLongLongLongArg
+      veryLongLongLongArg
+
+a = veryLongLongLongName
+      veryLongLongLongArg
+      veryLongLongLongArg
+      veryLongLongLongArg
+      veryLongLongLongArg
+      veryLongLongLongArg
+      veryLongLongLongArg
+
+a = veryLongLongLongName
+      veryLongLongLongLongLongLongLongLongLongLongLongLongLongLongLongLongLongLongLongArg
+      veryLongLongLongArg
+      veryLongLongLongArg
+      veryLongLongLongArg
+      veryLongLongLongArg
+      veryLongLongLongArg
+
+tests = hello
+          [ name "space space space space space space space space space space space" thing
+          , name "space space space space space space space space space space space" thing
+          , name "space space space space space space space space space space space" thing
+          ]
+
+tests = hello goodbye
+          [ name "space space space space space space space space space space space" thing
+          , name "space space space space space space space space space space space" thing
+          , name "space space space space space space space space space space space" thing
+          ]
diff --git a/test/gibiansky/expected/16.exp b/test/gibiansky/expected/16.exp
new file mode 100644
--- /dev/null
+++ b/test/gibiansky/expected/16.exp
@@ -0,0 +1,3 @@
+instance A B where
+  f x = 3
+  f y = 3
diff --git a/test/gibiansky/expected/17.exp b/test/gibiansky/expected/17.exp
new file mode 100644
--- /dev/null
+++ b/test/gibiansky/expected/17.exp
@@ -0,0 +1,3 @@
+type EventSource a = (AddHandler a, a -> IO ())
+
+type EventSource a = (AddHandler a, a -> IO ())
diff --git a/test/gibiansky/expected/18.exp b/test/gibiansky/expected/18.exp
new file mode 100644
--- /dev/null
+++ b/test/gibiansky/expected/18.exp
@@ -0,0 +1,15 @@
+a = b { c = "d" }
+
+a = b { c = "d", e = "f" }
+
+longLines = longLines { longLines = "word word word word"
+                      , wordWordWordWord = "long lines long long long"
+                      }
+
+a = B { c = "d" }
+
+a = B { c = "d", e = "f" }
+
+longLines = LongLines { longLines = "word word word word"
+                      , wordWordWordWord = "long lines long long long"
+                      }
diff --git a/test/gibiansky/expected/19.exp b/test/gibiansky/expected/19.exp
new file mode 100644
--- /dev/null
+++ b/test/gibiansky/expected/19.exp
@@ -0,0 +1,18 @@
+value = value
+  where
+    b =
+      case x of
+        x -> x
+        y -> y
+    a :: b
+    a = 3
+
+value = value
+  where
+    b =
+      case x of
+        x -> x
+        y -> y
+
+    a :: b
+    a = 3
diff --git a/test/gibiansky/expected/2.exp b/test/gibiansky/expected/2.exp
new file mode 100644
--- /dev/null
+++ b/test/gibiansky/expected/2.exp
@@ -0,0 +1,37 @@
+fun :: a -> b
+
+fun :: a -> f b -> g c d
+
+fun :: Class a => a -> b -> c
+
+fun :: (Class a, Class b) => a -> b -> c
+
+fun :: a
+    -> b
+    -> c
+
+fun :: a
+    -> b
+    -> c
+
+fun :: a
+    -> b
+    -> c
+
+fun :: a
+    -> b -- ^ Hello
+    -> c
+
+fun :: a
+    -> b
+    -> c -- ^ Hello
+
+fun :: (Class a, Class b)
+    => a
+    -> b
+    -> c -- ^ Hello
+
+fun :: (Class a, Class b)
+    => a
+    -> b
+    -> c -- ^ Hello
diff --git a/test/gibiansky/expected/20.exp b/test/gibiansky/expected/20.exp
new file mode 100644
--- /dev/null
+++ b/test/gibiansky/expected/20.exp
@@ -0,0 +1,3 @@
+-- Comment 1
+-- Comment 2
+f x = x
diff --git a/test/gibiansky/expected/21.exp b/test/gibiansky/expected/21.exp
new file mode 100644
--- /dev/null
+++ b/test/gibiansky/expected/21.exp
@@ -0,0 +1,4 @@
+a = A { reallyLongName = reallyLongName
+      , reallyLongName = reallyLongName
+      , aaaaaaaaaaaaaaaaaaaaa = aaaaaaaaaaaaaaaa
+      }
diff --git a/test/gibiansky/expected/22.exp b/test/gibiansky/expected/22.exp
new file mode 100644
--- /dev/null
+++ b/test/gibiansky/expected/22.exp
@@ -0,0 +1,4 @@
+a = do
+  a <- b
+
+  print a
diff --git a/test/gibiansky/expected/23.exp b/test/gibiansky/expected/23.exp
new file mode 100644
--- /dev/null
+++ b/test/gibiansky/expected/23.exp
@@ -0,0 +1,11 @@
+a = b ~.
+    c
+
+a = b
+    ~.
+    c
+
+a = b
+    ~. c
+
+a = b ~. c
diff --git a/test/gibiansky/expected/24.exp b/test/gibiansky/expected/24.exp
new file mode 100644
--- /dev/null
+++ b/test/gibiansky/expected/24.exp
@@ -0,0 +1,19 @@
+import           A
+>
+import           B
+
+{-# LANGUAGE FlexibleContexts, OverloadedStrings, RecordWildCards, RankNTypes #-}
+
+blah x
+  | x = do
+      putStrLn a
+
+unless x $
+  unless y $
+    putStrLn "Hello"
+
+a =
+  let (x, y) = z
+  in z
+
+a = (x ++)
diff --git a/test/gibiansky/expected/25.exp b/test/gibiansky/expected/25.exp
new file mode 100644
--- /dev/null
+++ b/test/gibiansky/expected/25.exp
@@ -0,0 +1,8 @@
+main = do
+  case foo of
+    Something -> do
+      x
+>
+    Else -> x
+>
+    Bar -> x
diff --git a/test/gibiansky/expected/3.exp b/test/gibiansky/expected/3.exp
new file mode 100644
--- /dev/null
+++ b/test/gibiansky/expected/3.exp
@@ -0,0 +1,45 @@
+let x = y
+    z = w
+in x
+
+let x = y
+    z = w
+in x
+
+a =
+  let x = y
+      z = w
+  in x
+
+a =
+  let x = y
+      z = w
+  in x
+
+let x = y
+    z = w
+in x
+
+let z = w
+in x
+
+a =
+  let z = w
+  in x
+
+a =
+  let z = w
+  in x
+
+f x =
+  let g x = 5
+      g x = 5
+  in 3
+
+f =
+  let y = z
+  in z
+
+f x =
+  let y = z
+  in z
diff --git a/test/gibiansky/expected/4.exp b/test/gibiansky/expected/4.exp
new file mode 100644
--- /dev/null
+++ b/test/gibiansky/expected/4.exp
@@ -0,0 +1,39 @@
+data A = B
+
+data A = B -- ^ Hello
+
+data A = B -- ^ Hello
+
+data A = B -- ^ Hello
+
+data A = B
+       | C
+
+data A = B
+       | C
+       | D
+
+data A = B
+       | C
+       | D
+
+data A = B
+       | C
+       | D
+
+data A = B
+       | C
+       | D
+  deriving Show
+
+data A = B
+       | C
+       | D
+  deriving (Show, Eq)
+
+data A = B Int
+  deriving (Show, Eq)
+
+data A = B Int
+       | C String
+  deriving (Show, Eq)
diff --git a/test/gibiansky/expected/5.exp b/test/gibiansky/expected/5.exp
new file mode 100644
--- /dev/null
+++ b/test/gibiansky/expected/5.exp
@@ -0,0 +1,43 @@
+data A = B { field :: Int }
+
+data A = B { field :: Int
+           , field2 :: Char
+           }
+
+data A = B { field :: Int
+           , field2 :: Char
+           , field3 :: String
+           }
+
+data A = B { field :: Int
+           , field2 :: Char
+           , field3 :: String
+           }
+  deriving Show
+
+data A = B { field :: Int
+           , field2 :: Char
+           , field3 :: String
+           }
+  deriving Show
+
+data A = B { field :: Int
+           , field2 :: Char
+           , field3 :: String
+           }
+  deriving (Show, Eq)
+
+data A = B { field :: Int
+           , field2 :: Char
+           , field3 :: String
+           }
+  deriving (Show, Eq)
+
+data A = B { field :: Int -- ^ Field 1
+           }
+
+data A = B { field :: Int  -- ^ Field 1
+           , field2 :: Char   -- ^ field 2
+           , field3 :: String
+           }
+  deriving Show
diff --git a/test/gibiansky/expected/6.exp b/test/gibiansky/expected/6.exp
new file mode 100644
--- /dev/null
+++ b/test/gibiansky/expected/6.exp
@@ -0,0 +1,48 @@
+a =
+  case f x of
+    1 -> 1
+    2 -> 3
+    3 -> 4
+    _ -> 100
+
+a =
+  case f x of
+    1 -> 1
+    2 -> 3
+    3 -> 4
+    _ -> 100
+
+a =
+  case f x of
+    1 -> 1
+    2 -> 3
+    3 -> 4
+    _ -> 100
+
+a =
+  case f x of
+    Nothing -> 1
+    Just x  -> 3
+
+a =
+  case f x of
+    Nothing -> 1
+    Just x  -> 3
+
+a =
+  case f x of
+    Nothing -> 1
+    Just x  -> 3
+
+a =
+  case f x of
+    Nothing -> do
+      return 3
+    Just x -> return ()
+
+a =
+  case f x of
+    Nothing -> do
+      return 3
+    Just x -> do
+      return 5
diff --git a/test/gibiansky/expected/7.exp b/test/gibiansky/expected/7.exp
new file mode 100644
--- /dev/null
+++ b/test/gibiansky/expected/7.exp
@@ -0,0 +1,34 @@
+a = b
+  where
+    value = 3
+    value' = 5
+
+a = b
+  where
+    value = 3
+    value' = 5
+
+a = b
+  where
+    value = 3
+    value' = 5
+
+a =
+  b
+  where
+    value = 3
+    value' = 5
+
+a = do
+  return ()
+
+  where
+    value = 3
+    value' = 5
+
+a = do
+  return ()
+
+  where
+    value = 3
+    value' = 5
diff --git a/test/gibiansky/expected/8.exp b/test/gibiansky/expected/8.exp
new file mode 100644
--- /dev/null
+++ b/test/gibiansky/expected/8.exp
@@ -0,0 +1,29 @@
+a = [1, 2, 3]
+
+a = [1, 2, 3]
+
+a = [1, 2, 3]
+
+a = [ Just theRightAnswerWithAVeryLongLine
+    , Just theRightAnswerWithAVeryLongLine
+    , Just theRightAnswerWithAVeryLongLine
+    , Nothing
+    ]
+
+a = [ Just theRightAnswerWithAVeryLongLine
+    , Just theRightAnswerWithAVeryLongLine
+    , Just theRightAnswerWithAVeryLongLine
+    , Nothing
+    ]
+
+a = [ Just theRightAnswerWithAVeryLongLine
+    , Just theRightAnswerWithAVeryLongLine
+    , Just theRightAnswerWithAVeryLongLine
+    , Nothing
+    ]
+
+a = [ Just theRightAnswerWithAVeryLongLine
+    , Just theRightAnswerWithAVeryLongLine
+    , Just theRightAnswerWithAVeryLongLine
+    , Nothing
+    ]
diff --git a/test/gibiansky/expected/9.exp b/test/gibiansky/expected/9.exp
new file mode 100644
--- /dev/null
+++ b/test/gibiansky/expected/9.exp
@@ -0,0 +1,20 @@
+import           Data.Attoparsec.ByteString
+import           Data.Attoparsec.Expr
+import           Data.ByteString (split)
+
+import           Data.Attoparsec.ByteString
+import qualified Data.Attoparsec.Expr as X
+import           Data.ByteString (split)
+
+main :: IO ()
+main = return ()
+
+main :: IO ()
+main =
+  return ()
+
+main :: a
+     -> b
+     -> c
+main =
+  return ()
diff --git a/test/gibiansky/tests/1.test b/test/gibiansky/tests/1.test
new file mode 100644
--- /dev/null
+++ b/test/gibiansky/tests/1.test
@@ -0,0 +1,11 @@
+import Data.Text
+
+import    Data.Text
+
+import qualified Data.Text as T
+
+import qualified Data.Text (a, b, c)
+
+import Data.Text (a, b, c)
+
+import Data.Text hiding (a, b, c)
diff --git a/test/gibiansky/tests/10.test b/test/gibiansky/tests/10.test
new file mode 100644
--- /dev/null
+++ b/test/gibiansky/tests/10.test
@@ -0,0 +1,41 @@
+unless hello $
+  case thing of
+    Left a -> 3
+    Right b -> 5
+
+when hello $
+  case thing of
+    Left a -> 3
+    Right b -> 5
+
+a = \line ->
+   case a of
+     Left a -> a
+     Right b -> b
+
+map (\x -> x) [1, 2, 3]
+
+forM_ lst $ \x -> do
+  putStrLn x
+
+forM_ lst $ \x ->
+  putStrLn x
+
+Value <$> thing <*> secondThing
+
+Value <$> thing <*> secondThing <*> thirdThing <*> fourthThing <*> Just thisissolong <*> Just stilllonger
+
+f e = 5
+  where
+    a = b
+
+a = b
+  where
+    c = d
+    e = f
+
+a = b
+  where
+    c = d
+
+    e = f
diff --git a/test/gibiansky/tests/11.test b/test/gibiansky/tests/11.test
new file mode 100644
--- /dev/null
+++ b/test/gibiansky/tests/11.test
@@ -0,0 +1,46 @@
+data A = B             -- ^ hi
+       | C Int         -- ^ hi
+       | D Float       -- ^ hi
+       | E Float Float -- ^ hi
+
+data A = B             -- ^ hi
+                       -- continuing the comment
+       | C Int         -- ^ hi
+       | D Float       -- ^ hi
+       | E Float Float -- ^ hi
+                       -- continuing the comment
+
+a = case x of
+  Nothing -> 2
+  Just something -> 3
+
+a = case x of
+  Nothing -> do
+    putStrLn "hi"
+  Just something -> 3
+
+a = case x of
+  Nothing -> case y of
+    1 -> 2
+    3 -> 4
+  Just something -> 3
+
+a = case x of
+  Nothing -> 2
+  Just x -> 10
+  Just something -> 3
+
+a = case x of
+  Nothing -> 2
+  Just x -> 10
+  Just something -> do
+    putStrLn "hello"
+
+data X = X { a :: Int    -- ^ hi
+           , b :: String -- ^ hi
+           }
+
+data X = X { a :: Int    -- ^ hi
+           , b :: String -- ^ hi
+                         -- continued
+           }
diff --git a/test/gibiansky/tests/12.test b/test/gibiansky/tests/12.test
new file mode 100644
--- /dev/null
+++ b/test/gibiansky/tests/12.test
@@ -0,0 +1,86 @@
+module Main where
+
+module Main
+  where
+
+module Main () where
+
+module Main (
+  ) where
+
+module Main (main) where
+
+module Main (main, main2) where
+
+module Main (main,
+  main2) where
+
+module Main (main, main2, main3) where
+
+module Main (main, main2, main3, main4) where
+
+module Main (main,
+   main2,   main3,
+   main4) where
+
+module Main (
+    main,
+    main2,
+    main3,
+    main4,
+    main5,
+    ) where
+
+module Main ( main, main2, main3, main4,
+    main5,
+    ) where
+
+module Main (
+    main,
+    main2,
+    main3,
+    main4,
+    main5,
+    main6,
+    ) where
+
+module Main (
+    main, main2, main3, main4, main5, main6,
+    ) where
+
+module Main (
+    -- * A thing
+    main,
+    main2,
+
+    -- * Another thing
+    main3,
+    main4,
+
+    -- ** Another thing
+    main5,
+    ) where
+
+module Main (
+    -- * A thing
+    main, main2,
+
+    -- * Another thing
+    main3, main4,
+
+    -- ** Another thing
+    main5,) where
+
+module Main (main) where
+>
+import Text.Hello
+
+module Main (
+    main,
+    main2,
+    main3,
+    main4,
+    main5,
+    ) where
+>
+import Text.Hello
diff --git a/test/gibiansky/tests/13.test b/test/gibiansky/tests/13.test
new file mode 100644
--- /dev/null
+++ b/test/gibiansky/tests/13.test
@@ -0,0 +1,29 @@
+a = b
+  where
+    blah = blah
+
+    -- hello
+    -- bye
+    hello = hello
+
+a = b
+  where
+    blah = blah
+
+    -- bye
+    hello = hello
+
+foo = x -- test
+  where
+    x = blah
+
+foo = x
+  where -- another test
+    x = blah
+
+f = case undefined of
+      Just p
+        -- If it's the potato.
+        | zot  -> undefined
+        -- The geriatric concumbine.
+        | otherwise -> hael
diff --git a/test/gibiansky/tests/14.test b/test/gibiansky/tests/14.test
new file mode 100644
--- /dev/null
+++ b/test/gibiansky/tests/14.test
@@ -0,0 +1,10 @@
+x = \y -> y
+
+(1, 2)
+
+f x = 3
+f x = 3
+
+f x
+  | x == y = 3
+  | x == y = 3
diff --git a/test/gibiansky/tests/15.test b/test/gibiansky/tests/15.test
new file mode 100644
--- /dev/null
+++ b/test/gibiansky/tests/15.test
@@ -0,0 +1,21 @@
+a = veryLongLongLongName veryLongLongLongArg veryLongLongLongArg veryLongLongLongArg
+
+a = veryLongLongLongName veryLongLongLongArg veryLongLongLongArg veryLongLongLongArg veryLongLongLongArg
+
+a = veryLongLongLongName veryLongLongLongArg veryLongLongLongArg veryLongLongLongArg veryLongLongLongArg veryLongLongLongArg
+
+a = veryLongLongLongName veryLongLongLongArg veryLongLongLongArg veryLongLongLongArg veryLongLongLongArg veryLongLongLongArg veryLongLongLongArg
+
+a = veryLongLongLongName veryLongLongLongLongLongLongLongLongLongLongLongLongLongLongLongLongLongLongLongArg veryLongLongLongArg veryLongLongLongArg veryLongLongLongArg veryLongLongLongArg veryLongLongLongArg
+
+tests = hello
+  [ name "space space space space space space space space space space space" thing
+  , name "space space space space space space space space space space space" thing
+  , name "space space space space space space space space space space space" thing
+  ]
+
+tests = hello goodbye
+  [ name "space space space space space space space space space space space" thing
+  , name "space space space space space space space space space space space" thing
+  , name "space space space space space space space space space space space" thing
+  ]
diff --git a/test/gibiansky/tests/16.test b/test/gibiansky/tests/16.test
new file mode 100644
--- /dev/null
+++ b/test/gibiansky/tests/16.test
@@ -0,0 +1,3 @@
+instance A B where
+  f x = 3
+  f y = 3
diff --git a/test/gibiansky/tests/17.test b/test/gibiansky/tests/17.test
new file mode 100644
--- /dev/null
+++ b/test/gibiansky/tests/17.test
@@ -0,0 +1,4 @@
+type EventSource a = (AddHandler a, a -> IO ())
+
+type EventSource a = (AddHandler a,
+  a -> IO ())
diff --git a/test/gibiansky/tests/18.test b/test/gibiansky/tests/18.test
new file mode 100644
--- /dev/null
+++ b/test/gibiansky/tests/18.test
@@ -0,0 +1,11 @@
+a = b { c = "d" }
+
+a = b { c = "d", e = "f" }
+
+longLines = longLines { longLines = "word word word word", wordWordWordWord = "long lines long long long" }
+
+a = B { c = "d" }
+
+a = B { c = "d", e = "f" }
+
+longLines = LongLines { longLines = "word word word word", wordWordWordWord = "long lines long long long" }
diff --git a/test/gibiansky/tests/19.test b/test/gibiansky/tests/19.test
new file mode 100644
--- /dev/null
+++ b/test/gibiansky/tests/19.test
@@ -0,0 +1,16 @@
+value = value
+  where
+    b = case x of
+      x -> x
+      y -> y
+    a :: b
+    a = 3
+
+value = value
+  where
+    b = case x of
+      x -> x
+      y -> y
+
+    a :: b
+    a = 3
diff --git a/test/gibiansky/tests/2.test b/test/gibiansky/tests/2.test
new file mode 100644
--- /dev/null
+++ b/test/gibiansky/tests/2.test
@@ -0,0 +1,32 @@
+fun :: a -> b
+
+fun :: a -> f b -> g c d
+
+fun :: Class a => a -> b -> c
+
+fun :: (Class a, Class b) => a -> b -> c
+
+fun :: a
+    -> b
+    -> c
+
+fun :: a
+ -> b
+ -> c
+
+fun :: a
+ -> b
+   -> c
+
+fun :: a -> b -- ^ Hello
+   -> c
+
+fun :: a -> b
+   -> c -- ^ Hello
+
+fun :: (Class a, Class b) => a -> b
+   -> c -- ^ Hello
+
+fun :: (Class a, Class b) =>
+ a -> b
+   -> c -- ^ Hello
diff --git a/test/gibiansky/tests/20.test b/test/gibiansky/tests/20.test
new file mode 100644
--- /dev/null
+++ b/test/gibiansky/tests/20.test
@@ -0,0 +1,3 @@
+-- Comment 1
+-- Comment 2
+f x = x
diff --git a/test/gibiansky/tests/21.test b/test/gibiansky/tests/21.test
new file mode 100644
--- /dev/null
+++ b/test/gibiansky/tests/21.test
@@ -0,0 +1,4 @@
+a = A { reallyLongName = reallyLongName
+      , reallyLongName = reallyLongName
+      , aaaaaaaaaaaaaaaaaaaaa = aaaaaaaaaaaaaaaa
+      }
diff --git a/test/gibiansky/tests/22.test b/test/gibiansky/tests/22.test
new file mode 100644
--- /dev/null
+++ b/test/gibiansky/tests/22.test
@@ -0,0 +1,4 @@
+a = do
+  a <- b
+
+  print a
diff --git a/test/gibiansky/tests/23.test b/test/gibiansky/tests/23.test
new file mode 100644
--- /dev/null
+++ b/test/gibiansky/tests/23.test
@@ -0,0 +1,11 @@
+a = b ~.
+    c
+
+a = b
+    ~.
+    c
+
+a = b
+    ~. c
+
+a = b ~. c
diff --git a/test/gibiansky/tests/24.test b/test/gibiansky/tests/24.test
new file mode 100644
--- /dev/null
+++ b/test/gibiansky/tests/24.test
@@ -0,0 +1,18 @@
+import A
+>
+import B
+
+{-# LANGUAGE FlexibleContexts, OverloadedStrings, RecordWildCards, RankNTypes #-}
+>
+
+blah x
+  | x = do
+      putStrLn a
+
+unless x $
+  unless y $
+    putStrLn "Hello"
+
+a = let (x, y) = z in z
+
+a = (x ++)
diff --git a/test/gibiansky/tests/25.test b/test/gibiansky/tests/25.test
new file mode 100644
--- /dev/null
+++ b/test/gibiansky/tests/25.test
@@ -0,0 +1,8 @@
+main = do
+  case foo of
+    Something -> do
+      x
+>
+    Else -> x
+>
+    Bar -> x
diff --git a/test/gibiansky/tests/3.test b/test/gibiansky/tests/3.test
new file mode 100644
--- /dev/null
+++ b/test/gibiansky/tests/3.test
@@ -0,0 +1,38 @@
+let x = y
+    z = w in x
+
+let x = y
+    z = w
+    in x
+
+a = let x = y
+        z = w
+    in x
+
+a = let
+      x = y
+      z = w
+    in x
+
+let
+  x = y
+  z = w in x
+
+let
+  z = w in x
+
+a = let
+      z = w
+    in x
+
+a = let z = w
+    in x
+
+f x =
+  let g x = 5
+      g x = 5
+  in 3
+
+f = let y = z in z
+
+f x = let y = z in z
diff --git a/test/gibiansky/tests/4.test b/test/gibiansky/tests/4.test
new file mode 100644
--- /dev/null
+++ b/test/gibiansky/tests/4.test
@@ -0,0 +1,36 @@
+data A = B
+
+data A = B -- ^ Hello
+
+data A = 
+  B -- ^ Hello
+
+data A
+  = B -- ^ Hello
+
+data A = B | C
+
+data A = B | C | D
+
+data A = B | C 
+  | D
+
+data A = B 
+  | C 
+  | D
+
+data A = B 
+  | C 
+  | D
+  deriving Show
+
+data A = B 
+  | C 
+  | D
+  deriving (Show, Eq)
+
+data A = B Int
+  deriving (Show, Eq)
+
+data A = B Int | C String
+  deriving (Show, Eq)
diff --git a/test/gibiansky/tests/5.test b/test/gibiansky/tests/5.test
new file mode 100644
--- /dev/null
+++ b/test/gibiansky/tests/5.test
@@ -0,0 +1,27 @@
+data A = B { field :: Int }
+
+data A = B { field :: Int, field2 :: Char }
+
+data A = B { field :: Int, field2 :: Char, field3 :: String }
+
+data A = B { field :: Int,
+  field2 :: Char, field3 :: String } deriving Show
+
+data A = B { field :: Int,
+  field2 :: Char,
+  field3 :: String } deriving Show
+
+data A = B { field :: Int
+  , field2 :: Char
+  , field3 :: String } deriving (Show, Eq)
+
+data A = B { field :: Int
+  , field2 :: Char
+  , field3 :: String } deriving (Show, Eq)
+
+data A = B { field :: Int -- ^ Field 1
+   }
+
+data A = B { field :: Int, -- ^ Field 1
+  field2 :: Char,  -- ^ field 2
+  field3 :: String } deriving Show
diff --git a/test/gibiansky/tests/6.test b/test/gibiansky/tests/6.test
new file mode 100644
--- /dev/null
+++ b/test/gibiansky/tests/6.test
@@ -0,0 +1,41 @@
+a = case f x of
+  1 -> 1
+  2 -> 3
+  3 -> 4
+  _ -> 100
+
+a = case f x of
+    1 -> 1
+    2 -> 3
+    3 -> 4
+    _ -> 100
+
+a = case 
+         f x of
+    1 -> 1
+    2 -> 3
+    3 -> 4
+    _ -> 100
+
+a = case f x of
+      Nothing -> 1
+      Just x  -> 3
+
+a = case f x of
+      Nothing -> 1
+      Just x -> 3
+
+a = case f x of
+      Nothing     -> 1
+      Just x -> 3
+
+a = case f x of
+      Nothing -> do
+        return 3
+      Just x -> return ()
+
+a = case f x of
+      Nothing -> do
+        return 3
+      Just x -> do
+        return 5
diff --git a/test/gibiansky/tests/7.test b/test/gibiansky/tests/7.test
new file mode 100644
--- /dev/null
+++ b/test/gibiansky/tests/7.test
@@ -0,0 +1,30 @@
+a = b
+  where
+    value = 3
+    value' = 5
+
+a = b where
+  value = 3
+  value' = 5
+
+a = b
+  where value = 3
+        value' = 5
+
+a =
+  b where
+      value = 3
+      value' = 5
+
+a = do
+  return ()
+
+  where
+    value = 3
+    value' = 5
+
+a = do
+  return ()
+  where
+    value = 3
+    value' = 5
diff --git a/test/gibiansky/tests/8.test b/test/gibiansky/tests/8.test
new file mode 100644
--- /dev/null
+++ b/test/gibiansky/tests/8.test
@@ -0,0 +1,24 @@
+a = [1, 2, 3]
+
+a = [1, 2
+    , 3]
+
+a = [ 1
+    , 2
+    , 3]
+
+a = [ Just theRightAnswerWithAVeryLongLine
+    , Just theRightAnswerWithAVeryLongLine
+    , Just theRightAnswerWithAVeryLongLine
+    , Nothing
+    ]
+
+a = [Just theRightAnswerWithAVeryLongLine, Just theRightAnswerWithAVeryLongLine, Just theRightAnswerWithAVeryLongLine, Nothing]
+
+a = [ Just theRightAnswerWithAVeryLongLine, Just theRightAnswerWithAVeryLongLine
+    , Just theRightAnswerWithAVeryLongLine, Nothing]
+
+a = [ Just theRightAnswerWithAVeryLongLine
+    , Just theRightAnswerWithAVeryLongLine
+    , Just theRightAnswerWithAVeryLongLine
+    , Nothing]
diff --git a/test/gibiansky/tests/9.test b/test/gibiansky/tests/9.test
new file mode 100644
--- /dev/null
+++ b/test/gibiansky/tests/9.test
@@ -0,0 +1,19 @@
+import Data.Attoparsec.ByteString
+import Data.Attoparsec.Expr
+import Data.ByteString (split)
+
+import Data.Attoparsec.ByteString
+import qualified Data.Attoparsec.Expr as X
+import Data.ByteString (split)
+
+main :: IO ()
+main = return ()
+
+main :: IO ()
+main =
+  return ()
+
+main :: a -> b
+     ->  c
+main =
+  return ()
diff --git a/test/johan-tibell/expected/1.exp b/test/johan-tibell/expected/1.exp
new file mode 100644
--- /dev/null
+++ b/test/johan-tibell/expected/1.exp
@@ -0,0 +1,5 @@
+getGitProvider :: EventProvider GitRecord ()
+getGitProvider = EventProvider
+    { getModuleName = "Git"
+    , getEvents = getRepoCommits
+    }
diff --git a/test/johan-tibell/expected/2.exp b/test/johan-tibell/expected/2.exp
new file mode 100644
--- /dev/null
+++ b/test/johan-tibell/expected/2.exp
@@ -0,0 +1,5 @@
+strToMonth :: String -> Int
+strToMonth month = case month of
+        "Jan" -> 1
+        "Feb" -> 2
+        _ -> error $ "Unknown month " ++ month
diff --git a/test/johan-tibell/expected/3.exp b/test/johan-tibell/expected/3.exp
new file mode 100644
--- /dev/null
+++ b/test/johan-tibell/expected/3.exp
@@ -0,0 +1,6 @@
+sayHello :: IO ()
+sayHello = do
+    name <- getLine
+    putStrLn $ greeting name
+  where
+    greeting name = "Hello, " ++ name ++ "!"
diff --git a/test/johan-tibell/expected/4.exp b/test/johan-tibell/expected/4.exp
new file mode 100644
--- /dev/null
+++ b/test/johan-tibell/expected/4.exp
@@ -0,0 +1,8 @@
+commitToEvent :: FolderPath -> TimeZone -> Commit -> Event.Event
+commitToEvent gitFolderPath timezone commit = Event.Event
+    { pluginName = getModuleName getGitProvider
+    , eventIcon = "glyphicon-cog"
+    , eventDate = localTimeToUTC 
+          timezone
+          (commitDate commit)
+    }
diff --git a/test/johan-tibell/tests/1.test b/test/johan-tibell/tests/1.test
new file mode 100644
--- /dev/null
+++ b/test/johan-tibell/tests/1.test
@@ -0,0 +1,6 @@
+getGitProvider :: EventProvider GitRecord ()
+getGitProvider = EventProvider
+    {
+        getModuleName = "Git",
+        getEvents = getRepoCommits
+    }
diff --git a/test/johan-tibell/tests/2.test b/test/johan-tibell/tests/2.test
new file mode 100644
--- /dev/null
+++ b/test/johan-tibell/tests/2.test
@@ -0,0 +1,5 @@
+strToMonth :: String -> Int
+strToMonth month = case month of
+    "Jan" -> 1
+    "Feb" -> 2
+    _ -> error $ "Unknown month " ++ month
diff --git a/test/johan-tibell/tests/3.test b/test/johan-tibell/tests/3.test
new file mode 100644
--- /dev/null
+++ b/test/johan-tibell/tests/3.test
@@ -0,0 +1,6 @@
+sayHello :: IO ()
+sayHello = do
+    name <- getLine
+    putStrLn $ greeting name
+    where
+        greeting name = "Hello, " ++ name ++ "!"
diff --git a/test/johan-tibell/tests/4.test b/test/johan-tibell/tests/4.test
new file mode 100644
--- /dev/null
+++ b/test/johan-tibell/tests/4.test
@@ -0,0 +1,7 @@
+commitToEvent :: FolderPath -> TimeZone -> Commit -> Event.Event
+commitToEvent gitFolderPath timezone commit = Event.Event
+    {
+        pluginName = getModuleName getGitProvider,
+        eventIcon = "glyphicon-cog",
+        eventDate = localTimeToUTC timezone (commitDate commit)
+    }
