Giter VIP home page Giter VIP logo

linklater's Introduction

/\ \     /\ \ /\ "-.\ \ /\ \/ /  /\ \     /\  __ \ /\__  _\/\  ___\ /\  == \
\ \ \____\ \ \\ \ \-.  \\ \  _"-.\ \ \____\ \  __ \\/_/\ \/\ \  __\ \ \  __<
 \ \_____\\ \_\\ \_\\"\_\\ \_\ \_\\ \_____\\ \_\ \_\  \ \_\ \ \_____\\ \_\ \_\
  \/_____/ \/_/ \/_/ \/_/ \/_/\/_/ \/_____/ \/_/\/_/   \/_/  \/_____/ \/_/ /_/


A Haskell library for the Slack API.
It even comes with support for real-
time messaging (read: web sockets).

CircleCI status: CircleCI status


I just want the library

It is on Hackage but not on Stackage.
You will have to add "linklater-4.0.0.0"
to "extra-deps".


I just want documentationA rather unhelpful tutorial
  In which we build a real-time
  jazz-hands robot

• GitHub Pages
  The master branch (development),
  built from CircleCI
  
• Hackage
  The last release


Bots built with Linklaterjpgtobot
  Uses @dpatti’s jpg-to library to
  search for JPEGs on the internet.
  Usage: `/jpeg togepi` or `/jpeg two
  headed boy`.

• hi5bot
  Lets you high-five people, among other
  amazing interactions. Usage: `/hi5
  susan`, `/hi5`.

• huskybot
  As featured in Wired magazine.

• mathbot
  Takes in LaTeX, spits out PNGs. Usage:
  `/math e^{i\pi} + 1 = 0`.


Features

• Lovely Haddock-friendly documentation
  with no misspelllllings to be found

• A little DSL for the Slack formatting
  syntax

• Comes, out of the box!, with a fast
  mode (`slashSimple`) and a power mode
  (`slash`)

• A warm, receptive maintainer with
  beautiful brown eyes

• BSD3 license


ContributorsHao Lian @hlian
• Ulysses Popple @ulyssesp
• Ian Henry @ianthehenry


Our fierce competitiontightrope


Code of conduct

All contributors to this project
solemnly swear to follow the code of
conduct cross their hearts hope to die
spit a seed into an eagle’s eye.

~code of conduct~

linklater's People

Contributors

domdere avatar elldritch avatar ggranberry avatar hlian avatar ulyssesdotcodes 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  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  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

linklater's Issues

issues installing linklater

