Skip to content

Instantly share code, notes, and snippets.

View vilem-ff's full-sized avatar

vilem vilem-ff

  • The Solar System
View GitHub Profile
@nh2
nh2 / Typechecking-git-history-fast.md
Created January 16, 2020 17:40
Haskell: Type-checking a git history of commits fast with interactive rebasing and ghci -e

Type-checking your whole Pull Request before submission

You want to make a pull request to a Haskell project, which requires that each commit in your PR compiles fine individually.

Here is an easy, automated and fast way to check it:

git rebase --interactive HEAD~~~ --exec "! grep 'error:' <(stack ghci mylibrary:lib --ghci-options='-e 1' 2>&1)"
@georgexsh
georgexsh / goto.py
Created September 18, 2017 07:47
python goto with system trace function
import sys
def j(lineno):
frame = sys._getframe().f_back
called_from = frame
def hook(frame, event, arg):
if event == 'line' and frame == called_from:
try:
frame.f_lineno = lineno