passy / giphy-api Goto Github PK
View Code? Open in Web Editor NEWGiphy HTTP API Wrapper for Haskell
Home Page: https://hackage.haskell.org/package/giphy-api
License: BSD 3-Clause "New" or "Revised" License
Giphy HTTP API Wrapper for Haskell
Home Page: https://hackage.haskell.org/package/giphy-api
License: BSD 3-Clause "New" or "Revised" License
So many cool new features. Might even get the config in there.
The Hackage matrix builder detected the following compile failure:
Configuring component lib from giphy-api-0.5.1.0
Preprocessing library giphy-api-0.5.1.0...
[1 of 2] Compiling Paths_giphy_api ( /tmp/matrix-worker/1480361044/dist-newstyle/build/x86_64-linux/ghc-7.8.4/giphy-api-0.5.1.0/build/autogen/Paths_giphy_api.hs, /tmp/matrix-worker/1480361044/dist-newstyle/build/x86_64-linux/ghc-7.8.4/giphy-api-0.5.1.0/build/Paths_giphy_api.o )
[2 of 2] Compiling Web.Giphy ( src/Web/Giphy.hs, /tmp/matrix-worker/1480361044/dist-newstyle/build/x86_64-linux/ghc-7.8.4/giphy-api-0.5.1.0/build/Web/Giphy.o )
Loading package ghc-prim ... linking ... done.
Loading package integer-gmp ... linking ... done.
Loading package base ... linking ... done.
Loading package array-0.5.0.0 ... linking ... done.
Loading package deepseq-1.3.0.2 ... linking ... done.
Loading package bytestring-0.10.4.0 ... linking ... done.
Loading package containers-0.5.5.1 ... linking ... done.
Loading package fail-4.9.0.0 ... linking ... done.
Loading package binary-0.7.1.0 ... linking ... done.
Loading package text-1.2.2.1 ... linking ... done.
Loading package hashable-1.2.4.0 ... linking ... done.
Loading package transformers-0.5.2.0 ... linking ... done.
Loading package primitive-0.6.1.0 ... linking ... done.
Loading package vector-0.11.0.0 ... linking ... done.
Loading package scientific-0.3.4.9 ... linking ... done.
Loading package pretty-1.1.1.1 ... linking ... done.
Loading package template-haskell ... linking ... done.
Loading package nats-1.1.1 ... linking ... done.
Loading package transformers-compat-0.5.1.4 ... linking ... done.
Loading package tagged-0.8.5 ... linking ... done.
Loading package unordered-containers-0.2.7.1 ... linking ... done.
Loading package semigroups-0.18.2 ... linking ... done.
Loading package attoparsec-0.13.1.0 ... linking ... done.
Loading package old-locale-1.0.0.6 ... linking ... done.
Loading package time-1.4.2 ... linking ... done.
Loading package unix-2.7.0.1 ... linking ... done.
Loading package base-compat-0.9.1 ... linking ... done.
Loading package dlist-0.8.0.2 ... linking ... done.
Loading package time-locale-compat-0.1.1.3 ... linking ... done.
Loading package aeson-1.0.2.1 ... linking ... done.
Loading package base64-bytestring-1.0.0.1 ... linking ... done.
Loading package mtl-2.2.1 ... linking ... done.
Loading package stm-2.4.4.1 ... linking ... done.
Loading package exceptions-0.8.3 ... linking ... done.
Loading package blaze-builder-0.4.0.2 ... linking ... done.
Loading package uri-bytestring-0.2.2.1 ... linking ... done.
Loading package random-1.1 ... linking ... done.
Loading package uuid-types-1.0.3 ... linking ... done.
Loading package http-api-data-0.3.3 ... linking ... done.
Loading package case-insensitive-1.2.0.7 ... linking ... done.
Loading package data-default-class-0.1.2.0 ... linking ... done.
Loading package cookie-0.4.2.1 ... linking ... done.
Loading package filepath-1.3.0.2 ... linking ... done.
Loading package http-types-0.9.1 ... linking ... done.
Loading package mime-types-0.1.0.7 ... linking ... done.
Loading package network-2.6.3.1 ... linking ... done.
Loading package parsec-3.1.11 ... linking ... done.
Loading package network-uri-2.6.1.0 ... linking ... done.
Loading package async-2.1.1 ... linking ... done.
Loading package directory-1.2.1.0 ... linking ... done.
Loading package process-1.2.0.0 ... linking ... done.
Loading package zlib-0.6.1.2 ... linking ... done.
Loading package streaming-commons-0.1.16 ... linking ... done.
Loading package http-client-0.5.4 ... linking ... done.
Loading package byteable-0.1.1 ... linking ... done.
Loading package cereal-0.5.4.0 ... linking ... done.
Loading package socks-0.5.5 ... linking ... done.
Loading package hourglass-0.2.10 ... linking ... done.
Loading package memory-0.13 ... linking ... done.
Loading package asn1-types-0.3.2 ... linking ... done.
Loading package asn1-encoding-0.9.4 ... linking ... done.
Loading package cryptonite-0.20 ... linking ... done.
Loading package asn1-parse-0.9.4 ... linking ... done.
Loading package pem-0.2.2 ... linking ... done.
Loading package x509-1.6.4 ... linking ... done.
Loading package x509-store-1.6.2 ... linking ... done.
Loading package x509-validation-1.6.5 ... linking ... done.
Loading package tls-1.3.8 ... linking ... done.
Loading package x509-system-1.6.4 ... linking ... done.
Loading package connection-0.2.6 ... linking ... done.
Loading package http-client-tls-0.3.3 ... linking ... done.
Loading package http-media-0.6.4 ... linking ... done.
Loading package safe-0.3.10 ... linking ... done.
Loading package mmorph-1.0.9 ... linking ... done.
Loading package utf8-string-1.0.1.1 ... linking ... done.
Loading package string-conversions-0.4 ... linking ... done.
Loading package vault-0.3.0.6 ... linking ... done.
Loading package servant-0.9.1.1 ... linking ... done.
Loading package servant-client-0.9.1.1 ... linking ... done.
Loading package microlens-0.4.7.0 ... linking ... done.
Loading package microlens-th-0.4.1.0 ... linking ... done.
src/Web/Giphy.hs:170:12:
Not in scope: ‘<$>’
Perhaps you meant ‘<>’ (imported from Data.Monoid)
src/Web/Giphy.hs:170:25:
Not in scope: ‘<$>’
Perhaps you meant ‘<>’ (imported from Data.Monoid)
src/Web/Giphy.hs:171:12:
Not in scope: ‘<*>’
Perhaps you meant ‘<>’ (imported from Data.Monoid)
src/Web/Giphy.hs:171:25:
Not in scope: ‘<$>’
Perhaps you meant ‘<>’ (imported from Data.Monoid)
src/Web/Giphy.hs:172:12:
Not in scope: ‘<*>’
Perhaps you meant ‘<>’ (imported from Data.Monoid)
src/Web/Giphy.hs:172:25:
Not in scope: ‘<$>’
Perhaps you meant ‘<>’ (imported from Data.Monoid)
src/Web/Giphy.hs:173:12:
Not in scope: ‘<*>’
Perhaps you meant ‘<>’ (imported from Data.Monoid)
src/Web/Giphy.hs:173:25:
Not in scope: ‘<$>’
Perhaps you meant ‘<>’ (imported from Data.Monoid)
src/Web/Giphy.hs:174:12:
Not in scope: ‘<*>’
Perhaps you meant ‘<>’ (imported from Data.Monoid)
src/Web/Giphy.hs:174:25:
Not in scope: ‘<$>’
Perhaps you meant ‘<>’ (imported from Data.Monoid)
src/Web/Giphy.hs:175:12:
Not in scope: ‘<*>’
Perhaps you meant ‘<>’ (imported from Data.Monoid)
src/Web/Giphy.hs:175:25:
Not in scope: ‘<$>’
Perhaps you meant ‘<>’ (imported from Data.Monoid)
src/Web/Giphy.hs:176:12:
Not in scope: ‘<*>’
Perhaps you meant ‘<>’ (imported from Data.Monoid)
src/Web/Giphy.hs:176:25:
Not in scope: ‘<$>’
Perhaps you meant ‘<>’ (imported from Data.Monoid)
src/Web/Giphy.hs:177:12:
Not in scope: ‘<*>’
Perhaps you meant ‘<>’ (imported from Data.Monoid)
src/Web/Giphy.hs:177:25:
Not in scope: ‘<$>’
Perhaps you meant ‘<>’ (imported from Data.Monoid)
> /tmp/stackage-build13/giphy-api-0.6.0.1$ ghc -clear-package-db -global-package-db -package-db=/var/stackage/work/builds/nightly/pkgdb Setup
[1 of 1] Compiling Main ( Setup.hs, Setup.o )
Linking Setup ...
> /tmp/stackage-build13/giphy-api-0.6.0.1$ ./Setup configure --package-db=clear --package-db=global --package-db=/var/stackage/work/builds/nightly/pkgdb --libdir=/var/stackage/work/builds/nightly/lib --bindir=/var/stackage/work/builds/nightly/bin --datadir=/var/stackage/work/builds/nightly/share --libexecdir=/var/stackage/work/builds/nightly/libexec --sysconfdir=/var/stackage/work/builds/nightly/etc --docdir=/var/stackage/work/builds/nightly/doc/giphy-api-0.6.0.1 --htmldir=/var/stackage/work/builds/nightly/doc/giphy-api-0.6.0.1 --haddockdir=/var/stackage/work/builds/nightly/doc/giphy-api-0.6.0.1
Configuring giphy-api-0.6.0.1...
> /tmp/stackage-build13/giphy-api-0.6.0.1$ ghc -clear-package-db -global-package-db -package-db=/var/stackage/work/builds/nightly/pkgdb Setup
> /tmp/stackage-build13/giphy-api-0.6.0.1$ ./Setup build
Preprocessing library for giphy-api-0.6.0.1..
Building library for giphy-api-0.6.0.1..
[1 of 2] Compiling Paths_giphy_api ( dist/build/autogen/Paths_giphy_api.hs, dist/build/Paths_giphy_api.o )
[2 of 2] Compiling Web.Giphy ( src/Web/Giphy.hs, dist/build/Web/Giphy.o )
src/Web/Giphy.hs:413:62: error:
Not in scope: type constructor or class ‘Servant.ServantError’
Perhaps you meant ‘Servant.ClientError’ (imported from Servant.Client)
Neither ‘Servant.API’ nor ‘Servant.Client’ exports ‘ServantError’.
|
413 | runGiphy :: MonadIO m => Giphy a -> GiphyConfig -> m (Either Servant.ServantError a)
| ^^^^^^^^^^^^^^^^^^^^
src/Web/Giphy.hs:425:16: error:
Not in scope: type constructor or class ‘Servant.ServantError’
Perhaps you meant ‘Servant.ClientError’ (imported from Servant.Client)
Neither ‘Servant.API’ nor ‘Servant.Client’ exports ‘ServantError’.
|
425 | -> m (Either Servant.ServantError a)
| ^^^^^^^^^^^^^^^^^^^^
This is just a work-around that shouldn't be necessary as soon as stack > 1.0.4 is released. I may even remove the .cabal file entirely.
As seen on the Stackage build server:
[2 of 2] Compiling Web.Giphy ( src/Web/Giphy.hs, dist/build/Web/Giphy.o )
src/Web/Giphy.hs:430:28: error:
• Couldn't match expected type ‘Servant.ClientEnv’
with actual type ‘Maybe (GHC.Conc.Sync.TVar HTTP.CookieJar)
-> Servant.ClientEnv’
• Probable cause: ‘env’ is applied to too few arguments
In the first argument of ‘runClientM'’, namely ‘env’
In the first argument of ‘(.)’, namely ‘runClientM' env’
In the second argument of ‘(.)’, namely
‘runClientM' env . Reader.runReaderT giphy’
|
430 | liftIO . runClientM' env . Reader.runReaderT giphy $ GiphyContext conf
| ^^^
I was able to reproduce this failure locally like so:
stack unpack giphy-api-0.5.2.0 && cd giphy-api-0.5.2.0
edit stack.yaml # add the following stack.yaml
stack build
# stack.yaml
resolver: nightly-2018-03-10
extra-deps:
- servant-0.13
- http-types-0.12.1
- servant-client-0.13
- servant-client-core-0.13
As seen on the Stackage build server trying to build giphy-api-0.4.0.0:
[2 of 2] Compiling Web.Giphy ( src/Web/Giphy.hs, dist/build/Web/Giphy.o )
src/Web/Giphy.hs:351:1: error:
• Couldn't match type ‘Servant.ClientM SearchResponse’
with ‘HTTP.Manager
-> Servant.BaseUrl
-> ExceptT Servant.ServantError IO SearchResponse’
Expected type: Maybe Key
-> Maybe PaginationOffset
-> Maybe Query
-> HTTP.Manager
-> Servant.BaseUrl
-> ExceptT Servant.ServantError IO SearchResponse
Actual type: Maybe Key
-> Maybe PaginationOffset
-> Maybe Query
-> Servant.ClientM SearchResponse
• When checking that the inferred type
search' :: Maybe Key
-> Maybe PaginationOffset
-> Maybe Query
-> Servant.ClientM SearchResponse
is as general as its signature
search' :: Maybe Key
-> Maybe PaginationOffset
-> Maybe Query
-> HTTP.Manager
-> Servant.BaseUrl
-> ExceptT Servant.ServantError IO SearchResponse
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.