Skip to content

Commit

Permalink
Removed check for Data.Time
Browse files Browse the repository at this point in the history
Removed the check for Data.Time as it is not needed. I originally
added it as I had somehow overlooked the Debian package
libghc6-time-dev. Sorry about the unneccessary noise :(

darcs-hash:20080413114242-73052-fac7125436de0939b0de0e7f20d31d60aa5980c8.gz
  • Loading branch information
Mads Lindstroem committed Apr 13, 2008
1 parent 49136b8 commit 2294d12
Show file tree
Hide file tree
Showing 7 changed files with 2 additions and 64 deletions.
30 changes: 0 additions & 30 deletions configure
Expand Up @@ -658,33 +658,6 @@ case $? in
*) pkgtime="";;
esac

#--------------------------------------------------------------------
# Support for Data.Time ?
#--------------------------------------------------------------------

#GHC 6.6 do not support Data.Time and if no seperate Data.Time package
#is installed we need to use the old System.Time package.

echo -n " Data.Time package "

cat > TestDataTime.hs << EOF
module Main
where
import Data.Time
main :: IO ()
main = return ()
EOF

if runhaskell TestDataTime.hs >/dev/null 2>&1 ; then
hasdatatime="";
echo found
else
hasdatatime="-DNO_DATA_TIME";
echo "not found"
fi

rm TestDataTime.hs

#--------------------------------------------------------------------
# Haddock
#--------------------------------------------------------------------
Expand Down Expand Up @@ -926,9 +899,6 @@ WXC-LIBNAME=$wxclibname
# STC
WXC-STC=$wxcstc
# WxDirect
HAS-DATA-TIME = $hasdatatime
# WxWidgets
WXWIN-VERSION=$wxversion
WXWIN-LIBS=$wxwinlibs
Expand Down
2 changes: 1 addition & 1 deletion makefile
Expand Up @@ -483,7 +483,7 @@ $(WXD-EXE): $(WXD-OBJS)

# create an object file from source files.
$(WXD-OBJS): $(WXD-OUTDIR)/%.o: $(WXD-SRCDIR)/%.hs
@$(call compile-hs,$@,$<,$(HCFLAGS) $(PKG-PARSEC) -cpp $(HAS-DATA-TIME) $(PKG-TIME),$(WXD-OUTDIR),-i$(WXD-SRCDIR))
@$(call compile-hs,$@,$<,$(HCFLAGS) $(PKG-PARSEC) $(PKG-TIME),$(WXD-OUTDIR),-i$(WXD-SRCDIR))

# automatically include all dependency information.
-include $(WXD-DEPS)
Expand Down
8 changes: 0 additions & 8 deletions wxdirect/src/CompileClassTypes.hs
Expand Up @@ -14,20 +14,12 @@ module CompileClassTypes( compileClassTypes ) where

import qualified Data.Map as Map

#ifdef NO_DATA_TIME
import Time( getClockTime)
#else
import Data.Time( getCurrentTime)
#endif
import Types
import HaskellNames
import Classes( isClassName, haskellClassDefs )
import DeriveTypes( ClassName )

#ifdef NO_DATA_TIME
getCurrentTime = getClockTime
#endif

{-----------------------------------------------------------------------------------------
Compile
-----------------------------------------------------------------------------------------}
Expand Down
8 changes: 0 additions & 8 deletions wxdirect/src/CompileClasses.hs
Expand Up @@ -17,11 +17,7 @@ import qualified Data.Set as Set
import qualified Data.Map as Map
import qualified MultiSet

#ifdef NO_DATA_TIME
import Time( getClockTime)
#else
import Data.Time( getCurrentTime)
#endif
import Data.Char( toUpper, isUpper, toLower ) --toLower, toUpper, isSpace, isLower, isUpper )
import Data.List( isPrefixOf, sort, sortBy, intersperse, zipWith4 )

Expand All @@ -31,10 +27,6 @@ import Classes( isClassName, haskellClassDefs, objectClassNames, ClassInfo(..),
import ParseC( parseC )
import DeriveTypes( deriveTypes, classifyName, Name(..), Method(..), ClassName, MethodName, PropertyName )

#ifdef NO_DATA_TIME
getCurrentTime = getClockTime
#endif

{-----------------------------------------------------------------------------------------
Compile
-----------------------------------------------------------------------------------------}
Expand Down
8 changes: 0 additions & 8 deletions wxdirect/src/CompileHeader.hs
Expand Up @@ -16,11 +16,7 @@ import qualified Data.Set as Set
import qualified Data.Map as Map
import qualified MultiSet

#ifdef NO_DATA_TIME
import Time( getClockTime)
#else
import Data.Time( getCurrentTime)
#endif
import Data.List( isPrefixOf )
import Data.Char( toUpper, isUpper )
import Data.List( isPrefixOf, sort, sortBy, intersperse, zipWith4 )
Expand All @@ -31,10 +27,6 @@ import Classes( isClassName, classNames, classExtends )
import ParseC( parseC )
import DeriveTypes( deriveTypesAll, classifyName, Name(..), Method(..), ClassName, MethodName, PropertyName )

#ifdef NO_DATA_TIME
getCurrentTime = getClockTime
#endif

{-----------------------------------------------------------------------------------------
Compile
-----------------------------------------------------------------------------------------}
Expand Down
7 changes: 0 additions & 7 deletions wxdirect/src/HaskellNames.hs
Expand Up @@ -19,16 +19,9 @@ module HaskellNames( haskellDeclName

import qualified Data.Set as Set
import Data.Char( toLower, toUpper, isLower, isUpper )
#ifdef NO_DATA_TIME
import Time( getClockTime)
#else
import Data.Time( getCurrentTime)
#endif
import Data.List( isPrefixOf )

#ifdef NO_DATA_TIME
getCurrentTime = getClockTime
#endif
{-----------------------------------------------------------------------------------------
-----------------------------------------------------------------------------------------}
Expand Down
3 changes: 1 addition & 2 deletions wxdirect/src/MultiSet.hs
Expand Up @@ -99,8 +99,7 @@ import qualified Data.Map as M
{--------------------------------------------------------------------
Operators
--------------------------------------------------------------------}
-- Comment on line below can be removed when we drop support for GHC 6.6.
infixl 9 \\ -- Dummy comment to prevent CPP-preprocessor from seeing \\ as newline continuation
infixl 9 \\

-- | /O(n+m)/. See 'difference'.
(\\) :: Ord a => MultiSet a -> MultiSet a -> MultiSet a
Expand Down

0 comments on commit 2294d12

Please sign in to comment.