- remove
makeDeltaAst
, otherwise there will be noSrcSpan
anywhere in the AST (but when ready to make a change, using it to capture spacing of the local thing being edited may help) EpAnnNotUsed
is gone, usenoAnn
insteaduniqueSrcSpanT
is no longer needed, use an appropriateEpaDelta
location insteadEpaDelta (DifferentLine row col)
interpretscol
differently. You must add 1 to get the prior spacing.- If you add something to a list (possible via
hsDecls
/replaceDecls
), the following item only needs to havesetEntryDP
called on it, to get the spacing right
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
;;---------------------------------------------------------------------- | |
;; Picking up TODO items from org-roam notes | |
;; Via https://magnus.therning.org/2021-03-14-keeping-todo-items-in-org-roam.html | |
(defun roam-extra:todo-p () | |
"Return non-nil if current buffer has any TODO entry. | |
TODO entries marked as done are ignored, meaning the this | |
function returns nil if current buffer contains only completed | |
tasks." |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/sh | |
# Show last 20 changes to the hackage repo | |
tar tvf ~/.cabal/packages/hackage.haskell.org/01-index.tar | tail -n 20 |
I hereby claim:
- I am alanz on github.
- I am alanz (https://keybase.io/alanz) on keybase.
- I have a public key ASAcBzN91Tcu_ThkEm8J9-7mBpb-2v43c_vP35ibuk9MfAo
To claim this, I am signing this object:
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/sh | |
# Based on #ghc conversations, the following results in a working build on | |
# Debian testing with binutils-2.27.9+b1 | |
# First, make sure that the following patches have been applied | |
# | |
# arc patch --nobranch D2672 | |
# arc patch --nobranch D2673 | |
# arc patch --nobranch D2674 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
-- trying our emacs gist-buffer | |
main = putStrLn "hello" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
-- |strip trailing whitespace, and turn tabs into spaces | |
-- Note: using Text as its append performance beats String | |
cleanupWhiteSpace :: FilePath -> IO T.Text | |
cleanupWhiteSpace file = do | |
contents <- T.readFile file | |
let fixed = map cleanupOneLine (T.lines contents) | |
return (T.unlines fixed) | |
tabWidth :: Int | |
tabWidth = 8 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{-# LANGUAGE OverloadedStrings #-} | |
import Control.Applicative ((<$>), (<*>), empty) | |
import Data.Aeson | |
import Data.Aeson.Types | |
import qualified Data.ByteString.Lazy.Char8 as BL | |
data Coord = Coord { x :: Double, y :: Double, c :: Maybe String } | |
deriving (Show) |