A zero-dependency logging proxy that sits between Claude Code and the Anthropic API. It forwards every request untouched, streams the reply straight back (so the CLI is unaffected), and writes a readable Markdown document for each request — led by a ranked table of what is eating your context.
I think many people know about Data.Some.Newtype—it uses quite a cute (and cursed) trick to encode a simple existential wrapper as a newtype, hence avoiding an unwanted indirection in the runtime representation.
But there's more to data than existentials—so how far do these tricks go?
The answer is: surprisingly far!
Let's see what other GADTs we can slim down.
Company:
- HOC: Towards an Optimal Computer: why interaction paradigm can improve computers.
- HOC: Can we build an optimal processor?: like above, but as a tweet.
- HOC: Complete Historical Overview: the lore behind HOC's creation.
Theory:
- Interaction Combinators - Y.Lafont 1997: a concurrent model of computation
- Symmetric Interaction Combinators - Damiano Mazza 2009: a symmetric variant (used by HVM)
- The Optimal Implementation of Functional Programming Languages - best book to learn
- [BOHM](https://www.cambridge.org/core/services/aop-cambridge-core/content/
This file contains hidden or 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 BlockArguments #-} | |
| module InlineFix ( | |
| Rec, | |
| inlineFix, | |
| Church, (|&), _0, _1, _2, _3, _4, _5, _6, _7, _8, _9, | |
| ) where | |
| import GHC.Exts (inline) | |
| import Data.Function (fix) |
This file contains hidden or 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 TemplateHaskellQuotes #-} | |
| {-# LANGUAGE GADTs #-} | |
| module Pat3 where | |
| import qualified Language.Haskell.TH as TH (Code, Q,) | |
| import qualified Language.Haskell.TH.Syntax as TH (Lift(..)) | |
| import Data.Functor.Identity | |
| type Code = TH.Code TH.Q |
This file contains hidden or 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 NoStarIsType, QuantifiedConstraints, BlockArguments, LambdaCase #-} | |
| module Rec ( | |
| LFP, fold, inL , outL, rec, | |
| GFP, unfold, outG, inG , corec, | |
| HFunctor(..), FuncTrans, | |
| LFPF, foldF, inLF , outLF, recF, | |
| GFPF, unfoldF, outGF, inGF , corecF, |
This file contains hidden or 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
| cabal-version: 2.4 | |
| name: Squeeze | |
| version: 0.1.0.0 | |
| author: Ignat Insarov | |
| maintainer: kindaro@gmail.com | |
| library | |
| hs-source-dirs: . | |
| build-depends: base, distributive | |
| default-language: Haskell2010 |
This file contains hidden or 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
| import qualified Data.Set as S | |
| import Data.Set (Set) | |
| import Data.Char (isLower) | |
| import Data.Ord (comparing, Down (Down)) | |
| import Data.List (sortBy, subsequences, minimumBy, maximumBy) | |
| import Control.Monad.Trans.Writer.CPS | |
| import Data.Monoid | |
| import Data.Foldable (traverse_) | |
| wordFilter :: String -> Bool |
This file contains hidden or 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
| // Copyright (c) 2021 Francesco Mazzoli <f@mazzo.li> | |
| // | |
| // Permission to use, copy, modify, and distribute this software for any | |
| // purpose with or without fee is hereby granted, provided that the above | |
| // copyright notice and this permission notice appear in all copies. | |
| // | |
| // THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES | |
| // WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF | |
| // MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR | |
| // ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES |
This file contains hidden or 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
| {-# OPTIONS --cubical --type-in-type #-} | |
| module Mokhov where | |
| open import Cubical.Foundations.Everything | |
| open import Cubical.Data.Sum | |
| open import Cubical.Data.Prod | |
| open import Cubical.Data.Unit | |
| record Mokhov (F : Set → Set) (G : Set → Set) (A : Set) : Set where | |
| constructor mokhov |
NewerOlder