ddc-driver 0.3.1.1 → 0.3.1.2
raw patch · 2 files changed
+17/−7 lines, 2 filesPVP: minor bump suggested
API additions: PVP suggests at least a minor version bump
API changes (from Hackage documentation)
+ DDC.Driver.Command.Load: cmdReadModule' :: (Ord n, Show n, Pretty n, NFData n) => Bool -> Fragment n err -> FilePath -> IO (Maybe (Module (AnTEC () n) n))
Files
- DDC/Driver/Command/Load.hs +16/−5
- ddc-driver.cabal +1/−2
DDC/Driver/Command/Load.hs view
@@ -1,6 +1,7 @@ module DDC.Driver.Command.Load ( cmdReadModule+ , cmdReadModule' , cmdLoadFromFile , cmdLoadFromString) where@@ -30,8 +31,17 @@ => Fragment n err -- ^ Language fragment. -> FilePath -- ^ Path to the module. -> IO (Maybe (Module (AnTEC () n) n))+cmdReadModule = cmdReadModule' True -cmdReadModule frag filePath++cmdReadModule'+ :: (Ord n, Show n, Pretty n, NFData n)+ => Bool -- ^ If true, print errors out+ -> Fragment n err -- ^ Language fragment.+ -> FilePath -- ^ Path to the module.+ -> IO (Maybe (Module (AnTEC () n) n))++cmdReadModule' printErrors frag filePath = do -- Read in the source file. exists <- doesFileExist filePath@@ -41,10 +51,10 @@ src <- readFile filePath let source = SourceFile filePath - cmdReadModule_parse filePath frag source src+ cmdReadModule_parse printErrors filePath frag source src -cmdReadModule_parse filePath frag source src+cmdReadModule_parse printErrors filePath frag source src = do ref <- newIORef Nothing errs <- pipeText (nameOfSource source) (lineStartOfSource source) src $ PipeTextLoadCore frag@@ -56,8 +66,9 @@ readIORef ref _ -> do- putStrLn $ "When reading " ++ filePath- mapM_ (hPutStrLn stderr . renderIndent . ppr) errs+ when printErrors+ $ do putStrLn $ "When reading " ++ filePath+ mapM_ (hPutStrLn stderr . renderIndent . ppr) errs return Nothing
ddc-driver.cabal view
@@ -1,5 +1,5 @@ Name: ddc-driver-Version: 0.3.1.1+Version: 0.3.1.2 License: MIT License-file: LICENSE Author: The Disciplined Disciple Compiler Strike Force@@ -9,7 +9,6 @@ Stability: experimental Category: Compilers/Interpreters Homepage: http://disciple.ouroborus.net-Bug-reports: disciple@ouroborus.net Synopsis: Disciplined Disciple Compiler top-level driver. Description: