I hereby claim:
- I am jyrimatti on github.
- I am jyrimatti (https://keybase.io/jyrimatti) on keybase.
- I have a public key whose fingerprint is 38E6 FC6A C104 7CEC 71CE 71E7 1959 B8A4 F22F EC94
To claim this, I am signing this object:
| #! /usr/bin/env nix-shell | |
| #! nix-shell -i runghc -p "haskellPackages.ghcWithPackages(p: with p; [type-level-sets])" | |
| #! nix-shell -I nixpkgs=channel:nixos-18.03 | |
| {-# LANGUAGE PolyKinds #-} | |
| {-# LANGUAGE TypeOperators #-} | |
| {-# LANGUAGE MultiParamTypeClasses #-} | |
| {-# LANGUAGE DataKinds #-} | |
| {-# LANGUAGE FlexibleInstances #-} |
| #! /usr/bin/env nix-shell | |
| #! nix-shell -i bash -p "haskellPackages.ghcWithPackages(p: with p; [profunctors mtl lens])" | |
| ghci <<---EOF | |
| :set +m | |
| :set -XRank2Types | |
| :set -XScopedTypeVariables | |
| {-# LANGUAGE Rank2Types, ScopedTypeVariables #-} | |
| import Data.Tuple (swap) | |
| import Data.Monoid (First(..), getFirst, (<>)) |
| Verifying that +jyrimatti is my blockchain ID. https://onename.com/jyrimatti |
I hereby claim:
To claim this, I am signing this object:
| {-# LANGUAGE TupleSections #-} | |
| module Main where | |
| -- hide the-dot to use it from Control.Category | |
| import Prelude hiding ((.)) | |
| import Control.Category | |
| import Control.Monad ((<=<)) | |
| import Control.Comonad.Env | |
| import Control.Arrow | |
| import Data.Profunctor |
| -- build with cabal file: | |
| -- name: aeson-ex | |
| -- version: 0.1 | |
| -- build-type: Simple | |
| -- | |
| -- executable aeson_ex | |
| -- hs-source-dirs: src | |
| -- main-is: Main.hs | |
| -- build-depends: base >= 4, |
| 38E6 FC6A C104 7CEC 71CE 71E7 1959 B8A4 F22F EC94 |
| // These should already exist in a standard library or similar | |
| trait Showable[T] { | |
| val show: T => String | |
| } | |
| trait StandardShowables { | |
| implicit object StringIsShowable extends Showable[String] { | |
| val show = (a: String) => a | |
| } | |
| implicit object BooleanIsShowable extends Showable[Boolean] { | |
| val show = (a: Boolean) => a.toString |