cabal install linklater
Resolving dependencies...
Configuring base-orphans-0.5.4...
Configuring base-prelude-1.0.1.1...
Configuring SHA-1.6.4.2...
Configuring base16-bytestring-0.1.1.6...
Configuring base64-bytestring-1.0.0.1...
Configuring blaze-builder-0.4.0.2...
Configuring byteable-0.1.1...
Configuring bytestring-builder-0.10.8.1.0...
Building base-orphans-0.5.4...
Building SHA-1.6.4.2...
Building base16-bytestring-0.1.1.6...
Building base-prelude-1.0.1.1...
Building bytestring-builder-0.10.8.1.0...
Building byteable-0.1.1...
Building blaze-builder-0.4.0.2...
Failed to install blaze-builder-0.4.0.2
Build log ( /Users/abe/.cabal/logs/blaze-builder-0.4.0.2.log ):
Configuring blaze-builder-0.4.0.2...
Building blaze-builder-0.4.0.2...
Preprocessing library blaze-builder-0.4.0.2...
: cannot satisfy -package-id text-1.2.1.3-ccdfc7ead27f6ee981ee4253a6ebd3ea
(use -v for more information)
Building base64-bytestring-1.0.0.1...
Configuring data-default-class-0.1.0...
Configuring dlist-0.7.1.2...
Installed bytestring-builder-0.10.8.1.0
Building data-default-class-0.1.0...
Building dlist-0.7.1.2...
Configuring entropy-0.3.7...
Installed byteable-0.1.1
Configuring fail-4.9.0.0...
Installed base-prelude-1.0.1.1
Configuring hourglass-0.2.10...
Installed base16-bytestring-0.1.1.6
Configuring memory-0.13...
Installed data-default-class-0.1.0
Building fail-4.9.0.0...
Building hourglass-0.2.10...
Building memory-0.13...
Configuring mime-types-0.1.0.7...
Installed fail-4.9.0.0
Building entropy-0.3.7...
Configuring prelude-extras-0.4.0.3...
Installed base64-bytestring-1.0.0.1
Building mime-types-0.1.0.7...
Configuring psqueues-0.2.2.1...
Failed to install mime-types-0.1.0.7
Build log ( /Users/abe/.cabal/logs/mime-types-0.1.0.7.log ):
Configuring mime-types-0.1.0.7...
Building mime-types-0.1.0.7...
Preprocessing library mime-types-0.1.0.7...
: cannot satisfy -package-id text-1.2.1.3-ccdfc7ead27f6ee981ee4253a6ebd3ea
(use -v for more information)
Building prelude-extras-0.4.0.3...
Configuring reflection-2.1.2...
Installed dlist-0.7.1.2
Building psqueues-0.2.2.1...
Configuring tagged-0.8.4...
Failed to install psqueues-0.2.2.1
Build log ( /Users/abe/.cabal/logs/psqueues-0.2.2.1.log ):
Configuring psqueues-0.2.2.1...
Building psqueues-0.2.2.1...
Preprocessing library psqueues-0.2.2.1...
: cannot satisfy -package-id hashable-1.2.3.3-0878f5277d2f75c9c528bcea05099169
(use -v for more information)
Building reflection-2.1.2...
Building tagged-0.8.4...
Configuring time-locale-compat-0.1.1.1...
Installed entropy-0.3.7
Building time-locale-compat-0.1.1.1...
Configuring vault-0.3.0.6...
Installed time-locale-compat-0.1.1.1
Building vault-0.3.0.6...
Failed to install vault-0.3.0.6
Build log ( /Users/abe/.cabal/logs/vault-0.3.0.6.log ):
Configuring vault-0.3.0.6...
Building vault-0.3.0.6...
Preprocessing library vault-0.3.0.6...
: cannot satisfy -package-id hashable-1.2.3.3-0878f5277d2f75c9c528bcea05099169
(use -v for more information)
Configuring data-default-instances-base-0.1.0...
Building data-default-instances-base-0.1.0...
Configuring data-default-instances-containers-0.0.1...
Installed data-default-instances-base-0.1.0
Configuring data-default-instances-old-locale-0.0.1...
Installed tagged-0.8.4
Building data-default-instances-containers-0.0.1...
Configuring cereal-0.5.2.0...
Installed prelude-extras-0.4.0.3
Building data-default-instances-old-locale-0.0.1...
Configuring pem-0.2.2...
Failed to install data-default-instances-old-locale-0.0.1
Build log ( /Users/abe/.cabal/logs/data-default-instances-old-locale-0.0.1.log ):
Configuring data-default-instances-old-locale-0.0.1...
Building data-default-instances-old-locale-0.0.1...
Preprocessing library data-default-instances-old-locale-0.0.1...
: cannot satisfy -package-id old-locale-1.0.0.7-226545412ff89fdc42d011fe5641eba4
(use -v for more information)
Building cereal-0.5.2.0...
Configuring data-default-instances-dlist-0.0.1...
Installed data-default-instances-containers-0.0.1
Building pem-0.2.2...
Configuring semigroups-0.18.1...
Failed to install pem-0.2.2
Build log ( /Users/abe/.cabal/logs/pem-0.2.2.log ):
Configuring pem-0.2.2...
Building pem-0.2.2...
Preprocessing library pem-0.2.2...
: cannot satisfy -package-id mtl-2.2.1-b6b36d751642fde56f037818eb788105
(use -v for more information)
Building data-default-instances-dlist-0.0.1...
Building semigroups-0.18.1...
Failed to install semigroups-0.18.1
Build log ( /Users/abe/.cabal/logs/semigroups-0.18.1.log ):
Configuring semigroups-0.18.1...
Building semigroups-0.18.1...
Preprocessing library semigroups-0.18.1...
: cannot satisfy -package-id hashable-1.2.3.3-0878f5277d2f75c9c528bcea05099169
(use -v for more information)
Installed data-default-instances-dlist-0.0.1
Installed memory-0.13
Configuring cryptonite-0.16...
Building cryptonite-0.16...
Installed base-orphans-0.5.4
Configuring distributive-0.5.0.2...
Installed reflection-2.1.2
Building distributive-0.5.0.2...
Failed to install distributive-0.5.0.2
Build log ( /Users/abe/.cabal/logs/distributive-0.5.0.2.log ):
[1 of 1] Compiling Main ( /var/folders/pt/qlyw9k2n2ts8c8rffgy89jph0000gp/T/cabal-tmp-38463/distributive-0.5.0.2/dist/setup/setup.hs, /var/folders/pt/qlyw9k2n2ts8c8rffgy89jph0000gp/T/cabal-tmp-38463/distributive-0.5.0.2/dist/setup/Main.o )
Linking /var/folders/pt/qlyw9k2n2ts8c8rffgy89jph0000gp/T/cabal-tmp-38463/distributive-0.5.0.2/dist/setup/setup ...
Configuring distributive-0.5.0.2...
Building distributive-0.5.0.2...
Preprocessing library distributive-0.5.0.2...
: cannot satisfy -package-id transformers-compat-0.4.0.4-8aa4073730c676dbe210ea8bffd8d092
(use -v for more information)
Installed hourglass-0.2.10
Configuring asn1-types-0.3.2...
Building asn1-types-0.3.2...
Installed asn1-types-0.3.2
Configuring asn1-encoding-0.9.3...
Building asn1-encoding-0.9.3...
Installed cereal-0.5.2.0
Configuring crypto-api-0.13.2...
Configuring socks-0.5.5...
Building socks-0.5.5...
Building crypto-api-0.13.2...
Failed to install socks-0.5.5
Build log ( /Users/abe/.cabal/logs/socks-0.5.5.log ):
Configuring socks-0.5.5...
Building socks-0.5.5...
Preprocessing library socks-0.5.5...
: cannot satisfy -package-id network-2.6.2.1-d36366a463c712c97c9a593a96d0355e
(use -v for more information)
Installed asn1-encoding-0.9.3
Configuring asn1-parse-0.9.4...
Configuring crypto-pubkey-types-0.4.3...
Building crypto-pubkey-types-0.4.3...
Building asn1-parse-0.9.4...
Installed asn1-parse-0.9.4
Installed crypto-api-0.13.2
Configuring pureMD5-2.1.3...
Building pureMD5-2.1.3...
Installed crypto-pubkey-types-0.4.3
Installed pureMD5-2.1.3
Installed cryptonite-0.16
Configuring cryptohash-0.11.9...
Building cryptohash-0.11.9...
Installed SHA-1.6.4.2
Configuring RSA-2.2.0...
Building RSA-2.2.0...
Installed cryptohash-0.11.9
Installed RSA-2.2.0
Updating documentation index
/Users/abe/Library/Haskell/share/doc/x86_64-osx-ghc-7.10.3/index.html
cabal: Error: some packages failed to install:
adjunctions-4.3 depends on distributive-0.5.0.2 which failed to install.
aeson-0.11.2.0 depends on semigroups-0.18.1 which failed to install.
authenticate-oauth-1.5.1.2 depends on data-default-instances-old-locale-0.0.1
which failed to install.
bifunctors-5.2 depends on distributive-0.5.0.2 which failed to install.
blaze-builder-0.4.0.2 failed during the building phase. The exception was:
ExitFailure 1
comonad-5 depends on distributive-0.5.0.2 which failed to install.
connection-0.2.5 depends on socks-0.5.5 which failed to install.
contravariant-1.4 depends on semigroups-0.18.1 which failed to install.
cookie-0.4.2 depends on blaze-builder-0.4.0.2 which failed to install.
data-default-0.7.0 depends on data-default-instances-old-locale-0.0.1 which
failed to install.
data-default-instances-old-locale-0.0.1 failed during the building phase. The
exception was:
ExitFailure 1
distributive-0.5.0.2 failed during the building phase. The exception was:
ExitFailure 1
free-4.12.4 depends on distributive-0.5.0.2 which failed to install.
http-client-0.4.28 depends on mime-types-0.1.0.7 which failed to install.
http-client-tls-0.2.4 depends on socks-0.5.5 which failed to install.
http-types-0.9.1 depends on blaze-builder-0.4.0.2 which failed to install.
kan-extensions-5.0.1 depends on distributive-0.5.0.2 which failed to install.
lens-4.14 depends on distributive-0.5.0.2 which failed to install.
lens-aeson-1.0.0.5 depends on distributive-0.5.0.2 which failed to install.
linklater-3.2.0.0 depends on socks-0.5.5 which failed to install.
mime-types-0.1.0.7 failed during the building phase. The exception was:
ExitFailure 1
pem-0.2.2 failed during the building phase. The exception was:
ExitFailure 1
profunctors-5.2 depends on distributive-0.5.0.2 which failed to install.
psqueues-0.2.2.1 failed during the building phase. The exception was:
ExitFailure 1
semigroupoids-5.0.1 depends on distributive-0.5.0.2 which failed to install.
semigroups-0.18.1 failed during the building phase. The exception was:
ExitFailure 1
socks-0.5.5 failed during the building phase. The exception was:
ExitFailure 1
streaming-commons-0.1.15.5 depends on blaze-builder-0.4.0.2 which failed to
install.
tls-1.3.8 depends on pem-0.2.2 which failed to install.
vault-0.3.0.6 failed during the building phase. The exception was:
ExitFailure 1
void-0.7.1 depends on semigroups-0.18.1 which failed to install.
wai-3.2.1.1 depends on vault-0.3.0.6 which failed to install.
wreq-0.4.1.0 depends on socks-0.5.5 which failed to install.
x509-1.6.3 depends on pem-0.2.2 which failed to install.
x509-store-1.6.1 depends on pem-0.2.2 which failed to install.
x509-system-1.6.3 depends on pem-0.2.2 which failed to install.
x509-validation-1.6.3 depends on pem-0.2.2 which failed to install.

