Recent releases have been pre-built using cross-compilers and this script and are downloadable below.
If you have found these packages useful, give me a shout out on twitter: @adammw
Recent releases have been pre-built using cross-compilers and this script and are downloadable below.
If you have found these packages useful, give me a shout out on twitter: @adammw
-- This is based on ideas from the excellent article "Beautiful Aggregations | |
-- with Haskell" by Evan Borden: https://tech.freckle.com/2017/09/22/aggregations/ | |
module Aggregation where | |
import Prelude | |
import Data.Foldable (foldMap) | |
import Data.Monoid.Additive (Additive(..)) | |
import Data.Newtype (un) |
module Main where | |
import Data.Generic.Rep (class Generic, Argument, Constructor, Product) | |
import Effect (Effect) | |
import Effect.Class.Console as Console | |
import Effect.Uncurried (EffectFn1, EffectFn2, EffectFn3, runEffectFn1, runEffectFn2, runEffectFn3) | |
import Prelude (Unit, bind, discard, (>>=)) | |
import Type.Data.Peano.Nat (class IsNat, NProxy, Succ, Z, d0, reflectNat, kind Nat) | |
-- Any product data type with a Generic instance can be made mutable! |
<html lang="en"> | |
<head> | |
</head> | |
<body> | |
<pre> | |
<script type="text/javascript"> |
A database where you PUT/POST documents to trigger replications and you DELETE to cancel ongoing replications. These documents have exactly the same content as the JSON objects we used to POST to /_replicate/ (fields "source", "target", "create_target", "continuous", "doc_ids", "filter", "query_params".
Replication documents can have a user defined "_id". Design documents (and _local documents) added to the replicator database are ignored.
The default name of this database is _replicator. The name can be changed in the .ini configuration, section [replicator], parameter db.
Monads and delimited control are very closely related, so it isn’t too hard to understand them in terms of one another. From a monadic point of view, the big idea is that if you have the computation m >>= f
, then f
is m
’s continuation. It’s the function that is called with m
’s result to continue execution after m
returns.
If you have a long chain of binds, the continuation is just the composition of all of them. So, for example, if you have
m >>= f >>= g >>= h
then the continuation of m
is f >=> g >=> h
. Likewise, the continuation of m >>= f
is g >=> h
.
// a typescript implement of hindley-milner type inference | |
// reference http://smallshire.org.uk/sufficientlysmall/2010/04/11/a-hindley-milner-type-inference-implementation-in-python/ | |
/// <reference path="./lib.es6.d.ts" /> | |
// ... | |
interface AstNode { | |
} | |
class Id implements AstNode { |