Git Product home page Git Product logo

pusher-http-haskell's Introduction

pusher-http-haskell's People

Contributors

eriknstevenson avatar ondrejslamecka avatar passy avatar samuelyallop-pusher avatar syallop avatar willsewell avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar

pusher-http-haskell's Issues

Remove wreq as a dependency

It brings in much too many deps for a library. Go for something more low-level. http-client may be a good options.

Test the `Pusher` module

It's mainly validation that needs to be tested. Will need to create functions that take get/post operations as dependencies, and also provide "default" functions that use the operations from Pusher.HTTP.

Fix log warning for auth/webhook examples

Running it currently results in the log lines

Can't open log file "log/access.log".
Exception: log/access.log: openFile: does not exist (No such file or directory)
Logging to stderr instead. **THIS IS BAD, YOU OUGHT TO FIX THIS**

Haddock failure

src/Network/Pusher.hs:73:3: error:
    parse error on input ‘-- * Data types’
   |
73 |   -- * Data types
   |   ^^^^^^^^^^^^^^^

Simplify Channel type

It should just be Text. Allowing any Text is less typesafe, but more extensible and consistent with other Channels SDKs.

Typeify channels

Have a Channel, PrivateChannel, and PresenceChannel types (latter two automatically handle prefixing).

This should help prevent spelling mistakes in channel names.

Remove -Werror

Current get the warning during stack sdist:

'ghc-options: -Wall -Werror' makes the package very easy to break with future GHC versions because new GHC versions often add new warnings. Use just 'ghc-options: -Wall' instead.

Validate channel when parsing

Change parseChannel into a Read instance.

Can do validation on the channel name when parsing. Only problem is that people can construct a Channel directly that is invalid, so this probably isn't the way to too. Probably be best to make Channel data constructor private, and create a getChannel function that does the validation.

Refactor Pusher type

I think Credentials should be inlined (particularly because I don't think "Cluster" is a credential)

Update the link of `get` method in "Unit testing IO in Haskell" post

In the post, get method link has address of the master tree of the git repo, which is misleading since post is from 29 September 2015, and many has been changed since then.

I suggest making link a constant by using the following link, which is the repo state from the last commit before writing time of the post:

https://github.com/pusher-community/pusher-http-haskell/blob/3498b74afccef0424766370b3a797cbaa946f472/src/Network/Pusher/Internal/HTTP.hs#L48

Use Hident

It would be nice to switch to a well known style that can be enforced with a tool.

compile error with GHC 7.8

I just noticed the compile failure below with GHC 7.8/base-4.7's default install-plan; I haven't investigated further yet

Configuring component lib from pusher-http-haskell-1.1.0.4...
Preprocessing library pusher-http-haskell-1.1.0.4...

src/Network/Pusher.hs:81:8:
    Could not find module ‘Control.Monad.Trans.Except’
    It is a member of the hidden package ‘transformers-0.5.2.0’.
    Perhaps you need to add ‘transformers’ to the build-depends in your .cabal file.
    It is a member of the hidden package ‘transformers-0.4.3.0’.
    Perhaps you need to add ‘transformers’ to the build-depends in your .cabal file.
    It is a member of the hidden package ‘transformers-compat-0.5.1.3’.
    Perhaps you need to add ‘transformers-compat’ to the build-depends in your .cabal file.
    Use -v to see a list of the files searched for.

PS: GHC 7.8's default install-plan most likely picked transformers-0.3, so this may just be a matter of tightening the lower bound on transformers

Fix `Show` instances

Show is meant to render runnable Haskell code that is isomorphic to the Read instance. I need to fix this in this library.

Still alpha?

The Readme says... "This is currently in the alpha stage of development."

But the version (1.2) indicates ... "We're good to go!"

Which is true? (If alpha, please let me know how I can help bring it up to snuff.)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.