cabal --version
cabal-install version 1.22.6.0
using version 1.22.5.0 of the Cabal library

ghc --version
The Glorious Glasgow Haskell Compilation System, version 7.10.3

Remove upper constraint on base version

Hi there!

🙏 Apologies if there are any glaring inconsistencies or outright falsehoods with the content below as I'm a relative beginner to Haskell.

I'm trying to use linklater with stack and stackage. The earliest LTS version of Haskell I can find through Stackage is 1.0, which supports base-4.7.0.2.

stack build is failing due to the following:

--  Failure when adding dependencies:
      base: needed (<=4.7.0.1), but 4.7.0.2 found
    needed for package: linklater-3.1.0.0

Is there any particular reason why there is an upper version restriction on base?

Let me know if I can provide any more info. Would be really great if I could use linklater with stack!

Couldn't match type `IOException` with `RequestError`

I'm just trying to make a very simple 'EchoBot' that echos whatever the input query is. E.g.
/echo hello. Bot replies with hello.

However, I'm having some trouble replying to the user, I'm getting this error on compile:

    • Couldn't match type ‘IOException’ with ‘RequestError’
        arising from a functional dependency between:
          constraint ‘Control.Monad.Error.Class.MonadError RequestError IO’
            arising from a use of ‘say’
          instance ‘Control.Monad.Error.Class.MonadError IOException IO’
            at <no location info>
    • In the first argument of ‘void’, namely ‘(say m config)’
      In a stmt of a 'do' block: void (say m config)
      In the expression:
        do { putStrLn ("+ Outgoing message: " <> show (encode m));
             void (say m config);
             return "" }

