packages feed

curry-base 0.2.6 → 0.2.7

raw patch · 5 files changed

+22/−16 lines, 5 filesPVP: major bump suggested

API removals or changes: PVP suggests a major version bump

API changes (from Hackage documentation)

- Curry.AbstractCurry: writeCurry :: String -> CurryProg -> IO ()
+ Curry.AbstractCurry: writeCurry :: Bool -> String -> CurryProg -> IO ()
- Curry.ExtendedFlat.Type: writeExtendedFlat :: String -> Prog -> IO ()
+ Curry.ExtendedFlat.Type: writeExtendedFlat :: Bool -> String -> Prog -> IO ()
- Curry.ExtendedFlat.Type: writeFlatCurry :: String -> Prog -> IO ()
+ Curry.ExtendedFlat.Type: writeFlatCurry :: Bool -> String -> Prog -> IO ()
- Curry.Files.PathUtils: writeModule :: FilePath -> String -> IO ()
+ Curry.Files.PathUtils: writeModule :: Bool -> FilePath -> String -> IO ()
- Curry.FlatCurry.Type: writeFlatCurry :: String -> Prog -> IO ()
+ Curry.FlatCurry.Type: writeFlatCurry :: Bool -> String -> Prog -> IO ()

Files

Curry/AbstractCurry.hs view
@@ -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
Curry/ExtendedFlat/Type.hs view
@@ -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
Curry/Files/PathUtils.hs view
@@ -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
Curry/FlatCurry/Type.hs view
@@ -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
curry-base.cabal view
@@ -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