Skip to content

Instantly share code, notes, and snippets.

View darcykimball's full-sized avatar
😶

darcykimball

😶
View GitHub Profile
@gelisam
gelisam / ValueBasedDebugging.hs
Last active December 25, 2025 17:24
A proof of concept for a value-based debugging technique
-- A proof of concept for a value-based debugging technique: instead of
-- debugging by imperatively stepping through the evaluation, we instead
-- produce a value representing the evaluation tree.
--
-- This value can then be manipulated like any other value, e.g. instead adding
-- a breakpoint and stepping until the breakpoint is hit, you can write an
-- ordinary function which recurs into the evaluation tree until it finds a node
-- of interest. This way, more complex conditions can be easily expressed, e.g.
-- "find the smallest subtree in which a call of 'double' does not result in an
-- output which is the double of its input".
@clinuxrulz
clinuxrulz / Main.purs
Last active August 31, 2023 19:38
Lambda Calculus to CCC in Purescript
module Main where
import Prelude (Unit, ($), (+), (<>), (<$>), (<*>), (==), (>), discard)
import Effect (Effect)
import Effect.Console (log)
import Control.Category
import Control.Semigroupoid
import Data.Leibniz
import Data.Maybe
import Data.Exists
{-# language KindSignatures #-}
{-# language PolyKinds #-}
{-# language DataKinds #-}
{-# language TypeFamilies #-}
{-# language RankNTypes #-}
{-# language NoImplicitPrelude #-}
{-# language FlexibleContexts #-}
{-# language MultiParamTypeClasses #-}
{-# language GADTs #-}
{-# language ConstraintKinds #-}
@timo
timo / ADT.pm6
Last active December 22, 2019 08:56
working on algebraic data types in perl6
module ADT;
#package EXPORT::DEFAULT { };
grammar hs_adt {
has @.typevars;
rule TOP {
$<name>=<.ident> <params> '=' <definers>
}
rule params {