diff --git a/core.cabal b/core.cabal
--- a/core.cabal
+++ b/core.cabal
@@ -1,5 +1,5 @@
 name:                core
-version:             0.1
+version:             0.2
 synopsis:            External core parser and pretty printer.
 description:         External core parser and pretty printer.
 category:            Language
diff --git a/src/Language/Core/Parser.hs b/src/Language/Core/Parser.hs
--- a/src/Language/Core/Parser.hs
+++ b/src/Language/Core/Parser.hs
@@ -139,15 +139,6 @@
           , (L.pack "%", Percent)
           ]
 
-main :: IO ()
-main = do inp <- L.readFile --"./hcr/Tuple.hcr"
-                          --"./src/ExternalCore.hcr"
-                          "../base.hcr"
-          --print (length (lexer inp))
-          --mapM_ print (lexer inp)
-          parseTest (many1 moduleP >>= \m -> notFollowedBy anyToken >> return (map ppModule m) >> return ()) (lexer inp)
-
-
 parseModule :: SourceName -> L.ByteString -> Either ParseError Module
 parseModule src inp = runParser moduleP () src (lexer inp)
 
@@ -156,7 +147,7 @@
              pkg <- pkgname
              matchToken Colon
              modName <- mident
-             trace (L.unpack modName) $ return ()
+             --trace (L.unpack modName) $ return ()
              tdefs <- tdef `endBy` (matchToken SColon)
              vdefgs <- vdefg `endBy` (matchToken SColon)
              return $ Module (pkg,modName) tdefs vdefgs
@@ -174,7 +165,10 @@
           t <- ty
           matchToken Equal
           e <- expP
-          return (False, name, t, e)
+          return $ Vdef { vdefLocal = False
+                        , vdefName  = name
+                        , vdefType  = t
+                        , vdefExp   = e }
        <?> "vdef"
 
 expP = choice
@@ -357,7 +351,7 @@
 vbind = parens $ do v <- lname
                     matchToken DColon
                     t <- ty
-                    return (v,t)
+                    return ((L.empty,L.empty,v),t)
 
 
 akind = choice [ matchToken Star >> return Klifted
diff --git a/src/Language/Core/Pretty.hs b/src/Language/Core/Pretty.hs
--- a/src/Language/Core/Pretty.hs
+++ b/src/Language/Core/Pretty.hs
@@ -21,8 +21,8 @@
 ppVdefg (Nonrec def)
     = ppVdef def
 
-ppVdef (_local, name, ty, expr)
-    = ppQual name <+> text "::" <+> ppTy ty <+> equals $$ indent (ppExp expr)
+ppVdef vdef -- (_local, name, ty, expr)
+    = ppQual (vdefName vdef) <+> text "::" <+> ppTy (vdefType vdef) <+> equals $$ indent (ppExp (vdefExp vdef))
 
 ppAexp, pfexp, ppExp :: Exp -> Doc
 ppAexp (Var x) = ppQual x
@@ -63,7 +63,7 @@
 ppExp e = pfexp e
 
 pvbind :: Vbind -> Doc
-pvbind (x,t) = parens(text (L.unpack x) <> text "::" <> ppTy t)
+pvbind (x,t) = parens(ppQual x <> text "::" <> ppTy t)
 
 palt :: Alt -> Doc
 palt (Acon c tbs vbs e) =
diff --git a/src/Language/Core/Syntax.lhs b/src/Language/Core/Syntax.lhs
--- a/src/Language/Core/Syntax.lhs
+++ b/src/Language/Core/Syntax.lhs
@@ -8,26 +8,30 @@
 
 data Module
  = Module (Pkgname, Mname) [Tdef] [Vdefg]
-   deriving (Show)
+   deriving (Show,Eq)
 
 data Tdef 
   = Data (Qual Tcon) [Tbind] [Cdef]
   | Newtype (Qual Tcon) (Qual Tcon) [Tbind] Ty
-   deriving (Show)
+   deriving (Show,Eq)
 
 data Cdef 
   = Constr (Qual Dcon) [Tbind] [Ty]
   | GadtConstr (Qual Dcon) Ty
-   deriving (Show)
+   deriving (Show,Eq)
 
 data Vdefg 
   = Rec [Vdef]
   | Nonrec Vdef
-   deriving (Show)
+   deriving (Show,Eq)
 
 -- Top-level bindings are qualified, so that the printer doesn't have to pass
 -- around the module name.
-type Vdef = (Bool,Qual Var,Ty,Exp)
+data Vdef = Vdef { vdefLocal :: Bool
+                 , vdefName  :: Qual Var
+                 , vdefType  :: Ty
+                 , vdefExp   :: Exp }
+    deriving (Show,Eq)
 
 data Exp 
   = Var (Qual Var)
@@ -43,20 +47,20 @@
   | External String String Ty {- target name, convention, and type -} 
   | DynExternal String Ty {- convention and type (incl. Addr# of target as first arg) -} 
   | Label String
-   deriving (Show)
+   deriving (Show,Eq)
 
 data Bind 
   = Vb Vbind
   | Tb Tbind
-   deriving (Show)
+   deriving (Show,Eq)
 
 data Alt 
   = Acon (Qual Dcon) [Tbind] [Vbind] Exp
   | Alit Lit Exp
   | Adefault Exp
-   deriving (Show)
+   deriving (Show,Eq)
 
-type Vbind = (Var,Ty)
+type Vbind = (Qual Var,Ty)
 type Tbind = (Tvar,Kind)
 
 data Ty 
@@ -74,7 +78,7 @@
   | InstCoercion Ty Ty
   | LeftCoercion Ty
   | RightCoercion Ty
-   deriving (Show)
+   deriving (Show,Eq)
 
 data Kind 
   = Klifted
@@ -83,14 +87,14 @@
   | Kopen
   | Karrow Kind Kind
   | Keq Ty Ty
-   deriving (Show)
+   deriving (Show,Eq)
 
 data Lit 
   = Lint Integer Ty
   | Lrational Rational Ty
   | Lchar Char Ty
   | Lstring String Ty
-   deriving (Show)
+   deriving (Show,Eq)
   
 
 type Pkgname = Id
