Skip to content

Instantly share code, notes, and snippets.

View DanBurton's full-sized avatar

Dan Burton DanBurton

View GitHub Profile
@DanBurton
DanBurton / gist:1302347
Created October 20, 2011 20:52
Tree fold in Racket
(define-type (Tree a) (U (leaf a) (node a)))
(struct: (a) leaf ([val : a]))
(struct: (a) node ([left : (Tree a)] [right : (Tree a)]))
(: tree-height (All (a) ((Tree a) -> Integer)))
(define (tree-height t)
(cond [(leaf? t) 1]
[else (max (+ 1 (tree-height (node-left t)))
(+ 1 (tree-height (node-right t))))]))

Keybase proof

I hereby claim:

  • I am danburton on github.
  • I am danburton (https://keybase.io/danburton) on keybase.
  • I have a public key ASB6oUatP8vG6qqfHwAyVlCixPOub2U3XEXzoUpi9Yvewwo

To claim this, I am signing this object:

@DanBurton
DanBurton / stackage-disabled-2016-12-29.yaml
Created December 30, 2016 01:39
A sorted list of all packages currently commented out in stackage's build-constraints.yaml (as of 2016-12-29)
- Cartesian # bounds: lens
- HaRe # via: cabal-helper, ghc-mod, rosezipper
- MASMGen # bounds: ghc, base
- Michelangelo # bounds: lens # via: Wavefront
- Spock-digestive # via: digestive-functors
- TaxonomyTools # build failure
- aeson-schema # bounds: QuickCheck, aeson # compilation failure for 0.4.1.1
- agda-snippets # bounds: ghc, base
- agda-snippets-hakyll # bounds: ghc, base
- agentx # bounds: ghc, base
@DanBurton
DanBurton / core_test.clj
Created April 13, 2017 19:49
Passing tests wrt form-params
;; (defproject clj-http-bug "0.1.0-SNAPSHOT"
;; :description "FIXME: write description"
;; :url "http://example.com/FIXME"
;; :license {:name "Eclipse Public License"
;; :url "http://www.eclipse.org/legal/epl-v10.html"}
;; :dependencies [[org.clojure/clojure "1.8.0"]
;; [clj-http "2.3.0"]
;; [http-kit "2.2.0"]
;; [ring/ring-jetty-adapter "1.5.1"]])
@DanBurton
DanBurton / core_test.clj
Created April 13, 2017 20:20
Failing test for clj-http: can't send :form-params with method :delete
;; (defproject clj-http-bug "0.1.0-SNAPSHOT"
;; :description "FIXME: write description"
;; :url "http://example.com/FIXME"
;; :license {:name "Eclipse Public License"
;; :url "http://www.eclipse.org/legal/epl-v10.html"}
;; :dependencies [[org.clojure/clojure "1.8.0"]
;; [clj-http "2.3.0"]
;; [http-kit "2.2.0"]
;; [ring/ring-jetty-adapter "1.5.1"]])
@DanBurton
DanBurton / Main.hs
Created January 22, 2018 23:02
Generating stack's setup-info
#!/usr/bin/env stack
{- stack
script
--resolver lts-10.2
--package bytestring
--package http-conduit
-}
-- usage: ./Main.hs
-- modify the baseUrl and ghcDateVersion to taste
@DanBurton
DanBurton / stack.yaml
Created January 22, 2018 22:34
A simple stack.yaml for ghc-8.4.1-alpha2
setup-info:
ghc:
linux32-nopie:
8.4.0.20180118:
url: https://downloads.haskell.org/~ghc/8.4.1-alpha2/ghc-8.4.0.20180118-i386-deb8-linux.tar.xz
sha256: be1a3b5de9f671199533d22f2810d9b62c6392b32b39833cd384a094566703c6
windows32:
8.4.0.20180118:
url: https://downloads.haskell.org/~ghc/8.4.1-alpha2/ghc-8.4.0.20180118-i386-unknown-mingw32.tar.xz
sha256: 3f4b9291ad35d89ca7b3561312a4329545aedceb5c4c8c5c4cf01550037376a1
@DanBurton
DanBurton / stack.yaml
Created February 7, 2018 22:24
A simple stack.yaml for ghc-8.4.1-alpha3
setup-info:
ghc:
macosx:
8.4.0.20180204:
url: https://downloads.haskell.org/~ghc/8.4.1-alpha3/ghc-8.4.0.20180204-x86_64-apple-darwin.tar.xz
sha256: 80d08f67a3c420a3048c52e8ec541cbe3bdc6372fa2d564bdd91ae7b470da854
linux64:
8.4.0.20180204:
url: https://downloads.haskell.org/~ghc/8.4.1-alpha3/ghc-8.4.0.20180204-x86_64-unknown-linux.tar.xz
sha256: 4526441619f96fe7f7452613fbdae9221d76d479ac2bd90192a1f4b91c68068b
@DanBurton
DanBurton / Main.hs
Created February 7, 2018 22:21
Generating stack's setup-info for ghc-8.4-alpha3
#!/usr/bin/env stack
{- stack
script
--resolver lts-10.2
--package bytestring
--package http-conduit
-}
-- usage: ./Main.hs
-- modify the baseUrl and ghcDateVersion to taste
@DanBurton
DanBurton / stack.yaml
Created February 26, 2018 00:28
stack.yaml with "setup-info" for ghc-8.2-rc1 (ghc-8.4.0.20180224)
setup-info:
ghc:
windows64:
8.4.0.20180224:
url: https://downloads.haskell.org/~ghc/8.4.1-rc1/ghc-8.4.0.20180224-x86_64-unknown-mingw32.tar.xz
sha256: 7d125b3bbaa2ec4022215787a259a41bf944ec02736c9555f2a19432eef21cad
linux64:
8.4.0.20180224:
url: https://downloads.haskell.org/~ghc/8.4.1-rc1/ghc-8.4.0.20180224-x86_64-unknown-linux.tar.xz
sha256: 34240b8055e81f78a58becd1351ce03235e1bb3fd14c419a7e97631514a780ad