From 0283934dfb4a643090227c681d44a3fd7149a3e7 Mon Sep 17 00:00:00 2001 From: Nils Anders Danielsson Date: Thu, 25 Mar 2010 06:46:06 +0000 Subject: [PATCH] Added a Cabal file for the helper programs. --- AllNonAsciiChars.hs | 5 +---- GNUmakefile | 3 ++- GenerateEverything.hs | 3 --- README.txt | 8 +++----- Setup.hs | 3 +++ lib.cabal | 19 +++++++++++++++++++ 6 files changed, 28 insertions(+), 13 deletions(-) create mode 100644 Setup.hs create mode 100644 lib.cabal diff --git a/AllNonAsciiChars.hs b/AllNonAsciiChars.hs index d146b5e93a..50de1f9e4c 100644 --- a/AllNonAsciiChars.hs +++ b/AllNonAsciiChars.hs @@ -1,10 +1,7 @@ -- | This module extracts all the non-ASCII characters used by the -- library code (along with how many times they are used). --- --- The implementation relies on the FileManip library which is --- available from Hackage. -module AllNonAsciiChars where +module Main where import qualified Data.List as L import Data.Char diff --git a/GNUmakefile b/GNUmakefile index 527e343c34..a180864b32 100644 --- a/GNUmakefile +++ b/GNUmakefile @@ -5,4 +5,5 @@ test: Everything.agda .PHONY: Everything.agda Everything.agda: - runhaskell GenerateEverything.hs + cabal install + GenerateEverything diff --git a/GenerateEverything.hs b/GenerateEverything.hs index b90a4439de..3f04b4ddaa 100644 --- a/GenerateEverything.hs +++ b/GenerateEverything.hs @@ -1,8 +1,5 @@ {-# LANGUAGE PatternGuards #-} --- This program requires that the filepath and FileManip packages from --- Hackage are installed. - import qualified Data.List as List import Control.Applicative import System.Environment diff --git a/README.txt b/README.txt index 96d7988c9d..63614607c0 100644 --- a/README.txt +++ b/README.txt @@ -7,10 +7,8 @@ For information about the library, see README.agda. The README module imports the Everything module. This module is generated automatically; if you have downloaded the library from its darcs repository and want to type check README you can construct -Everything by running "runhaskell GenerateEverything.hs". Note that -the GenerateEverything program depends on the filepath and FileManip -packages from Hackage. +Everything by running "cabal install && GenerateEverything". Note that all library sources are located under src. The modules -README and Everything are not really part of the library, so these -modules are located in the top-level directory instead. +README, README.* and Everything are not really part of the library, so +these modules are located in the top-level directory instead. diff --git a/Setup.hs b/Setup.hs new file mode 100644 index 0000000000..e8ef27dbba --- /dev/null +++ b/Setup.hs @@ -0,0 +1,3 @@ +import Distribution.Simple + +main = defaultMain diff --git a/lib.cabal b/lib.cabal new file mode 100644 index 0000000000..215ac74170 --- /dev/null +++ b/lib.cabal @@ -0,0 +1,19 @@ +name: lib +version: 0.0 +cabal-version: >= 1.8 +build-type: Simple +description: Helper programs. +tested-with: GHC == 6.12.1 + +executable GenerateEverything + hs-source-dirs: . + main-is: GenerateEverything.hs + build-depends: base == 4.2.*, + FileManip == 0.3.*, + filepath == 1.1.* + +executable AllNonAsciiChars + hs-source-dirs: . + main-is: AllNonAsciiChars.hs + build-depends: base == 4.2.*, + FileManip == 0.3.*