I use kind synonyms
type T = Type
type TT = T -> T
type TTT = T -> TT
type C = Constraint
type TC = T -> C
(defun collect-regexp-results (regex) | |
;;; collects all the matches of regex in a buffer called *collect-result* | |
;;; then switches to that buffer | |
;;; TODO refactor this to take the region as a parameter | |
(interactive "Mregex to search for: ") | |
(let ((curmin (region-or-buffer-beginning)) | |
(curmax (region-or-buffer-end))) | |
(save-excursion | |
(goto-char curmin) | |
;; (goto-char (region-or-buffer-beginning)) |
(defun wc/narrow-window () | |
(let (( new-right | |
(max 0 (+ (or (cdr (window-margins)) 0) | |
(- (window-body-width) fill-column))))) | |
(set-window-margins nil (car (window-margins)) new-right) | |
(set-window-fringes nil (car (window-fringes)) 2))) | |
(define-minor-mode wrap-column-mode | |
"Wrap the text at `fill-column'. | |
Works by adjusting the right margin." |
{- | |
Place contents of this file in $HOME/.ghci then run | |
$ cabal install -j2 hoogle | |
$ hoogle data | |
-} | |
let ghciEscapeShellArg arg = "'" ++ concatMap (\c -> if c == '\'' then "'\"'\"'" else [c]) arg ++ "'" | |
:def! h return . (":! hoogle --color --count=20 " ++) . ghciEscapeShellArg |
demographicsAnalysis :: (MonadIO m, H.MonadR m) => Frame User -> m () | |
demographicsAnalysis fr = do | |
let demographics = fmap (rcast :: User -> Record '[HaskellExperience | |
,RecommendHaskell | |
,Occupation]) | |
(nubbed, counts) = view (runGetter ((,) <$> Getter (_1) <*> Getter _2)) | |
(unzip | |
(sortByLens (_1.recommendHaskell) | |
(sortByLens (_1.haskellExperience) |
resolver: ghc-8.0.0.20160111 | |
setup-info: | |
ghc: | |
linux64: | |
8.0.0.20160111: | |
url: "http://downloads.haskell.org/~ghc/8.0.1-rc1/ghc-8.0.0.20160111-x86_64-deb7-linux.tar.xz" | |
content-length: 111404852 | |
sha1: 30d39c6ca6994dcafe25595e053035ad23198b52 | |
macosx: | |
8.0.0.20160111: |
module SignupForm exposing (..) | |
-- This is where our Elm logic lives.`module SignupForm` declares that this is | |
-- the SignupForm module, which is how other modules will reference this one | |
-- if they want to import it and reuse its code. | |
-- Elm’s "import" keyword works similarly to "require" in node.js. | |
import Html exposing (..) | |
<!DOCTYPE> | |
<html> | |
<head> | |
<title>cytoscape-dagre.js demo</title> | |
<meta name="viewport" content="width=device-width, user-scalable=no, initial-scale=1, maximum-scale=1"> | |
<script src="http://code.jquery.com/jquery-2.0.3.min.js"></script> |
<!DOCTYPE html> | |
<html> | |
<head> | |
<title>Chart.js Redraw Example</title> | |
<script src="http://ajax.googleapis.com/ajax/libs/jquery/1.10.0/jquery.min.js"></script> | |
<script type="text/javascript" charset="utf-8" src="chart.min.js"></script> | |
<script type="text/javascript" charset="utf-8"> | |
window.chartOptions = { | |
segmentShowStroke: false, |
;; Get package installation ready | |
(require 'package) | |
(setq package-enable-at-startup nil) | |
(add-to-list 'package-archives | |
'("melpa" . "https://melpa.org/packages/")) | |
(package-initialize) | |
;; Theme | |
(add-to-list 'custom-theme-load-path "~/.emacs.d/themes/") | |
(load-theme 'zenburn t) |