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
module Main where | |
import Control.Monad | |
import Data.List (find) | |
import Data.Maybe | |
import Data.Text.Encoding | |
import Data.ByteString (ByteString) | |
import Data.Maybe | |
import Network.URI (parseURI, URI) | |
import Network.HTTP |
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
ghci -ddump-splices test2.hs 12:17:44 | |
GHCi, version 7.6.3: http://www.haskell.org/ghc/ :? for help | |
Loading package ghc-prim ... linking ... done. | |
Loading package integer-gmp ... linking ... done. | |
Loading package base ... linking ... done. | |
[1 of 2] Compiling THTest ( THTest.hs, interpreted ) | |
[2 of 2] Compiling Test ( test2.hs, interpreted ) | |
Loading package array-0.4.0.1 ... linking ... done. | |
Loading package deepseq-1.3.0.1 ... linking ... done. | |
Loading package containers-0.5.0.0 ... linking ... done. |
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
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; | |
;; environment | |
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; | |
(load "auctex.el" nil t t) | |
(load "preview-latex.el" nil t t) | |
(add-to-list 'load-path "~/.emacs.d/plugins") | |
(require 'sticky-windows) | |
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; |
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
{ cabal, Cabal, doctest, filepath, hackageDb, HTTP, mtl, regexPosix | |
}: | |
cabal.mkDerivation (self: { | |
pname = "cabal2nix"; | |
version = "1.58"; | |
src = "./."; | |
isLibrary = false; | |
isExecutable = true; | |
buildDepends = [ Cabal filepath hackageDb HTTP mtl regexPosix ]; |
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
Profunctor lenses | |
================= | |
First, we enable the RankNTypes extension which gives us 'forall' and also import some modules: | |
> {-# LANGUAGE RankNTypes #-} | |
> module ProfunctorLenses where | |
> import Data.Profunctor | |
> import Data.Tagged | |
> import Data.Bifunctor |
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
import Distribution.Simple | |
main = defaultMain |
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
{stdenv, bash, jre, spark} : | |
stdenv.mkDerivation rec { | |
name = "mesos-spark-${version}"; | |
version = "1"; | |
unpackPhase = "true"; | |
installPhase = '' | |
set -x |
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
import Control.Exception | |
import Control.Monad | |
import Control.DeepSeq | |
main = forM_ (permute "laeioslaeioslaeios") putStrLn | |
leet :: Char -> String | |
leet 'e' = "e3" | |
leet 'a' = "a4" | |
leet 'A' = "A4" |
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
$ cabal clean | |
$ cabal repl -v2 | |
Package has never been configured. Configuring with default flags. If this | |
fails, please run configure manually. | |
/nix/store/dbrx6x3238hr8j07ys5n5jcy8012q9n3-ghc-7.8.3-wrapper/bin/ghc --numeric-version | |
looking for tool ghc-pkg near compiler in | |
/nix/store/dbrx6x3238hr8j07ys5n5jcy8012q9n3-ghc-7.8.3-wrapper/bin | |
found ghc-pkg in | |
/nix/store/dbrx6x3238hr8j07ys5n5jcy8012q9n3-ghc-7.8.3-wrapper/bin/ghc-pkg | |
/nix/store/dbrx6x3238hr8j07ys5n5jcy8012q9n3-ghc-7.8.3-wrapper/bin/ghc-pkg --version |
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
module Foo where | |
foo :: IO () | |
foo = putStrLn "bar" |
OlderNewer