This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
### Keybase proof | |
I hereby claim: | |
* I am purefn on github. | |
* I am purefn (https://keybase.io/purefn) on keybase. | |
* I have a public key ASBMbA3lKeGhcyrARt60F0LI24vmRhPnW2ukBfw2EKNBIAo | |
To claim this, I am signing this object: |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import scalaz._ | |
import Scalaz._ | |
import scalaz.effect._ | |
package object types { | |
type Bytes = String | |
type Path = String | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import scalaz._ | |
import scalaz.stream._ | |
import scodec.bits._ | |
type EntityBody[F] = Process[Free.FreeC[F, ?], ByteVector] | |
final case class Request[A] | |
( method: Method | |
, uri: Uri | |
, httpVersion: HttpVersion |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
final case class Request | |
( method: Method | |
, uri: Uri | |
, httpVersion: HttpVersion | |
, headers: CI[String] ==>> IList[String] | |
, body: EntityBody | |
) | |
final case class Response | |
( method: Method |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import sbt._ | |
import Keys._ | |
case class Step[A](run: Def.Initialize[Task[A]]) { | |
def map[B](f: A => B): Step[B] = | |
Step[B](Def.taskDyn { | |
Def.task { f(run.value) } | |
}) | |
def flatMap[B](f: A => Step[B]): Step[B] = | |
Step[B](Def.taskDyn { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
page = doctypehtml_ $ do | |
head_ $ do | |
webResources Batched "/s/" [ aui, reactjs, pageResource ] | |
body_ "Hello world!" | |
-- or | |
page2 = withWebResources Separate "/s/" [ aui, reactjs, pageResource ] $ \links scripts -> | |
doctypehtml_ $ do | |
head_ $ do |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env bash | |
TOOLS="ctags haskellngPackages.codex haskellngPackages.ghc-mod haskellngPackages.hasktags haskellngPackages.hlint haskellngPackages.hscope haskellngPackages.pointfree haskellngPackages.pointful haskellngPackages.stylish-haskell" | |
EXPR="with (import <nixpkgs> {}).pkgs; with (import <nixpkgs/pkgs/development/haskell-modules/lib.nix> { inherit pkgs; });" | |
if [ -e "shell.nix" ] | |
then | |
PKG="(import ./shell.nix)" | |
else | |
PKG="myHaskellProject" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
data Foo = Foo { bar :: Maybe Bar } | |
data Bar = Bar { baz :: Text } | |
t :: Foo -> Text | |
t foo = foldMap id $ foo ^. bar ^? _Just baz |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{-# LANGUAGE FunctionalDependencies #-} | |
{-# LANGUAGE GeneralizedNewtypeDeriving #-} | |
{-# LANGUAGE MultiParamTypeClasses #-} | |
{-# LANGUAGE TemplateHaskell #-} | |
module Stack where | |
import Control.Applicative | |
import Control.Lens | |
import Control.Monad.State |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ mkDerivation, aeson, AesonBson, ansi-wl-pprint, base, bifunctors | |
, blaze-html, blaze-markup, bson, bytestring, case-insensitive | |
, cereal, clay, configurator, containers, either, errors | |
, exceptions, failure, hslogger, http-conduit, http-types, jwt | |
, lens, mongoDB, mtl, network, network-uri, optparse-applicative | |
, parsers, profunctors, pureMD5, QuickCheck, safe, scientific | |
, scotty, semigroups, SHA, stdenv, tasty, tasty-hunit | |
, tasty-quickcheck, text, time, transformers, trifecta | |
, unordered-containers, uri, utf8-string, validation, wai | |
, wai-extra, wai-middleware-static, warp, word8, zip-archive |
NewerOlder