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
;; Prefix variable name with mrenaud/ in case haskell-mode adds | |
;; a 'haskell-prettify-alist in a future release. | |
(defvar mrenaud/haskell-prettify-alist | |
'(("\\" . ?λ) | |
("->>" . (?\s (Br . Bl) ?\s (Br . Bl) ?\s | |
(Bl . Bl) ?- (Bc . Br) ?- (Bc . Bc) ?> | |
(Bc . Bl) ?- (Br . Br) ?>)) | |
(">>=" . (?\s (Br . Bl) ?\s (Br . Bl) ?\s |
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
-- File: src/Lib.hs | |
module Lib (greeting) where | |
greeting :: String | |
greeting = "Hello, world!" |
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 Main where | |
import Data.Foldable (fold) | |
import Data.Maybe (fromMaybe, listToMaybe) | |
fizzBuzz :: Functor f => f Int -> f String | |
fizzBuzz = | |
fmap (fromMaybe <$> show <*> fold rules) | |
where | |
rules = [fizz, buzz] |
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
data Entry = Entry | |
{ entryState :: EntryState | |
, entryPayload :: Maybe Payload | |
} | |
data EntryState = NO_ENTRY | IN_PROGRESS | HAS_ENTRY | |
data Cache = ... | |
lookup :: Cache -> Key -> Entry |
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
# control-left control-right nav | |
set-window-option -g xterm-keys on | |
setw -g mode-keys emacs | |
bind-key q confirm-before kill-session | |
bind-key Q confirm-before kill-server | |
# remap prefix from 'C-b' to 'C-o' | |
unbind C-b | |
set-option -g prefix C-o |
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
these derivations will be built: | |
/nix/store/lxk22wmjmwf2xadrw7pm37k80m9lcnql-project1-1.0.0.drv | |
building path(s) ‘/nix/store/81gy6a8m1iin193507qyr580i2mj6n77-project1-1.0.0’ | |
setupCompilerEnvironmentPhase | |
Build with /nix/store/qijwxnz9s8gas6pc6n5qfv976w523xyb-ghc-8.0.2. | |
unpacking sources | |
unpacking source archive /nix/store/cp5d14hvbpkhhv6r0yw6a1520nyr326v-project1 | |
source root is project1 | |
patching sources | |
compileBuildDriverPhase |
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
(require 'helm-config) | |
(require 'helm-ls-git) | |
(require 'helm-swoop) | |
(helm-mode) | |
;; Interactive buffer rebindings. | |
(define-key helm-map (kbd "<tab>") 'helm-execute-persistent-action) | |
(define-key helm-map (kbd "C-i") 'helm-execute-persistent-action) | |
(define-key helm-map (kbd "C-z") 'helm-select-action) |
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
customDecoder decoder toResult = | |
Json.andThen | |
(\a -> | |
case toResult a of | |
Ok b -> Json.succeed b | |
Err err -> Json.fail err | |
) | |
decoder |
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/bash | |
# Save the current branch. | |
previous_branch=`git rev-parse --abbrev-ref HEAD` | |
# Switch to generated code branch and pull in any changes from the working branch. | |
git checkout generated-code | |
git merge --no-edit $previous_branch | |
# <Build generated files> |
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
{- | Based on http://www.osl.iu.edu/publications/prints/2005/garcia05:_extended_comparing05.pdf -} | |
{-# LANGUAGE FlexibleContexts #-} | |
{-# LANGUAGE MultiParamTypeClasses #-} | |
{-# LANGUAGE TypeFamilies #-} | |
import Data.Array | |
---------------------------------------- | |
-- Typeclass definitions. |
NewerOlder