This technique helps validate arbitrary conditions in deeply nested structures without writing additional code — with the help of Haskell Generics.
It boils down to this pattern:
{-# LANGUAGE RecordWildCards, FlexibleContexts #-} | |
-- The Computer Language Benchmarks Game | |
-- https://salsa.debian.org/benchmarksgame-team/benchmarksgame/ | |
-- | |
-- Contributed by cahu ette | |
module Main where |
This recipe allows you to use the ssh-agent from homebrew with the auto generated SSH_AUTH_SOCK in /private/tmp. It works because disabling com.openssh.ssh-agent doesn't stop launchd from allocating SSH_AUTH_SOCK. com.homebrew.ssh-agent spawns a shell to remove the socket and then execute the homebrew ssh-agent.
launchctl disable gui/$UID/com.openssh.ssh-agent
launchctl bootstrap gui/$UID com.homebrew.ssh-agent.plist