Skip to content

Instantly share code, notes, and snippets.

View purefunctor's full-sized avatar
:shipit:

Justin Garcia purefunctor

:shipit:
View GitHub Profile
@purefunctor
purefunctor / Main.purs
Created September 18, 2021 04:06
`cata` and `transCata`
module Main where
import Prelude
import Matryoshka
import Effect (Effect)
import Effect.Console (logShow)
import Data.Functor.Mu (Mu(..))
data ListF a n = NilF | ConsF a n
@purefunctor
purefunctor / ToU.idr
Last active October 15, 2021 11:46
ToU.idr
module Infer
data Foo : (xs : List (String, Type)) -> Type where
MkFoo : Foo xs
mkFoo : {xs : List (String, Type)} -> Foo xs
mkFoo = MkFoo
foo : ? -- Foo ?xs
foo = mkFoo {xs = [("Foo", Int), ("Bar", Nat)]}
@purefunctor
purefunctor / Main.purs
Created November 4, 2021 15:02
Collecting instantiated type class methods into an array.
module Main where
import Prelude
import Data.Array
import Debug
import Type.Prelude
import Type.Row
import Type.RowList
import Unsafe.Coerce
import Partial.Unsafe
@purefunctor
purefunctor / racket-chez.rb
Created September 22, 2022 11:38
Homebrew formula for building Chez Scheme on Apple Silicon
class RacketChez < Formula
desc "Implementation of the Chez Scheme language"
homepage "https://cisco.github.io/ChezScheme/"
url "https://github.com/racket/ChezScheme", :using => :git, :tag => "racket-v8.6"
sha256 "a344c46c9b40d8f4695bdbe82b7802da05ffe7ad2c8ffc16747dd84f02c38964"
license "Apache-2.0"
depends_on "ncurses"
def install