[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:58:18 UTC 2010


The following commit has been merged in the master branch:
commit 907316b9f12cd2a65e18dfb1cf79def56461c88f
Author: John Goerzen <jgoerzen at complete.org>
Date:   Sat Apr 23 02:52:19 2005 +0100

    UNDO: [sarge hack] Back out FiniteMap.hs change for Hugs
    
    Back out FiniteMap.hs change from:
     More changes for Hugs compatibility
    For sarge version

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