A script that automatically separates a Haskell file diff into two diffs: one with only changes to comments, and one with changes to actual code.
Could be extended to other languages, as long as you can describe what the
-------------------------------------------------------------------------------- | |
{-# LANGUAGE ConstraintKinds #-} | |
{-# LANGUAGE DataKinds #-} | |
{-# LANGUAGE DeriveGeneric #-} | |
{-# LANGUAGE FlexibleContexts #-} | |
{-# LANGUAGE FlexibleInstances #-} | |
{-# LANGUAGE GADTs #-} | |
{-# LANGUAGE GeneralizedNewtypeDeriving #-} | |
{-# LANGUAGE KindSignatures #-} |
module KindOfGenerativeModuleFunctors where | |
------------------------------------------------------------------------------ | |
open import Data.Product using (_×_; _,_) | |
open import Data.Nat using (ℕ) | |
open import Data.Bool using (Bool; false; true) | |
open import Relation.Binary.PropositionalEquality using (_≡_; _≢_; refl) | |
------------------------------------------------------------------------------ |
# Add this file to your /etc/nixos/configuration.nix `imports = [ ... ];` attribute. | |
# | |
# After running `nixos-rebuild switch`, `systemctl --user start keybase-gui.service` | |
# can be used to start the Keybase GUI. | |
# | |
# Not sure if it's just my tiling window manager, but there is a bit of wonkiness | |
# with the tray icon. Other than that it works perfectly (as of 2017/11/22). | |
{ pkgs, ... }: |
- extensions: | |
- default: true | |
# These are basically non-negotiable | |
- {name: AllowAmbiguousTypes, within: []} # should never be necessary | |
- {name: Arrows, within: []} # weird syntax | |
- {name: DatatypeContexts, within: []} # useless | |
- {name: EmptyCase, within: []} # nearly useless | |
- {name: ImpredicativeTypes, within: []} # very buggy | |
- {name: IncoherentInstances, within: []} # footgun |
% in the preamble: | |
\usepackage{ocgx} | |
% in the document: | |
\switchocg{ocgPlus ocgMinus ocg1}{% | |
\begin{ocg}{plus}{ocgPlus}{1} | |
{\bfseries +} | |
\end{ocg} |
{ pkgs }: | |
{ | |
services.windowManager.xmonad = { | |
enable = true; | |
haskellPackages = pkgs.haskellPackages.override { | |
overrides = self: super: { | |
# /path/to/mrkgnaow-xmonad is a path that contains `mrkgnaow-xmonad.cabal` | |
# you can also put an invocation of `fetchgit` or `fetchFromGitHub` there. | |
mrkgnaow-xmonad = self.callCabal2nix "mrkgnaow-xmonad" /path/to/mrkgnaow-xmonad {}; |
{-# LANGUAGE ExistentialQuantification #-} | |
{-# LANGUAGE OverloadedStrings #-} | |
{-# LANGUAGE PackageImports #-} | |
{-# LANGUAGE RankNTypes #-} | |
{-# LANGUAGE TemplateHaskell #-} | |
{-# LANGUAGE TypeApplications #-} | |
module Main where | |
import Numeric (showHex) |