fixed syntax highlighting, finally, I hope

This commit is contained in:
Alexander 2025-06-16 22:00:54 -04:00
parent 808ebfdfa2
commit d568f6138a
3 changed files with 3 additions and 5 deletions

View file

@ -43,7 +43,7 @@ module FunctorOfMonad (M : Monad) :
end end
``` ```
Each of these accepts an instance of a less general structure and uses only the elements the module provides to implement an instance of the more general structure. The last one is boring, obviously, being just the composition of the former two. Each of these accepts an instance of a less general structure and uses only the elements the module provides to implement an instance of the more general structure. The last one is boring, obviously, being just the composition of the former two, but those are a _little_ interesting.
It turns out that there are multiple ways to implement the derivation functors--- also multiple ways to implement a particular monad--- and they don't all behave the same. That makes it hard to predict whether the more-general, derived implementations are the "natural" ones that you expected to get without _ad hoc_ testing, which rather defeats the point of "gratis". On the other hand, the derivations here can be performed pretty mechanically, with little insight, by following the types in much the same way one might mechanically prove an easy proposition. It turns out that there are multiple ways to implement the derivation functors--- also multiple ways to implement a particular monad--- and they don't all behave the same. That makes it hard to predict whether the more-general, derived implementations are the "natural" ones that you expected to get without _ad hoc_ testing, which rather defeats the point of "gratis". On the other hand, the derivations here can be performed pretty mechanically, with little insight, by following the types in much the same way one might mechanically prove an easy proposition.

View file

@ -1,6 +1,6 @@
#! /usr/bin/env nix-shell #! /usr/bin/env nix-shell
#! nix-shell -i bash --pure #! nix-shell -i bash --pure
#! nix-shell -p bash harfbuzz soupault woff2 jotdown python3 --pure #! nix-shell -p bash harfbuzz soupault woff2 jotdown python3 recode --pure
if ! [[ -d pgvv/ ]]; then if ! [[ -d pgvv/ ]]; then
python3 -m venv pgvv python3 -m venv pgvv

View file

@ -1,9 +1,7 @@
#! /usr/bin/env bash #! /usr/bin/env bash
if [[ $# -lt 1 ]] || ! pygmentize -L lexers | grep -qw "$1"; then if [[ $# -lt 1 ]] || ! pygmentize -L lexers | grep -qw "$1"; then
printf "<code>" recode ascii..html
cat
printf "</code>"
else else
pygmentize -l $1 -f html | head -c -13 | awk -F '<pre>' '{print $NF}' pygmentize -l $1 -f html | head -c -13 | awk -F '<pre>' '{print $NF}'
fi fi