diff --git a/HESQL.hs b/HESQL.hs
--- a/HESQL.hs
+++ b/HESQL.hs
@@ -27,7 +27,7 @@
           forM_ files $ \ file -> do
              when (outputFile file == file) $
                error (file ++ "has a wrong extension")
-             modl <- parseFromFile hesqlModule file
+             modl <- parseFromFile (hesqlModule file) file
              case modl of
                Left err -> do
                      print err
diff --git a/HESQL/Parser.hs b/HESQL/Parser.hs
--- a/HESQL/Parser.hs
+++ b/HESQL/Parser.hs
@@ -11,30 +11,31 @@
 import Database.HsSqlPpp.Parsing.Parser
 
 
-hesqlModule :: Parser HesqlModule
-hesqlModule = do
+hesqlModule :: FilePath -> Parser HesqlModule
+hesqlModule fileName = do
   whiteSpace
   modName <- moduleHeader
-  decls' <- decls
+  decls' <- decls fileName
   whiteSpace
   eof
   return $ HesqlModule modName decls'
 
-decls :: Parser [HesqlDecls]
-decls = many decl
+decls :: FilePath -> Parser [HesqlDecls]
+decls fileName = many (decl fileName)
 
-decl :: Parser HesqlDecls
-decl = do
+decl :: String -> Parser HesqlDecls
+decl fileName = do
    fn <- funName
    p <- many parameter
    whiteSpace
    char '='
    whiteSpace
    queryOpt' <- queryOpt
+   stmtLoc <- getPosition
    stmtStr <- sqlStatement
    whiteSpace
    stmt <- 
-     case parseSql stmtStr of
+     case parseSqlWithPosition fileName (sourceLine stmtLoc) (sourceColumn stmtLoc) stmtStr of
        Right [stmt] -> return stmt
        Right _ -> error "unexpected number of statements"
        Left e -> error $ show e -- TODO proper error message, handle other Right cases
@@ -93,12 +94,12 @@
 
 lexer       = P.makeTokenParser haskellDef    
       
-parens         = P.parens lexer
-braces         = P.braces lexer
+-- parens         = P.parens lexer
+-- braces         = P.braces lexer
 identifier     = P.identifier lexer
 reserved       = P.reserved lexer
-reservedOp     = P.reservedOp lexer
+-- reservedOp     = P.reservedOp lexer
 whiteSpace     = P.whiteSpace lexer
-symbol         = P.symbol lexer
-naturalOrFloat = P.naturalOrFloat lexer
+-- symbol         = P.symbol lexer
+-- naturalOrFloat = P.naturalOrFloat lexer
 
diff --git a/HESQL/Translator.hs b/HESQL/Translator.hs
--- a/HESQL/Translator.hs
+++ b/HESQL/Translator.hs
@@ -197,8 +197,8 @@
     ScalarSubQuery ann (substituteSelectExpression vars se)
 
 
-substituteExpression vars  (WindowFn ann e el1 el2 dir) =
-    WindowFn ann (substE e) (substEL el1) (substEL el2) dir
+substituteExpression vars  (WindowFn ann e el1 el2 dir fc) =
+    WindowFn ann (substE e) (substEL el1) (substEL el2) dir fc
   where substE = substituteExpression vars
         substEL = map substE
 
diff --git a/hesql.cabal b/hesql.cabal
--- a/hesql.cabal
+++ b/hesql.cabal
@@ -1,5 +1,5 @@
 Name: hesql
-Version: 0.7
+Version: 0.8
 Author: Christoph Bauer <ich@christoph-bauer.net>
 Maintainer: Christoph Bauer <ich@christoph-bauer.net>
 Cabal-Version: >= 1.2
@@ -14,8 +14,8 @@
 Executable hesql
   Main-is: HESQL.hs
   Build-depends: base >= 4 && < 5, HDBC, HDBC-postgresql, haskell-src,
-                 filepath, parsec, hssqlppp >= 0.0.10
+                 filepath, parsec, hssqlppp >= 0.1.0 && < 0.2.0
   Extensions: FlexibleContexts
-  Ghc-Options: -funbox-strict-fields -Wall
+  Ghc-Options: -funbox-strict-fields -Wall -fno-warn-missing-signatures -fno-warn-name-shadowing
   Other-Modules: HESQL.Parser, HESQL.Translator, HESQL.Syntax,
                  HESQL.Verifier, HESQL.Options
