Instantly share code, notes, and snippets.

View gist:5dc40ff562a6b252f5123b1a69069b6a
set -x
execs=( CAPS caps dmenu_open eng hstags keys trk )
mkdir $HOME/bin || true
for exec in "${execs[@]}"; do
ln -s `pwd`/$exec $HOME/bin/$exec
View gist:9755f7d7238a3757cfee0b37a183a6d8
diff --git a/compiler/simplCore/FloatIn.hs b/compiler/simplCore/FloatIn.hs
index 2593b1d7a1..fca8056b43 100644
--- a/compiler/simplCore/FloatIn.hs
+++ b/compiler/simplCore/FloatIn.hs
@@ -45,6 +45,7 @@ actually float any bindings downwards from the top-level.
floatInwards :: ModGuts -> CoreM ModGuts
floatInwards pgm@(ModGuts { mg_binds = binds })
= do { dflags <- getDynFlags
+ ; pprTraceM "floatInwards" (ppr binds)
; return (pgm { mg_binds = map (fi_top_bind dflags) binds }) }
View gist:47d71c54406faf9a0f54e090c6089483
BuildFlavour = quick
ifneq "$(BuildFlavour)" ""
include mk/flavours/$(BuildFlavour).mk
GhcRtsHcOpts += -O0 -g3
# Enable when debugging GHC executables:
# GhcStage1HcOpts += -DDEBUG
# GhcStage2HcOpts += -DDEBUG
View gist:291cfb4e74997a9a3ed7ac0f459dde0c
Configuring ghc-prim-0.5.3...
configure: WARNING: unrecognized options: --with-compiler
checking for gcc... /usr/bin/gcc
checking whether the C compiler works... yes
checking for C compiler default output file name... a.out
checking for suffix of executables...
checking whether we are cross compiling... no
checking for suffix of object files... o
checking whether we are using the GNU C compiler... yes
checking whether /usr/bin/gcc accepts -g... yes
View gist:f78b8980a7285230c2b7df97783b1142
diff --git a/mk/ b/mk/
index e4a79a1d71..39c6449744 100644
--- a/mk/
+++ b/mk/
@@ -297,6 +297,7 @@ GhcRTSWays=l
# Usually want the debug version
GhcRTSWays += debug
+GhcRTSWays += thr_debug_p debug_p
View bisect_script.bash
set -e
set -x
git submodule update --init
make distclean
View gist:626e0dda076378a55a8ef4b06d28108a
diff --git a/autoload/fugitive.vim b/autoload/fugitive.vim
index 1cc3d44..4a99b06 100644
--- a/autoload/fugitive.vim
+++ b/autoload/fugitive.vim
@@ -1524,7 +1524,7 @@ function! fugitive#BufReadCmd(...) abort
if b:fugitive_display_format
call s:ReplaceCmd([dir, 'cat-file', b:fugitive_type, rev])
- call s:ReplaceCmd([dir, 'show', '--no-color', '--pretty=format:tree%x20%T%nparent%x20%P%nauthor%x20%an%x20<%ae>%x20%ad%ncommitter%x20%cn%x20<%ce>%x20%cd%nencoding%x20%e%n%n%s%n%n%b', rev])
+ call s:ReplaceCmd([dir, 'show', '--no-color', '--pretty=format:commit%x20%H%ntree%x20%T%nparent%x20%P%nauthor%x20%an%x20<%ae>%x20%ad%ncommitter%x20%cn%x20<%ce>%x20%cd%nencoding%x20%e%n%n%s%n%n%b', rev])
View Main.hs
{-# LANGUAGE ForeignFunctionInterface #-}
module Main where
import System.Clock -- clock
import Foreign.C.Types -- base
foreign import ccall unsafe "my_sleep" sleep_unsafe :: CInt -> IO CInt
foreign import ccall safe "my_sleep" sleep_safe :: CInt -> IO CInt
View gist:9b8e31b7a17082359bcef7d1b0488ecc
Unexpected results from:
TEST="LevPolyBounded T11108 T14936 T15349 T4334 T7224 T9201 andy_cherry concprog001 galois_raytrace haddock.Cabal haddock.base haddock.compiler heapprof001 hpc_fork plugin-recomp-change recomp007 space_leak_001"
SUMMARY for test run started at Fri Aug 10 12:20:50 2018 +03
3:36:11 spent to go through
6511 total tests, which gave rise to
29345 test cases, of which
5772 were skipped
View gist:aa28bb5c94a74e96e870ddde846b2e9c
import System.IO.Temp (withSystemTempFile)
import System.Process (runProcess, waitForProcess)
let loadFuzzy _ = do
withSystemTempFile "fzf_out" $ \f h -> do
p <- runProcess "fzf" [] Nothing Nothing Nothing (Just h) Nothing
_ <- waitForProcess p
out <- readFile f
return (":load " ++ init out)