Find it here: https://github.com/bitemyapp/learnhaskell
(ns parser) | |
(defn read-char [rdr] | |
(let [ch (.read rdr)] | |
(if-not (== -1 ch) (char ch)))) | |
(def expr-tags | |
{:if #(str "if tag args: " (clojure.string/join ", " %1))}) | |
(defn expr-tag [{:keys [tag-name args] :as tag} rdr] |
# Install a local copy of Hoogle (OS X 10.10, GHC 7.10.1) | |
# Download | |
cd | |
cabal unpack hoogle | |
cd hoogle-4.2.40/ | |
# Use a sandbox | |
cabal sandbox init |
import functools | |
import types | |
def gentramp(gen): | |
def unroll(g): | |
while isinstance(g, types.GeneratorType): | |
g = g.next() | |
return g |
total | |
threeAintEven : Even 3 -> _|_ | |
threeAintEven (evenS e) with (e) | |
| (evenS _) impossible | |
| (evenZ) impossible | |
threeAintEven evenZ impossible |
Various blog posts related to Nix and NixOS
- https://nixos.org/wiki/Main_Page Nix wiki. Awesome resource containing huge amount of manuals and documentation with examples.
- http://aflatter.de/nixos/ Alexander Flatter - NixOS. Installing NixOS inside a VirtualBox with a real-world
configuration.nix
example. - http://lethalman.blogspot.it/search/label/nixpills Luca Bruno - Nix Pills. Series of posts describing how to install nix into some environment and how to use it.
- http://looprecur.com/blog/from-ubuntu-to-nixos/ Tim Sears - From Ubuntu to NixOS. Talk about experience migrating from Ubuntu to NixOS.
{-# LANGUAGE DeriveDataTypeable #-} | |
{-# LANGUAGE FlexibleInstances #-} | |
{-# LANGUAGE GADTs #-} | |
{-# LANGUAGE MultiParamTypeClasses #-} | |
{-# LANGUAGE OverloadedStrings #-} | |
{-# LANGUAGE RecordWildCards #-} | |
{-# LANGUAGE StandaloneDeriving #-} | |
{-# LANGUAGE TypeFamilies #-} | |
{-# LANGUAGE GeneralizedNewtypeDeriving #-} | |
module Data.Haxl.Postgres.DataStoreExample |
The imports for building the various field-oriented optics are pretty minimal. It's not
until you make a Getter or a Fold that you need to look outside of base
.
This cookbook only covers the field oriented optics and not the constructor oriented ones.
If you want to build a Prism or an Iso without a lens dependency, you should
copy the definition of lens' prism
and iso
combinators and add a profunctors dependency
to your project. Those two combinators are quite self-contained.
This is a guide on how to email securely.
There are many guides on how to install and use PGP to encrypt email. This is not one of them. This is a guide on secure communication using email with PGP encryption. If you are not familiar with PGP, please read another guide first. If you are comfortable using PGP to encrypt and decrypt emails, this guide will raise your security to the next level.
class (Ord (Key table)) => OrderedKV table where | |
type Key table :: * | |
type Value table ::* | |
type Address table :: * | |
keyRange :: table -> (Key table, Key table) | |
key2Address :: table -> (Key table) -> Maybe (Address table) | |
address2Key :: table -> (Address table) -> Key Table | |
nextAddress :: table -> Address table -> Maybe (Address table) | |
nextKey :: table -> Key table -> Maybe (Address table) ->Maybe (Key table, Address table ) |