packages feed

fishfood 0.0.1.3 → 0.0.1.4

raw patch · 9 files changed

+26/−88 lines, 9 filesdep +directorydep −unix

Dependencies added: directory

Dependencies removed: unix

Files

changelog view
@@ -18,3 +18,6 @@ 	* In module "FishFood.Data.File", replaced 'Control.Exception.throw' with 'Control.Exception.throwIO'. 	* Either replaced instances of '(<$>)' with 'fmap' to avoid ambiguity between "Control.Applicative" & "Prelude" which (from 'base-4.8') also exports this symbol, or hid the symbol when importing the "Prelude".. 	* In module "Main", redirected version-message to stderr.+0.0.1.4+	* Added the compiler to the output returned for the command-line option "version".+	* In module "FishFood.Data.File.hs", replaced the use of the package "unix" with the package "directory", for compatibility with Windows.
+ changelog.Debian view
@@ -0,0 +1,5 @@+fishfood (0.0.1.1-1) experimental; urgency=low++  * New release.++ -- Alistair Ward <fishfood at functionalley dot eu>  Tue, 23 Jul 2013 17:00:00 +0000
debian/DEBIAN/control view
@@ -1,5 +1,5 @@ Package:	fishfood-Version:	0.0.1.3-1+Version:	0.0.1.4-1 Section:	utils Priority:	optional #Architecture:	i386
fishfood.cabal view
@@ -1,6 +1,6 @@ -- Package-properties Name:			fishfood-Version:		0.0.1.3+Version:		0.0.1.4 Cabal-Version:		>= 1.6 Copyright:		(C) 2013-2015 Dr. Alistair Ward License:		GPL@@ -16,7 +16,7 @@ Maintainer:		fishfood <at> functionalley <dot> eu Bug-reports:		fishfood <at> functionalley <dot> eu Data-files:-Extra-Source-Files:	changelog copyright debian/DEBIAN/control makefile man/man1/fishfood.1 fishfood.spec+Extra-Source-Files:	changelog changelog.Debian copyright debian/DEBIAN/control fishfood.spec man/man1/fishfood.1  -- Turn on using: 'runhaskell ./Setup.hs configure -f llvm'. flag llvm@@ -41,11 +41,11 @@         base == 4.*,         Cabal >= 1.6 && < 2,         containers,+        directory,         factory >= 0.2.0.5,         mtl,         QuickCheck,-        toolshed >= 0.13,-        unix+        toolshed >= 0.13      GHC-options:	-Wall -fno-warn-tabs 
fishfood.spec view
@@ -22,7 +22,7 @@  Summary:	Calculates file-size frequency-distribution. Name:		fishfood-Version:	0.0.1.3+Version:	0.0.1.4 Release:	1 License:	GPLv3 #From '/usr/share/doc/packages/rpm/GROUPS'.
− makefile
@@ -1,74 +0,0 @@-# Copyright (C) 2013-2014 Dr. Alistair Ward-#-# This program is free software: you can redistribute it and/or modify-# it under the terms of the GNU General Public License as published by-# the Free Software Foundation, either version 3 of the License, or-# (at your option) any later version.-#-# This program is distributed in the hope that it will be useful,-# but WITHOUT ANY WARRANTY; without even the implied warranty of-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the-# GNU General Public License for more details.-#-# You should have received a copy of the GNU General Public License-# along with this program.  If not, see <http://www.gnu.org/licenses/>.--.PHONY: all build check clean clobber configure copy deb haddock help hlint install prof rpm sdist--PACKAGE_NAME=fishfood--all: install--install: build haddock-	@[ -z "$$CABAL_INSTALL_OPTIONS" ] || echo "INFO: CABAL_INSTALL_OPTIONS='$$CABAL_INSTALL_OPTIONS'"-	runhaskell Setup $@ $$CABAL_INSTALL_OPTIONS--prof:-	CABAL_CONFIGURE_OPTIONS="--enable-executable-profiling $$CABAL_CONFIGURE_OPTIONS" make build--copy: build-	@[ -z "$$CABAL_COPY_OPTIONS" ] || echo "INFO: CABAL_COPY_OPTIONS='$$CABAL_COPY_OPTIONS'"-	runhaskell Setup $@ $$CABAL_COPY_OPTIONS--build: configure-	@[ -z "$$CABAL_BUILD_OPTIONS" ] || echo "INFO: CABAL_BUILD_OPTIONS='$$CABAL_BUILD_OPTIONS'"-	runhaskell Setup $@ $$CABAL_BUILD_OPTIONS--configure: $(PACKAGE_NAME).cabal Setup.hs-	@[ -z "$$CABAL_CONFIGURE_OPTIONS" ] || echo "INFO: CABAL_CONFIGURE_OPTIONS='$$CABAL_CONFIGURE_OPTIONS'"-	runhaskell Setup $@ $$CABAL_CONFIGURE_OPTIONS	#--user--haddock: configure-	PATH=~/.cabal/bin:$$PATH runhaskell Setup $@ --hyperlink-source --executables	#Amend path to find 'HsColour', as required for 'hyperlink-source'.--hlint:-	@$@ src/ +RTS -N--sdist:-	TAR_OPTIONS='--format=ustar' runhaskell Setup $@--check: sdist-	cabal upload --check --verbose=3 dist/*.tar.gz;--rpm: $(PACKAGE_NAME).spec-	rpmbuild -bb --nodeps -- $^-	mv -- `find ~/rpmbuild -type f -name '$(PACKAGE_NAME)*.rpm' -mtime 0 -print` ./--deb: build-	mkdir -p debian/usr/bin/ && strip --strip-all 'dist/build/$(PACKAGE_NAME)/$(PACKAGE_NAME)' && mv 'dist/build/$(PACKAGE_NAME)/$(PACKAGE_NAME)' debian/usr/bin/-	mkdir -p 'debian/usr/share/doc/$(PACKAGE_NAME)/' && cp changelog changelog.Debian copyright LICENSE 'debian/usr/share/doc/$(PACKAGE_NAME)/' && cd 'debian/usr/share/doc/$(PACKAGE_NAME)/' && gzip --best -f changelog changelog.Debian LICENSE-	mkdir -p debian/usr/share/ && cp -R man/ debian/usr/share/ && gzip --best -f debian/usr/share/man/man1/*.1-	cd debian/ && md5sum `find usr -type f -print` >'DEBIAN/md5sums'-	fakeroot dpkg-deb --build debian .--clean:-	runhaskell Setup $@-	rm -rf 'debian/usr/' 'debian/DEBIAN/md5sums'-	find src -type f \( -name '*.hc' -o -name '*.hcr' -o -name '*.hi' -o -name '*.o' \) -delete--clobber: clean-	rm -f -- *.rpm *.deb--help:-	@grep '^[a-zA-Z].*:' makefile | sed -e 's/:.*//'-
man/man1/fishfood.1 view
@@ -142,7 +142,7 @@ .SS "REPORTING BUGS" Report bugs to \fBfishfood\fR \fIat\fR \fBfunctionalley\fR \fIdot\fR \fBeu\fR .SH COPYRIGHT-Copyright \(co 2013 Dr. Alistair Ward+Copyright \(co 2013-2015 Dr. Alistair Ward .PP This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version. .PP
src/FishFood/Data/File.hs view
@@ -31,9 +31,9 @@  import qualified	Control.Exception import qualified	Factory.Math.Statistics+import qualified	System.Directory import qualified	System.IO import qualified	System.IO.Error-import qualified	System.Posix.Files  -- | A type-synonym specifically to hold file-sizes (in bytes). type FileSize	= Integer	-- Matches the return-type of 'IO.hFileSize'.@@ -41,11 +41,11 @@ -- | Get the size of the specified file. findSize :: System.IO.FilePath -> IO FileSize findSize f	= do-	stat	<- System.Posix.Files.getFileStatus f	-- CAVEAT: throws if the user is unauthorised, or the file is non-existent.+	fileExists	<- System.Directory.doesFileExist f -	if System.Posix.Files.isRegularFile stat+	if fileExists 		then System.IO.withFile f System.IO.ReadMode System.IO.hFileSize-		else {-non-directory-} Control.Exception.throwIO $ System.IO.Error.mkIOError System.IO.Error.illegalOperationErrorType ("file=" ++ show f ++ " has unexpected type") Nothing (Just f)+		else {-not a file-} Control.Exception.throwIO $ System.IO.Error.mkIOError System.IO.Error.illegalOperationErrorType ("file=" ++ show f ++ " either doesn't exist or has an unexpected type") Nothing (Just f)  -- | Acquire statistics related to a list of file-sizes. getFileSizeStatistics
src/Main.hs view
@@ -47,6 +47,7 @@ import qualified	System.Console.GetOpt		as G import qualified	System.Environment import qualified	System.Exit+import qualified	System.Info import qualified	System.IO import qualified	System.IO.Error import qualified	ToolShed.Data.List@@ -121,15 +122,18 @@ 			setDeriveProbabilityMassFunction arg commandOptions	= return {-to IO-monad-} commandOptions { Data.CommandOptions.getDeriveProbabilityMassFunction = Data.Maybe.maybe True readCommandArg arg }  			printVersion, printUsage :: IO CommandOptions-			printVersion	= System.IO.hPutStrLn System.IO.stderr (Distribution.Text.display packageIdentifier ++ "\n\nCopyright (C) 2013-2015 " ++ author ++ ".\nThis program comes with ABSOLUTELY NO WARRANTY.\nThis is free software, and you are welcome to redistribute it under certain conditions.\n\nWritten by " ++ author ++ ".")	>> System.Exit.exitWith System.Exit.ExitSuccess	where+			printVersion	= System.IO.hPutStrLn System.IO.stderr (+				Distribution.Text.display packageIdentifier ++ "\n\nCompiled by " ++ show compiler ++ ".\n\nCopyright (C) 2013-2015 " ++ author ++ ".\nThis program comes with ABSOLUTELY NO WARRANTY.\nThis is free software, and you are welcome to redistribute it under certain conditions.\n\nWritten by " ++ author ++ "."+			 ) >> System.Exit.exitWith System.Exit.ExitSuccess	where 				packageIdentifier :: Distribution.Package.PackageIdentifier 				packageIdentifier	= Distribution.Package.PackageIdentifier { 					Distribution.Package.pkgName	= Distribution.Package.PackageName progName,	-- CAVEAT: coincidentally. 					Distribution.Package.pkgVersion	= Distribution.Version.Version (Data.Version.versionBranch Paths.version) [] 				} -				author :: String-				author	= "Dr. Alistair Ward"+				author, compiler :: String+				author		= "Dr. Alistair Ward"+				compiler	= System.Info.compilerName ++ "-" ++ Data.List.intercalate "." (map show $ Data.Version.versionBranch System.Info.compilerVersion)  			printUsage	= System.IO.hPutStrLn System.IO.stderr ("Usage:\t" ++ G.usageInfo progName optDescrList ++ "  [<File-path> ...]") >> System.Exit.exitWith System.Exit.ExitSuccess