diff --git a/Curry/AbstractCurry.hs b/Curry/AbstractCurry.hs
--- a/Curry/AbstractCurry.hs
+++ b/Curry/AbstractCurry.hs
@@ -264,9 +264,11 @@
 	return prog
 
 -- Writes an AbstractCurry program term into a file
-writeCurry :: String -> CurryProg -> IO ()
-writeCurry filename prog 
-   = catch (writeModule filename (showCurry prog)) (\e -> ioError e)
+-- If the flag is set, it will be the hidden .curry sub directory.
+writeCurry :: Bool -> String -> CurryProg -> IO ()
+writeCurry inHiddenSubdir filename prog 
+   = catch (writeModule inHiddenSubdir filename (showCurry prog)) 
+           (\e -> ioError e)
 
 -- Shows an AbstractCurry program in a more nicely way.
 showCurry :: CurryProg -> String
diff --git a/Curry/ExtendedFlat/Type.hs b/Curry/ExtendedFlat/Type.hs
--- a/Curry/ExtendedFlat/Type.hs
+++ b/Curry/ExtendedFlat/Type.hs
@@ -410,14 +410,16 @@
 readFlat = liftM (fmap read) . maybeReadModule
   
 -- Writes a FlatCurry program term into a file.
-writeFlatCurry :: String -> Prog -> IO ()
-writeFlatCurry filename prog
-   = writeModule filename (showFlatCurry' False prog)
+-- If the flag is set, it will be the hidden .curry sub directory.
+writeFlatCurry :: Bool -> String -> Prog -> IO ()
+writeFlatCurry inHiddenSubdir filename prog
+   = writeModule inHiddenSubdir filename (showFlatCurry' False prog)
 
 -- Writes a FlatCurry program term with source references into a file.
-writeExtendedFlat :: String -> Prog -> IO ()
-writeExtendedFlat filename prog =
-  writeModule (extFlatName filename) (showFlatCurry' True prog)
+-- If the flag is set, it will be the hidden .curry sub directory.
+writeExtendedFlat :: Bool -> String -> Prog -> IO ()
+writeExtendedFlat inHiddenSubdir filename prog =
+  writeModule inHiddenSubdir (extFlatName filename) (showFlatCurry' True prog)
 
 
 showFlatCurry' :: Bool -> Prog -> String
diff --git a/Curry/Files/PathUtils.hs b/Curry/Files/PathUtils.hs
--- a/Curry/Files/PathUtils.hs
+++ b/Curry/Files/PathUtils.hs
@@ -81,9 +81,10 @@
 
 --write a file to curry subdirectory
 
-writeModule :: FilePath -> String -> IO ()
-writeModule filename contents = do
-  let filename' = inCurrySubdir filename
+writeModule :: Bool -> FilePath -> String -> IO ()
+writeModule inHiddenSubdir filename contents = do
+  let filename' | inHiddenSubdir = inCurrySubdir filename
+                | otherwise      = filename
       subdir = takeDirectory filename'
   ensureDirectoryExists subdir
   writeFile filename' contents
diff --git a/Curry/FlatCurry/Type.hs b/Curry/FlatCurry/Type.hs
--- a/Curry/FlatCurry/Type.hs
+++ b/Curry/FlatCurry/Type.hs
@@ -331,9 +331,10 @@
     dropComment []           = []
 
 -- Writes a FlatCurry program term into a file.
-writeFlatCurry :: String -> Prog -> IO ()
-writeFlatCurry filename prog
-   = writeModule filename (showFlatCurry prog)
+-- If the flag is set, it will be the hidden .curry sub directory.
+writeFlatCurry :: Bool -> String -> Prog -> IO ()
+writeFlatCurry inHiddenSubdir filename prog
+   = writeModule inHiddenSubdir filename (showFlatCurry prog)
 
 -- Shows FlatCurry program in a more nicely way.
 showFlatCurry :: Prog -> String
diff --git a/curry-base.cabal b/curry-base.cabal
--- a/curry-base.cabal
+++ b/curry-base.cabal
@@ -1,5 +1,5 @@
 Name:          curry-base
-Version:       0.2.6
+Version:       0.2.7
 Cabal-Version: >= 1.6
 Synopsis:      Functions for manipulating Curry programs
 Description:   This package serves as a foundation for Curry compilers. it defines the intermediate
