From a11a89e930d76a7de329727072da6f129c5e2f67 Mon Sep 17 00:00:00 2001 From: Packit Date: Sep 25 2020 16:28:32 +0000 Subject: ghc-time-locale-compat-0.1.1.3 base --- diff --git a/LICENSE b/LICENSE new file mode 100644 index 0000000..f62b35e --- /dev/null +++ b/LICENSE @@ -0,0 +1,30 @@ +Copyright (c) 2014, Kei Hibino + +All rights reserved. + +Redistribution and use in source and binary forms, with or without +modification, are permitted provided that the following conditions are met: + + * Redistributions of source code must retain the above copyright + notice, this list of conditions and the following disclaimer. + + * Redistributions in binary form must reproduce the above + copyright notice, this list of conditions and the following + disclaimer in the documentation and/or other materials provided + with the distribution. + + * Neither the name of Kei Hibino nor the names of other + contributors may be used to endorse or promote products derived + from this software without specific prior written permission. + +THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR +A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT +OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT +LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. diff --git a/Setup.hs b/Setup.hs new file mode 100644 index 0000000..9a994af --- /dev/null +++ b/Setup.hs @@ -0,0 +1,2 @@ +import Distribution.Simple +main = defaultMain diff --git a/src/Data/Time/Locale/Compat.hs b/src/Data/Time/Locale/Compat.hs new file mode 100644 index 0000000..e2f2c0b --- /dev/null +++ b/src/Data/Time/Locale/Compat.hs @@ -0,0 +1,27 @@ +{-# LANGUAGE CPP #-} + +-- | +-- Module : Data.Time.Locale.Compat +-- Copyright : 2014 Kei Hibino +-- License : BSD3 +-- +-- Maintainer : ex8k.hibino@gmail.com +-- Stability : experimental +-- Portability : unknown +-- +-- This module provides compatibility module name +-- for TimeLocale of old-locale or time-1.5. +module Data.Time.Locale.Compat ( + -- * Time locale interface names + TimeLocale, + defaultTimeLocale, + -- * Date format interface names + iso8601DateFormat, + rfc822DateFormat, + ) where + +#if MIN_VERSION_time(1,5,0) +import Data.Time.Format (TimeLocale, defaultTimeLocale, iso8601DateFormat, rfc822DateFormat) +#else +import System.Locale (TimeLocale, defaultTimeLocale, iso8601DateFormat, rfc822DateFormat) +#endif diff --git a/time-locale-compat.cabal b/time-locale-compat.cabal new file mode 100644 index 0000000..a3df11e --- /dev/null +++ b/time-locale-compat.cabal @@ -0,0 +1,46 @@ +name: time-locale-compat +version: 0.1.1.3 +synopsis: Compatibility of TimeLocale between old-locale and time-1.5 +description: This package contains wrapped name module for TimeLocale. +homepage: https://github.com/khibino/haskell-time-locale-compat +license: BSD3 +license-file: LICENSE +author: Kei Hibino +maintainer: ex8k.hibino@gmail.com +copyright: Copyright (c) 2014-2016 Kei Hibino +category: System +build-type: Simple +cabal-version: >=1.10 +tested-with: GHC == 8.0.1 + , GHC == 7.10.1, GHC == 7.10.2, GHC == 7.10.3 + , GHC == 7.8.1, GHC == 7.8.2, GHC == 7.8.3, GHC == 7.8.4 + , GHC == 7.6.1, GHC == 7.6.2, GHC == 7.6.3 + , GHC == 7.4.1, GHC == 7.4.2 + +flag old-locale + description: If true, use old-locale, otherwise use time 1.5 or newer. + default: True + +library + exposed-modules: Data.Time.Locale.Compat + + build-depends: base <5 + + if flag(old-locale) + build-depends: old-locale + , time <1.5 + else + build-depends: time >=1.5 + + hs-source-dirs: src + + default-language: Haskell2010 + + +source-repository head + type: git + location: https://github.com/khibino/haskell-time-locale-compat + +source-repository head + type: mercurial + location: https://bitbucket.org/khibino/haskell-time-locale-compat