diff --git a/language-vhdl.cabal b/language-vhdl.cabal
--- a/language-vhdl.cabal
+++ b/language-vhdl.cabal
@@ -2,7 +2,7 @@
 -- documentation, see http://haskell.org/cabal/users-guide/
 
 name:                language-vhdl
-version:             0.1.2.3
+version:             0.1.2.4
 synopsis:            VHDL AST and pretty printer in Haskell.
 -- description:         
 license:             BSD3
diff --git a/src/Language/VHDL/Pretty.hs b/src/Language/VHDL/Pretty.hs
--- a/src/Language/VHDL/Pretty.hs
+++ b/src/Language/VHDL/Pretty.hs
@@ -317,6 +317,9 @@
   pp (CRange r) = pp r
   pp (CIndex i) = pp i
 
+instance Pretty ContextClause where
+  pp (ContextClause items) = vcat $ fmap pp items
+
 instance Pretty ContextItem where
   pp (ContextLibrary l) = pp l
   pp (ContextUse u)     = pp u
@@ -341,8 +344,11 @@
   pp (DMechTransport)  = text "TRANSPORT"
   pp (DMechInertial e) = condL (text "REJECT") e <+> text "INERTIAL"
 
+instance Pretty DesignFile where
+  pp (DesignFile units) = vcat $ fmap pp units
+
 instance Pretty DesignUnit where
-  pp (DesignUnit ctxt lib) = pp ctxt <+> pp lib
+  pp (DesignUnit ctxt lib) = vcat [pp ctxt, pp lib]
 
 instance Pretty Designator where
   pp (DId i) = pp i
@@ -889,7 +895,7 @@
   pp (SecondaryUnitDeclaration i p) = pp i <+> equals <+> pp p
 
 instance Pretty SelectedName where
-  pp (SelectedName p s) = pp p <+> char '.' <+> pp s
+  pp (SelectedName p s) = pp p <> char '.' <> pp s
 
 instance Pretty SelectedSignalAssignment where
   pp (SelectedSignalAssignment e t o w) =
diff --git a/src/Language/VHDL/Syntax.hs b/src/Language/VHDL/Syntax.hs
--- a/src/Language/VHDL/Syntax.hs
+++ b/src/Language/VHDL/Syntax.hs
@@ -2645,8 +2645,8 @@
       | package_body
 -}
 
-
-type DesignFile = [DesignUnit]
+data DesignFile = DesignFile [DesignUnit]
+  deriving (Eq, Show)
 
 data DesignUnit = DesignUnit ContextClause LibraryUnit
   deriving (Eq, Show)
@@ -2697,7 +2697,8 @@
       | use_clause
 -}
 
-type ContextClause = [ContextItem]
+data ContextClause = ContextClause [ContextItem]
+  deriving (Eq, Show)
 
 data ContextItem =
     ContextLibrary LibraryClause
