This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
erl -boot start_sasl | |
Erlang R14B02 (erts-5.8.3) [source] [64-bit] [smp:8:8] [rq:8] [async-threads:0] [kernel-poll:false] | |
=PROGRESS REPORT==== 3-Feb-2012::06:18:01 === | |
supervisor: {local,sasl_safe_sup} | |
started: [{pid,<0.35.0>}, | |
{name,alarm_handler}, | |
{mfargs,{alarm_handler,start_link,[]}}, | |
{restart_type,permanent}, |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
dhclient eth0 | |
route add default gw 192.168.1.1 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
=CRASH REPORT==== 28-Dec-2011::08:05:03 === | |
crasher: | |
initial call: ejabberd_http:init/2 | |
pid: <0.360.0> | |
registered_name: [] | |
exception exit: {aborted, | |
{no_exists, | |
[reg_users_counter, | |
[{{reg_users_counter,"localhost",'$1'}, | |
[], |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
$ make | |
(CDPATH="${ZSH_VERSION+.}:" && cd . && /bin/bash /home/exmpp/ac-aux/missing --run autoheader) | |
rm -f stamp-h1 | |
touch config.h.in | |
cd . && /bin/bash ./config.status config.h | |
config.status: creating config.h | |
config.status: config.h is unchanged | |
make all-recursive | |
make[1]: Entering directory `/home/exmpp' |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{-# LANGUAGE OverloadedStrings #-} | |
module Test where | |
import Data.Aeson | |
import Data.ByteString.Lazy.Char8 as B | |
data Auto = Auto {firm :: String, year :: Int, price :: Int, sellers :: [String]} | |
deriving (Show) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
instance ToJSON Auto where | |
toJSON (Auto firm year price sellers) = object [ "firm" .= firm, | |
"year" .= year, | |
"price" .= price, | |
"sellers" .= sellers | |
] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
data Auto = Auto {firm :: String, year :: Int, price :: Int, sellers :: [String]} | |
deriving (Show) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ | |
"firm":"Firm1", | |
"year":2000, | |
"price":8000, | |
"sellers":[ | |
"Firm1", | |
"Firm2, | |
"Firm3" | |
] | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
class MonadTrans t where | |
lift :: Monad m => m a -> t m a -- lifts a value from the inner monad m to the transformed monad t m | |
-- could be called lift0 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{-# OPTIONS -fglasgow-exts #-} | |
{-# LANGUAGE AllowUndecidableInstances #-} | |
import Control.Monad | |
instance (Functor m, Monad m) => Liftable m where | |
zipL = liftM2 (\x y -> (x,y)) | |
zeroL = return () |