- Cabal
- Starting a new project
- Sandboxes
- Creating
- Deleting
- Adding dependencies
- Installing dependencies
- Adding one or more test suites
This file contains hidden or 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 MesiModel where | |
open import Data.Vec | |
open import Data.Fin | |
open import Data.Nat | |
open import Data.Product | |
data MesiState : Set where | |
Invalid : MesiState |
This file contains hidden or 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
# Inspired by: | |
# http://stackoverflow.com/questions/29033580/how-do-i-use-the-new-haskell-ng-infrastructure-on-nixos | |
# | |
# The goal | |
# | |
# 1. my-project.cabal remains the source of required libraries/packages to build the project. | |
# Adding a new library involves updating my-project.cabal and then running cabal2nix . > 02-my-project.nix | |
# | |
# 2. ability to add non-haskell build / dev dependencies to our `shell.nix` that are not used at runtime. | |
# For example, maybe we want to use postgresql or redis during development. |
This file contains hidden or 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
* { | |
font-size: 12pt; | |
font-family: monospace; | |
font-weight: normal; | |
font-style: normal; | |
text-decoration: none; | |
color: black; | |
cursor: default; | |
} |
This file contains hidden or 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
-- A port of: http://semantic-domain.blogspot.com/2015/03/abstract-binding-trees.html | |
{-# LANGUAGE DeriveFunctor #-} | |
module ABT where | |
import qualified Data.Foldable as Foldable | |
import Data.Foldable (Foldable) | |
import Data.Set (Set) | |
import qualified Data.Set as Set |
This file contains hidden or 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
(ns user) | |
(def app | |
"Intenal Helper" | |
(fnil conj [])) | |
(defprotocol PathSeq | |
(path-seq* [form path] "Helper for path-seq")) | |
(extend-protocol PathSeq |
This file contains hidden or 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
# REMOVE ANYTHING CABAL HAS EVER DROPPED ONTO YOUR SYSTEM | |
rm -rf ~/.{ghc,cabal} | |
# UPDATE CABAL | |
cabal update | |
# UPGRADE CABAL TO 1.18 (BECAUSE THEY ADDED SANDBOXES) | |
cabal install cabal-install | |
export PATH=~/.cabal/bin:$PATH ;# PUT THIS IN YOUR PROFILE |
This file contains hidden or 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
#!/bin/sh | |
# clear old pipe and lock | |
rmdir worklock 2>/dev/null | |
rm work | |
if [[ ! -p work ]]; then | |
mkfifo work | |
else | |
dd if=work of=/dev/null |
This file contains hidden or 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
(defn create-type | |
"Extract a type from provided field idents stored in Datomic database at uri." | |
[uri type-name overrides] | |
(let [c (d/connect uri) | |
d (d/db c) | |
datomic-type-map {:db.type/string 'String | |
:db.type/ref 'Any} | |
mt (dt/q> :- [EntityID] | |
'[:find ?e | |
:in $ ?t-name |
This file contains hidden or 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
2013-09-05 23:24:37.777 Prime[4204:c07] 1 | |
2013-09-05 23:24:37.779 Prime[4204:c07] 0.732028842267092 | |
2013-09-05 23:24:37.780 Prime[4204:c07] 0.2530017011838238 | |
2013-09-05 23:24:37.781 Prime[4204:c07] 0.22892546997679017 | |
2013-09-05 23:24:37.781 Prime[4204:c07] 0.5423003204364027 | |
2013-09-05 23:24:37.782 Prime[4204:c07] 0.6065306597126334 | |
2013-09-05 23:24:37.783 Prime[4204:c07] 0.44399788140114904 | |
2013-09-05 23:24:37.783 Prime[4204:c07] 0.15345314921321815 | |
2013-09-05 23:24:37.784 Prime[4204:c07] 0.13885046809469812 | |
2013-09-05 23:24:37.784 Prime[4204:c07] 0.32892187595578626 |
NewerOlder