I hereby claim:
- I am ThoNohT on github.
- I am thonoht (https://keybase.io/thonoht) on keybase.
- I have a public key whose fingerprint is 7AAA 4C85 DBE2 D032 2480 5E5D 3D81 E30A 57CD 4CD6
To claim this, I am signing this object:
I hereby claim:
To claim this, I am signing this object:
{ | |
"Major": 1, | |
"Minor": 3, | |
"Patch": 0 | |
} |
using System; | |
using System.Text; | |
namespace Tree | |
{ | |
class Program | |
{ | |
static void Main(string[] args) | |
{ | |
var h = 32; |
Assuming you use XMonad.Util.EZConfig
to configure your key mappings, this code allows you to print those mappings in a nice format and let them be visualized in multiple ways.
Starting from the latest darcs template xmonad.hs, but the key map configuration already replaced with XMonad.Util.EZConfig, I need the following imports extra imports:
import Data.Foldable
import qualified Data.List as L
This is the code containing the types used for formatting the input, and the actual formatting code.
boolToString :: Bool -> String | |
boolToString True = "TRUE" | |
boolToString False = "FALSE" | |
assertString :: Eq a => a -> a -> Bool | |
assertString a b = a == b | |
infixr 8 |.| | |
(|.|) :: (b -> c) -> (a -> a' -> b) -> a -> a' -> c |
In Arch Linux, all haskell packages are dynamically linked. This can be a headache for the user, since it results in a large amount of haskell-*
packages being installed on your system, and the possibility for version conflicts. A way around this is to not depend on pacman
at all for haskell packages, but manually install them.
In this document I explain how I switched from a lot of haskell packages installed with pacman
, to a few manually installed packages.
To determine which packages to uninstall (and replace), a few tools are useful:
pacman
itselfpacgraph
open BenchmarkDotNet.Attributes | |
open BenchmarkDotNet.Running | |
/// This function is recursive, but not tail recursive. | |
let rec countHigh (nr: int64) = if nr = 0L then 0L else countHigh (nr - 1L) + 1L | |
// This function is tail recursive. | |
let rec countHighTailRec (nr: int64) acc = if nr = 0L then acc else countHighTailRec (nr - 1L) (acc + 1L) | |
// This function is recursive in async, but not tail recursive. |
{-# LANGUAGE FlexibleInstances #-} | |
{-# LANGUAGE MultiParamTypeClasses #-} | |
{-# LANGUAGE DeriveFunctor #-} | |
{-# LANGUAGE RankNTypes #-} | |
{-# LANGUAGE TypeApplications #-} | |
{-# LANGUAGE AllowAmbiguousTypes #-} | |
import qualified Data.List as L | |
class Uncons l a where |