diff --git a/Text/PrettyPrint/Annotated/Leijen.hs b/Text/PrettyPrint/Annotated/Leijen.hs
--- a/Text/PrettyPrint/Annotated/Leijen.hs
+++ b/Text/PrettyPrint/Annotated/Leijen.hs
@@ -607,7 +607,7 @@
                | SLine !Int (SimpleDoc a)
                | SAnnotStart a (SimpleDoc a)
                | SAnnotStop (SimpleDoc a)
-
+  deriving Functor
 
 -- | The empty document is, indeed, empty. Although @empty@ has no
 -- content, it does have a \'height\' of 1 and behaves exactly like
@@ -839,7 +839,7 @@
         display i stk                (SChar c x)         = let (str, spans) = display (i+1) stk x
                                                            in (c:str, spans)
         display i stk                (SText l s x)       = mapFst (s++) (display (i + l) stk x)
-        display i stk                (SLine ind x)       = mapFst (('\n':indentation ind)++) (display (i+ind) stk x)
+        display i stk                (SLine ind x)       = mapFst (('\n':indentation ind)++) (display (1+i+ind) stk x)
         display i stk                (SAnnotStart ann x) = display i ((i, ann):stk) x
         display i ((start, ann):stk) (SAnnotStop x)      = mapSnd ((start, i-start, ann):) (display i stk x)
 
diff --git a/annotated-wl-pprint.cabal b/annotated-wl-pprint.cabal
--- a/annotated-wl-pprint.cabal
+++ b/annotated-wl-pprint.cabal
@@ -1,5 +1,5 @@
 Name:                annotated-wl-pprint
-Version:             0.5.2
+Version:             0.5.3
 Cabal-Version:       >= 1.6
 Synopsis:            The Wadler/Leijen Pretty Printer, with annotation support
 Category:            Text
