I hereby claim:
- I am pkamenarsky on github.
- I am pkamenarsky (https://keybase.io/pkamenarsky) on keybase.
- I have a public key ASDnTmZ4WbKnCFcogH9dCldAvg8-4SiG-lwILvJK6RhNRwo
To claim this, I am signing this object:
| module Data.Set.NonTransitive where | |
| -- | A class for non-transitive equalities, e.g. x == y and y == z doesn't imply x == z. | |
| class NonTransEq a where | |
| nonTransEq :: a -> a -> Bool | |
| newtype Set a = Set { toList :: [a] } | |
| deriving Show | |
| instance (NonTransEq a, Semigroup a) => Semigroup (Set a) where |
| module Data.Set.NonTransitive where | |
| -- | A class for non-transitive equalities, e.g. x == y and y == z doesn't imply x == z. | |
| class NonTransEq a where | |
| nonTransEq :: a -> a -> Bool | |
| newtype Set a = Set { toList :: [a] } | |
| deriving Show | |
| instance (NonTransEq a, Semigroup a) => Semigroup (Set a) where |
| data Δ a = Value (TVar a) (TChan a) deriving Eq | |
| data Lens s t | |
| mapValue :: Lens s t -> Δ t -> Δ s | |
| mapValue = undefined | |
| pairValues :: Lens a t -> Lens b t -> Δ a -> Δ b -> Δ t | |
| pairValues = undefined |
| module Applicative where | |
| -- A real-world example of Applicative. | |
| -- | |
| -- Imagine we have a `User` data structure (with all the usual fields) which | |
| -- we must assemble from various data sources, like databases, files, external | |
| -- services and so on. | |
| -- | |
| -- One thing our specs call for is that we must log error messages whenever | |
| -- some external service fails or is otherwise unavailable. However, we'd like |
I hereby claim:
To claim this, I am signing this object:
| {-# LANGUAGE ExistentialQuantification #-} | |
| {-# LANGUAGE DeriveFunctor #-} | |
| {-# LANGUAGE StandaloneDeriving #-} | |
| module Rs where | |
| import Control.Monad.Free | |
| import qualified Data.Map as M | |
| data RsF m next = ∀ a. RsCheckpoint Int (m a) (a → next) | RsRewind Int |
| {-# LANGUAGE DefaultSignatures #-} | |
| {-# LANGUAGE FlexibleContexts #-} | |
| {-# LANGUAGE FlexibleInstances #-} | |
| {-# LANGUAGE ScopedTypeVariables #-} | |
| {-# LANGUAGE TypeOperators #-} | |
| module Database.Generic where | |
| import Data.Proxy |
| 'use strict'; | |
| var PurescriptWebpackPlugin = require('purescript-webpack-plugin'); | |
| var src = ['bower_components/purescript-*/src/**/*.purs', 'src/**/*.purs']; | |
| var ffi = ['bower_components/purescript-*/src/**/*.js', 'src/**/*.js']; | |
| var modulesDirectories = [ | |
| 'node_modules', |
| import Data.Lens | |
| import Data.Lens.Index | |
| viewIndex :: forall m a b. (Index m a b) => m -> a -> b | |
| viewIndex m a = view (ix a) m |