diff --git a/src-derived/AG2AspectAG.hs b/src-derived/AG2AspectAG.hs
--- a/src-derived/AG2AspectAG.hs
+++ b/src-derived/AG2AspectAG.hs
@@ -1,6 +1,6 @@
 
 
--- UUAGC 0.9.30 (AG2AspectAG.ag)
+-- UUAGC 0.9.32 (AG2AspectAG.ag)
 module AG2AspectAG where
 {-# LINE 7 "AG2AspectAG.ag" #-}
 
diff --git a/src-derived/AbstractSyntax.hs b/src-derived/AbstractSyntax.hs
--- a/src-derived/AbstractSyntax.hs
+++ b/src-derived/AbstractSyntax.hs
@@ -1,6 +1,6 @@
 
 
--- UUAGC 0.9.30 (AbstractSyntax.ag)
+-- UUAGC 0.9.32 (AbstractSyntax.ag)
 module AbstractSyntax where
 {-# LINE 2 "AbstractSyntax.ag" #-}
 
diff --git a/src-derived/AbstractSyntaxDump.hs b/src-derived/AbstractSyntaxDump.hs
--- a/src-derived/AbstractSyntaxDump.hs
+++ b/src-derived/AbstractSyntaxDump.hs
@@ -1,6 +1,6 @@
 
 
--- UUAGC 0.9.30 (AbstractSyntaxDump.ag)
+-- UUAGC 0.9.32 (AbstractSyntaxDump.ag)
 module AbstractSyntaxDump where
 {-# LINE 6 "AbstractSyntaxDump.ag" #-}
 
diff --git a/src-derived/Code.hs b/src-derived/Code.hs
--- a/src-derived/Code.hs
+++ b/src-derived/Code.hs
@@ -1,6 +1,6 @@
 
 
--- UUAGC 0.9.30 (Code.ag)
+-- UUAGC 0.9.32 (Code.ag)
 module Code where
 {-# LINE 2 "Code.ag" #-}
 
diff --git a/src-derived/CodeSyntax.hs b/src-derived/CodeSyntax.hs
--- a/src-derived/CodeSyntax.hs
+++ b/src-derived/CodeSyntax.hs
@@ -1,6 +1,6 @@
 
 
--- UUAGC 0.9.30 (CodeSyntax.ag)
+-- UUAGC 0.9.32 (CodeSyntax.ag)
 module CodeSyntax where
 {-# LINE 2 "CodeSyntax.ag" #-}
 
diff --git a/src-derived/CodeSyntaxDump.hs b/src-derived/CodeSyntaxDump.hs
--- a/src-derived/CodeSyntaxDump.hs
+++ b/src-derived/CodeSyntaxDump.hs
@@ -1,6 +1,6 @@
 
 
--- UUAGC 0.9.30 (CodeSyntaxDump.ag)
+-- UUAGC 0.9.32 (CodeSyntaxDump.ag)
 module CodeSyntaxDump where
 {-# LINE 5 "CodeSyntaxDump.ag" #-}
 
diff --git a/src-derived/ConcreteSyntax.hs b/src-derived/ConcreteSyntax.hs
--- a/src-derived/ConcreteSyntax.hs
+++ b/src-derived/ConcreteSyntax.hs
@@ -1,6 +1,6 @@
 
 
--- UUAGC 0.9.30 (ConcreteSyntax.ag)
+-- UUAGC 0.9.32 (ConcreteSyntax.ag)
 module ConcreteSyntax where
 {-# LINE 2 "ConcreteSyntax.ag" #-}
 
diff --git a/src-derived/DeclBlocks.hs b/src-derived/DeclBlocks.hs
--- a/src-derived/DeclBlocks.hs
+++ b/src-derived/DeclBlocks.hs
@@ -1,6 +1,6 @@
 
 
--- UUAGC 0.9.30 (DeclBlocks.ag)
+-- UUAGC 0.9.32 (DeclBlocks.ag)
 module DeclBlocks where
 {-# LINE 2 "DeclBlocks.ag" #-}
 
diff --git a/src-derived/DefaultRules.hs b/src-derived/DefaultRules.hs
--- a/src-derived/DefaultRules.hs
+++ b/src-derived/DefaultRules.hs
@@ -1,6 +1,6 @@
 {-# OPTIONS_GHC -XBangPatterns #-}
 
--- UUAGC 0.9.30 (DefaultRules.ag)
+-- UUAGC 0.9.32 (DefaultRules.ag)
 module DefaultRules where
 {-# LINE 10 "DefaultRules.ag" #-}
 
diff --git a/src-derived/Desugar.hs b/src-derived/Desugar.hs
--- a/src-derived/Desugar.hs
+++ b/src-derived/Desugar.hs
@@ -1,6 +1,6 @@
 {-# OPTIONS_GHC -XBangPatterns #-}
 
--- UUAGC 0.9.30 (Desugar.ag)
+-- UUAGC 0.9.32 (Desugar.ag)
 module Desugar where
 {-# LINE 13 "Desugar.ag" #-}
 
diff --git a/src-derived/ErrorMessages.hs b/src-derived/ErrorMessages.hs
--- a/src-derived/ErrorMessages.hs
+++ b/src-derived/ErrorMessages.hs
@@ -1,6 +1,6 @@
 
 
--- UUAGC 0.9.30 (ErrorMessages.ag)
+-- UUAGC 0.9.32 (ErrorMessages.ag)
 module ErrorMessages where
 {-# LINE 2 "ErrorMessages.ag" #-}
 
diff --git a/src-derived/Expression.hs b/src-derived/Expression.hs
--- a/src-derived/Expression.hs
+++ b/src-derived/Expression.hs
@@ -1,6 +1,6 @@
 
 
--- UUAGC 0.9.30 (Expression.ag)
+-- UUAGC 0.9.32 (Expression.ag)
 module Expression where
 {-# LINE 2 "Expression.ag" #-}
 
diff --git a/src-derived/GenerateCode.hs b/src-derived/GenerateCode.hs
--- a/src-derived/GenerateCode.hs
+++ b/src-derived/GenerateCode.hs
@@ -1,6 +1,6 @@
 
 
--- UUAGC 0.9.30 (GenerateCode.ag)
+-- UUAGC 0.9.32 (GenerateCode.ag)
 module GenerateCode where
 {-# LINE 9 "GenerateCode.ag" #-}
 
diff --git a/src-derived/HsToken.hs b/src-derived/HsToken.hs
--- a/src-derived/HsToken.hs
+++ b/src-derived/HsToken.hs
@@ -1,6 +1,6 @@
 
 
--- UUAGC 0.9.30 (HsToken.ag)
+-- UUAGC 0.9.32 (HsToken.ag)
 module HsToken where
 {-# LINE 2 "HsToken.ag" #-}
 
diff --git a/src-derived/Interfaces.hs b/src-derived/Interfaces.hs
--- a/src-derived/Interfaces.hs
+++ b/src-derived/Interfaces.hs
@@ -1,6 +1,6 @@
 
 
--- UUAGC 0.9.30 (Interfaces.ag)
+-- UUAGC 0.9.32 (Interfaces.ag)
 module Interfaces where
 {-# LINE 2 "Interfaces.ag" #-}
 
diff --git a/src-derived/InterfacesRules.hs b/src-derived/InterfacesRules.hs
--- a/src-derived/InterfacesRules.hs
+++ b/src-derived/InterfacesRules.hs
@@ -1,6 +1,6 @@
 {-# OPTIONS_GHC -XBangPatterns #-}
 
--- UUAGC 0.9.30 (InterfacesRules.lag)
+-- UUAGC 0.9.32 (InterfacesRules.lag)
 module InterfacesRules where
 {-# LINE 10 "InterfacesRules.lag" #-}
 
diff --git a/src-derived/Order.hs b/src-derived/Order.hs
--- a/src-derived/Order.hs
+++ b/src-derived/Order.hs
@@ -1,6 +1,6 @@
 
 
--- UUAGC 0.9.30 (Order.ag)
+-- UUAGC 0.9.32 (Order.ag)
 module Order where
 {-# LINE 9 "Order.ag" #-}
 
diff --git a/src-derived/Patterns.hs b/src-derived/Patterns.hs
--- a/src-derived/Patterns.hs
+++ b/src-derived/Patterns.hs
@@ -1,6 +1,6 @@
 
 
--- UUAGC 0.9.30 (Patterns.ag)
+-- UUAGC 0.9.32 (Patterns.ag)
 module Patterns where
 {-# LINE 2 "Patterns.ag" #-}
 
diff --git a/src-derived/PrintCode.hs b/src-derived/PrintCode.hs
--- a/src-derived/PrintCode.hs
+++ b/src-derived/PrintCode.hs
@@ -1,6 +1,6 @@
 {-# OPTIONS_GHC -XBangPatterns #-}
 
--- UUAGC 0.9.30 (PrintCode.ag)
+-- UUAGC 0.9.32 (PrintCode.ag)
 module PrintCode where
 {-# LINE 10 "PrintCode.ag" #-}
 
diff --git a/src-derived/PrintErrorMessages.hs b/src-derived/PrintErrorMessages.hs
--- a/src-derived/PrintErrorMessages.hs
+++ b/src-derived/PrintErrorMessages.hs
@@ -1,6 +1,6 @@
 
 
--- UUAGC 0.9.30 (PrintErrorMessages.ag)
+-- UUAGC 0.9.32 (PrintErrorMessages.ag)
 module PrintErrorMessages where
 {-# LINE 4 "PrintErrorMessages.ag" #-}
 
diff --git a/src-derived/PrintOcamlCode.hs b/src-derived/PrintOcamlCode.hs
--- a/src-derived/PrintOcamlCode.hs
+++ b/src-derived/PrintOcamlCode.hs
@@ -1,6 +1,6 @@
 {-# OPTIONS_GHC -XBangPatterns #-}
 
--- UUAGC 0.9.30 (PrintOcamlCode.ag)
+-- UUAGC 0.9.32 (PrintOcamlCode.ag)
 module PrintOcamlCode where
 {-# LINE 10 "PrintOcamlCode.ag" #-}
 
diff --git a/src-derived/PrintVisitCode.hs b/src-derived/PrintVisitCode.hs
--- a/src-derived/PrintVisitCode.hs
+++ b/src-derived/PrintVisitCode.hs
@@ -1,6 +1,6 @@
 
 
--- UUAGC 0.9.30 (PrintVisitCode.ag)
+-- UUAGC 0.9.32 (PrintVisitCode.ag)
 module PrintVisitCode where
 {-# LINE 10 "PrintVisitCode.ag" #-}
 
diff --git a/src-derived/SemHsTokens.hs b/src-derived/SemHsTokens.hs
--- a/src-derived/SemHsTokens.hs
+++ b/src-derived/SemHsTokens.hs
@@ -1,6 +1,6 @@
 
 
--- UUAGC 0.9.30 (SemHsTokens.ag)
+-- UUAGC 0.9.32 (SemHsTokens.ag)
 module SemHsTokens where
 {-# LINE 4 "SemHsTokens.ag" #-}
 
diff --git a/src-derived/TfmToVisage.hs b/src-derived/TfmToVisage.hs
--- a/src-derived/TfmToVisage.hs
+++ b/src-derived/TfmToVisage.hs
@@ -1,6 +1,6 @@
 
 
--- UUAGC 0.9.30 (TfmToVisage.ag)
+-- UUAGC 0.9.32 (TfmToVisage.ag)
 module TfmToVisage where
 {-# LINE 8 "TfmToVisage.ag" #-}
 
diff --git a/src-derived/Transform.hs b/src-derived/Transform.hs
--- a/src-derived/Transform.hs
+++ b/src-derived/Transform.hs
@@ -1,6 +1,6 @@
 
 
--- UUAGC 0.9.30 (Transform.ag)
+-- UUAGC 0.9.32 (Transform.ag)
 module Transform where
 {-# LINE 8 "Transform.ag" #-}
 
diff --git a/src-derived/Visage.hs b/src-derived/Visage.hs
--- a/src-derived/Visage.hs
+++ b/src-derived/Visage.hs
@@ -1,6 +1,6 @@
 
 
--- UUAGC 0.9.30 (Visage.ag)
+-- UUAGC 0.9.32 (Visage.ag)
 module Visage where
 {-# LINE 6 "Visage.ag" #-}
 
diff --git a/src-derived/VisagePatterns.hs b/src-derived/VisagePatterns.hs
--- a/src-derived/VisagePatterns.hs
+++ b/src-derived/VisagePatterns.hs
@@ -1,6 +1,6 @@
 
 
--- UUAGC 0.9.30 (VisagePatterns.ag)
+-- UUAGC 0.9.32 (VisagePatterns.ag)
 module VisagePatterns where
 {-# LINE 2 "VisagePatterns.ag" #-}
 
diff --git a/src-derived/VisageSyntax.hs b/src-derived/VisageSyntax.hs
--- a/src-derived/VisageSyntax.hs
+++ b/src-derived/VisageSyntax.hs
@@ -1,6 +1,6 @@
 
 
--- UUAGC 0.9.30 (VisageSyntax.ag)
+-- UUAGC 0.9.32 (VisageSyntax.ag)
 module VisageSyntax where
 {-# LINE 2 "VisageSyntax.ag" #-}
 
diff --git a/src/Parser.hs b/src/Parser.hs
--- a/src/Parser.hs
+++ b/src/Parser.hs
@@ -20,6 +20,7 @@
 import UU.Scanner.Position
 import UU.Scanner.TokenShow()
 import System.Directory
+import System.FilePath
 import HsTokenScanner
 import Options
 
@@ -262,14 +263,11 @@
 
 resolveFile :: [FilePath] -> FilePath -> IO FilePath
 resolveFile path fname = search (path ++ ["."])                                                  
- where search (p:ps) = do dExists <- doesDirectoryExist p
-                          if dExists
-                             then do let filename = p++pathSeparator++fname
-                                     fExists <- doesFileExist filename
-                                     if fExists
-                                        then return filename
-                                        else search ps      
-                             else search ps
+ where search (p:ps) = do let filename = joinPath [p, fname]
+                          fExists <- doesFileExist filename
+                          if fExists
+                            then return filename
+                            else search ps
        search []     = error ("File: " ++ show fname ++ " not found in search path: " ++ show (concat (intersperse ";" (path ++ ["."]))) )                      
 
 pathSeparator = "/"
diff --git a/src/Version.hs b/src/Version.hs
--- a/src/Version.hs
+++ b/src/Version.hs
@@ -1,4 +1,4 @@
 module Version where
 
 banner :: String
-banner = "Attribute Grammar compiler / HUT project. Version 0.9.32"
+banner = "Attribute Grammar compiler / HUT project. Version 0.9.33"
diff --git a/uuagc.cabal b/uuagc.cabal
--- a/uuagc.cabal
+++ b/uuagc.cabal
@@ -1,7 +1,7 @@
 cabal-version: >=1.2
 build-type: Simple
 name: uuagc
-version: 0.9.32
+version: 0.9.33
 license: GPL
 license-file: LICENSE
 maintainer: Arie Middelkoop <ariem@cs.uu.nl>
diff --git a/uuagc.cabal-for-ghc-6.6 b/uuagc.cabal-for-ghc-6.6
--- a/uuagc.cabal-for-ghc-6.6
+++ b/uuagc.cabal-for-ghc-6.6
@@ -1,5 +1,5 @@
 name: uuagc
-version: 0.9.32
+version: 0.9.33
 license: GPL
 license-file: LICENSE
 maintainer: Arie Middelkoop <ariem@cs.uu.nl>
