The JSON data is in the following format
{
"Genesis": {
"1": {
"1": "In the beginning..." ,
"2": "..."
{-# LANGUAGE ExistentialQuantification, RankNTypes #-} | |
{-# LANGUAGE InstanceSigs #-} | |
module CoYoneda where | |
import Data.IORef | |
import Data.Set (Set, map) | |
import Control.Monad (liftM) | |
-------------------------------------------------------------------------------- | |
-- Yoneda |
{-# LANGUAGE GADTs, TypeInType, DataKinds, TypeFamilies #-} | |
{-# LANGUAGE TypeOperators #-} | |
{-# LANGUAGE TypeApplications #-} | |
import GHC.TypeLits | |
import GHC.Types | |
import Data.Singletons | |
import Data.Singletons.Prelude | |
data Format = Lit Symbol | Str | Shown Type |
{-# LANGUAGE GeneralizedNewtypeDeriving #-} | |
import Control.Monad.IO.Class | |
import Control.Monad.Trans.Class | |
import Prelude hiding (log) | |
-------------------------------------------------------------------------------- | |
-- The API for cloud files. | |
class Monad m => MonadCloud m where | |
saveFile :: Path -> Bytes -> m () |
#!/usr/bin/ruby | |
# | |
########################################################################### | |
# | |
# = PowerMate Interface Library for Linux | |
# | |
# == Description | |
# | |
# Interface Library to the Griffin PowerMate for Linux. | |
# The library includs a (minimalist) generic classes for the Linux Input Event |
$
) operator$pull
from an array nested more than two levels deep (http://stackoverflow.com/questions/5228210/how-to-remove-an-element-from-a-doubly-nested-array-in-a-mongodb-document)$project
in pipelines (without specifying all existing fields)$push
and $pop
to same field in same update$addToSet
, it only performs an equality comparison. You can kind of get by with $push
and $pop
, but then you have to perform two queries (http://stackoverflow.com/questions/25315326/mongodb-conditionally-addtoset-sub-document-in-array-by-specific-field){-#LANGUAGE NoMonomorphismRestriction #-} | |
module Main (main) where | |
import Control.Monad (void) | |
import Control.Monad.Identity | |
import Criterion.Main | |
import qualified Data.Conduit as C | |
import qualified Data.Conduit.Combinators as CC | |
import qualified Data.Conduit.List as C | |
import qualified Data.Machine as M |
{-#LANGUAGE BangPatterns #-} | |
module Main (main) where | |
import Data.Conduit as C | |
import qualified Data.Conduit.Combinators as C | |
import Pipes as P | |
import qualified Pipes.Prelude as P | |
import qualified Streaming.Prelude as Str |
;; 1. place this in ~/.emacs.d/private/intero/packages.el | |
;; 2. add intero, syntax-checking and auto-completion to your | |
;; ~/.spacemacs layer configuration & remove the haskell layer | |
;; if you were using that before | |
;; 3. make sure you have stack installed http://haskellstack.org | |
;; 4. fire up emacs & open up a stack project's source files |
{-# LANGUAGE ScopedTypeVariables #-} | |
{-# LANGUAGE DataKinds #-} | |
{-# LANGUAGE KindSignatures #-} | |
{-# LANGUAGE TypeOperators #-} | |
{-# LANGUAGE FlexibleContexts #-} | |
{-# LANGUAGE FlexibleInstances #-} | |
{-# LANGUAGE TypeSynonymInstances #-} | |
{-# LANGUAGE UndecidableInstances #-} | |
{-# LANGUAGE TypeFamilies #-} | |
{-# LANGUAGE PolyKinds #-} |