Comments (6)
PR #87 fixes #77, so if it gets merged this issue can be completed.
from http-api-data.
This issue can be easily fixed with this function recently introduced to time
, but it cannot be implemented yet.
It relies on time-1.9.1
, and trying to use it gives the following problem:
In the dependencies for Cabal-2.2.0.1:
time-1.9.1 from stack configuration does not match >=1.4 && <1.9 (latest
matching version is 1.8.0.4)
needed due to http-api-data-0.3.10 -> Cabal-2.2.0.1
In the dependencies for directory-1.3.1.5:
time-1.9.1 from stack configuration does not match >=1.4 && <1.9 (latest
matching version is 1.8.0.4)
needed due to http-api-data-0.3.10 -> directory-1.3.1.5
In the dependencies for unix-2.7.2.2:
time-1.9.1 from stack configuration does not match >=1.2 && <1.9 (latest
matching version is 1.8.0.4)
needed due to http-api-data-0.3.10 -> unix-2.7.2.2
The newest version of directory
, 1.3.3.1
, already uses time (>=1.4 && <1.10)
, and the unreleased 2.8.0.0
version of unix
as well. However, the latest published version of Cabal
, which is 2.4.0.1
, still uses time (>=1.4.0.1 && <1.9)
, and the latest published version of unix
, 2.7.2.2
, uses time (>=1.2 && <1.9)
.
As such, a way should be found to fix this problem without relying on a newer version of time
, at least for the time being.
from http-api-data.
Indeed. For earlier versions I guess we can use realToFrac :: NominalDiffTime -> Pico
.
@rockbmb are you willing to submit a PR? 😊
I think you can use CPP to produce something like this:
#if MIN_VERSION_time(1,9,1)
nominalDiffTimeToSeconds
#else
(realToFrac :: NominalDiffTime -> Pico)
#endif
@phadej is it okay to use CPP here?
from http-api-data.
I'd write something like
import Data.Time (NominalDiffTime)
#if MIN_VERSION_time(1,9,1)
import Data.Time (nominalDiffTimeToSeconds)
#endif
-- possibly more imports
#if !MIN_VERSION_time(1,9,1)
nominalDiffTimeToSeconds :: NominalDiffTime -> Pico
nominalDiffTimeToSeconds = realToFrac
#endif
from http-api-data.
@fizruk will submit a PR 👍
from http-api-data.
from http-api-data.
Related Issues (20)
- FormUrlEncoded is vulnerable to HashDOS attacks. HOT 1
- Preventing the anyclass deriving of ToHttpApiData and FromHttpApiData HOT 4
- Support GHC-9.6
- How to deal with generic deriving for non-flat records
- GFromForm for Bool
- Allow base-4.20 HOT 2
- allow cookie-0.5
- Test failures with GHC 8.2.1rc-2 HOT 3
- Add instances for `SetCookie` HOT 4
- Incorrect lower-bounds
- Support for Cabal 2.2? HOT 10
- Add instances for Data.Fixed
- Why don't toQueryParam or toUrlPiece actually url-encode the data? HOT 3
- Allow base-4.12.0.0 HOT 3
- Why does `showTextData` convert everything to lower case HOT 3
- FromForm and ToForm instances for (,) and Either HOT 5
- Allow base-4.13.0.0 HOT 5
- could not parse: `' (input does not start with a digit) HOT 1
- ToHttpApiData instances for ToJSON instances
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from http-api-data.