Code:

testTo :: Command -> IO Text
testTo cmd = do
    putStrLn ("+ Incoming command: " <> show cmd)
    config <- slackConfig
    message <- runExceptT (messageOfCommand cmd)
    case (debug, message) of
      (False, Right m) -> do
          putStrLn ("+ Outgoing message: " <> show (encode m))
          void (say m config) -- <<< Error occurs here
          return ""
      (False, Left e) ->
          return ("popslave encountered an error " <> (e ^. packed))
      (True, Right m) -> do
          putStrLn ("+ Outgoing message: " <> show (encode m))
          return ""
      (True, Left e) -> do
          putStrLn ("+ Outgoing ERROR: " <> e)
          return ""
    where
        debug = False

Any help would be appreciated.

Trouble using 'say' function

http://lpaste.net/360345

While writing a small slackbot using linklater I noticed that providing a Message and Config object to 'say' returned a value that violates functional dependencies. Can anyone provide any insights into what I'm doing wrong here?

Network.Socket.recvBuf: failed on examples

Hi, I get this when trying to run the example app. Any idea how to fix it?

sb-exe.EXE: Network.Socket.recvBuf: failed (No error)
sb-exe.EXE: thread blocked indefinitely in an MVar operation

Versioning discrepancy?

The latest version available on cabal (or documented) is 3.2.0.0, however the linklater.cabal file refers to itself as 4.0.0.0. Is a new version in the works?

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.