on 19052d8 help sign in
15 lines 471 B history raw
1{-# LANGUAGE TemplateHaskell #-}
2import GitHash
4panic :: String -> a
5panic msg = error panicMsg
6 where panicMsg =
7 concat [ "[panic ", giBranch gi, "@", giHash gi
8 , " (", giCommitDate gi, ")"
9 , " (", show (giCommitCount gi), " commits in HEAD)"
10 , dirty, "] ", msg ]
11 dirty | giDirty gi = " (uncommitted files present)"
12 | otherwise = ""
13 gi = $$tGitInfoCwd
15main = panic "oh no!"