[Pkg-haskell-commits] [SCM] haskell-testpack branch, master, updated. debian/1.0.2-1-4-gb0d6b36
John Goerzen
jgoerzen at complete.org
Fri Apr 23 14:55:44 UTC 2010
The following commit has been merged in the master branch:
commit fdd3d54393234b7eba3ec92764cb669bbcd16215
Author: John Goerzen <jgoerzen at complete.org>
Date: Tue Apr 5 23:52:11 2005 +0100
More changes for Hugs compatibility
Keywords:
Use CPP to make show instance for FiniteMap conditional. Adjust
Makefile to use Cabal to build the .hs files for haddock.
(jgoerzen at complete.org--projects/missingh--head--0.7--patch-213)
diff --git a/ChangeLog b/ChangeLog
index 3bffacd..1e84b07 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -2,6 +2,20 @@
# arch-tag: automatic-ChangeLog--jgoerzen at complete.org--projects/missingh--head--0.7
#
+2005-04-05 17:52:11 GMT John Goerzen <jgoerzen at complete.org> patch-213
+
+ Summary:
+ More changes for Hugs compatibility
+ Revision:
+ missingh--head--0.7--patch-213
+
+ Use CPP to make show instance for FiniteMap conditional. Adjust
+ Makefile to use Cabal to build the .hs files for haddock.
+
+ modified files:
+ ChangeLog Makefile MissingH.cabal MissingH/FiniteMap.hs
+
+
2005-04-05 17:38:00 GMT John Goerzen <jgoerzen at complete.org> patch-212
Summary:
diff --git a/Makefile b/Makefile
index bf0d183..1eeb408 100644
--- a/Makefile
+++ b/Makefile
@@ -23,13 +23,18 @@ LHSSOURCES := $(wildcard MissingH/*/*.lhs) \
O1 := $(SOURCES:.hs=.o) $(LHSSOURCES)
OBJS := $(O1:.lhs=.o)
LHSCONVSOURCES := $(patsubst %.lhs,doctmp/%.hs,$(LHSSOURCES))
+HUGSCONVSOURCES := $(patsubst %.hs,dist/build/%.hs,$(SOURCES))
UNLIT ?= $(shell ghc --print-libdir)/unlit
-.PHONY: all
-all: setup
+.PHONY: all hugsbuild
+all: setup # GHC build
./setup configure
./setup build
+hugsbuild: setup
+ ./setup configure --hugs
+ ./setup build
+
setup: Setup.lhs MissingH.cabal
ghc -package Cabal Setup.lhs -o setup
@@ -52,12 +57,15 @@ doctmp:
#
.PHONY: doc
-doc: $(LHSCONVSOURCES)
+doc: $(LHSCONVSOURCES) hugsbuild
-rm -rf html
mkdir html
haddock $(HADDOCKARGS) --package=MissingH \
--dump-interface=html/MissingH.haddock \
- -t 'MissingH API Manual' -h -o html $(SOURCES) $(LHSCONVSOURCES)
+ -t 'MissingH API Manual' -h -o html $(HUGSCONVSOURCES) $(LHSCONVSOURCES)
+
+.PHONY: hugsbuild
+
clean:
-./setup clean
diff --git a/MissingH.cabal b/MissingH.cabal
index 0581a93..73c8fe8 100644
--- a/MissingH.cabal
+++ b/MissingH.cabal
@@ -46,6 +46,7 @@ Exposed-Modules: MissingH.IO, MissingH.IO.Binary, MissingH.List,
MissingH.IO.HVIO,
MissingH.Email.Parser,
MissingH.Debian, MissingH.Debian.ControlParser,
+ MissingH.MIMETypes,
MissingH.Wash.Mail.Email,
MissingH.Wash.Mail.EmailConfig,
MissingH.Wash.Mail.HeaderField,
diff --git a/MissingH/FiniteMap.hs b/MissingH/FiniteMap.hs
index a40329a..a1d4bd3 100644
--- a/MissingH/FiniteMap.hs
+++ b/MissingH/FiniteMap.hs
@@ -1,5 +1,6 @@
-{- arch-tag: FiniteMap utilities main file
-Copyright (C) 2004 John Goerzen <jgoerzen at complete.org>
+-- arch-tag: FiniteMap utilities main file
+{-# LANGUAGE CPP #-}
+{- Copyright (C) 2004-2005 John Goerzen <jgoerzen at complete.org>
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
@@ -18,7 +19,7 @@ Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
{- |
Module : MissingH.FiniteMap
- Copyright : Copyright (C) 2004 John Goerzen
+ Copyright : Copyright (C) 2004-2005 John Goerzen
License : GNU GPL, version 2 or above
Maintainer : John Goerzen,
@@ -31,7 +32,8 @@ This module provides various helpful utilities for dealing with FiniteMaps.
Written by John Goerzen, jgoerzen\@complete.org
In addition to the functions exported, this module also makes a FiniteMap
-showable.
+showable on GHC prior to 6.4. (GHC 6.4 and current Hugs versions have it
+showable already).
-}
module MissingH.FiniteMap (-- * Basic Utilities
@@ -86,9 +88,13 @@ flippedLookupFM fm v =
Nothing -> []
Just x -> x
+#if __GLASGOW_HASKELL__ >= 630 || __HUGS__
+{- FiniteMap is already showable on this platform -}
+#else
{- | Makes a FiniteMap showable. -}
instance (Show a, Show b) => Show (FiniteMap a b) where
show fm = show (fmToList fm)
+#endif
{- | Performs a lookup, and raises an exception (with an error message
prepended with the given string) if the key could not be found.
--
haskell-testpack
More information about the Pkg-haskell-commits
mailing list