GHCi:
ghci> main
4093
it :: ()
(4.05 secs, 3,864,385,304 bytes)
Hell:
[ids] | |
* | |
[main] | |
leftmeta = layer(mymeta) | |
[mymeta:C] | |
1 = M-1 | |
2 = M-2 |
eval :: env -> Term env t -> t | |
eval erm trm = eval erm trm id where | |
eval :: env -> Term env t -> (t -> r) -> r | |
eval env (Var v) k = k (lookp v env) | |
eval env (Lam e) k = k (\x -> eval (env, x) e id) | |
eval env (App e1 e2) k = | |
eval env e1 $ \f -> | |
eval env e2 $ \x -> | |
k (f x) | |
eval _env (Lit a) k = k a |
GHCi:
ghci> main
4093
it :: ()
(4.05 secs, 3,864,385,304 bytes)
Hell:
type A = Variant (ConsL "Age" Int (ConsL "Name" Text NilL)) | |
demo :: A | |
demo = LeftV 1 | |
demo' :: A | |
demo' = RightV (LeftV "x") | |
match :: String | |
match = runAccessor demo $ ConsA show $ ConsA Text.unpack NilA |
root@fsn1-cd-1:~# cat /root/brossa-cd/scripts/reflect-cron.hell | |
#!/usr/bin/env hell | |
-- assumes: jq, docker | |
main = do | |
input <- Text.readProcessStdout_ $ Process.proc "docker" ["ps","--format","json"] | |
let lines = Text.lines input | |
Monad.forM_ lines \json -> do | |
labels' <- Main.jq json [".Labels","-r"] |
;; Initial version copied from Pawel Szulc | |
(define-derived-mode tla-mode fundamental-mode "tla" | |
"Major Mode For Editing TLA language code." | |
(setq font-lock-defaults '(tla-highlights)) | |
(font-lock-add-keywords nil '(("\\\\\\*.+" . font-lock-comment-face))) | |
(font-lock-add-keywords nil '(("====.+" . font-lock-doc-face))) | |
(font-lock-add-keywords nil '(("----.+" . font-lock-doc-face))) | |
(font-lock-add-keywords nil '(("(\\*.+" . font-lock-doc-face))) | |
(setq-local comment-start "\\* ") |
⚠️ Testing Emacs tags generation specifically. I've updated one whichfast-tags
was lacking-e
.
I thought I'd upgrade my hasktags to fast-tags, but discovered that it's not much faster.
The much bigger saving is to pipe fd
into it rather than letting either fast-tags/hasktags do its own
recursive directory searching. They appear to be egregiously slow in comparison to fd
.
I added ghc-tags, and that's the slowest for recursive cold run. It's the fastest on a warm run with fd
.
Confirmation that they're all producing outputs of roughly similar size.
#!/usr/bin/env hell | |
-- Check all the prefixes and permitted delimiters against | |
-- <https://www.conventionalcommits.org/en/v1.0.0/> | |
main = do | |
title <- Environment.getEnv "PR_TITLE" | |
if List.or $ | |
List.map (\prefix -> |
ghci> runReader (runParserT (do a <- local (+1) ask; b <- ask; pure (a,b)) "" "") 0 | |
Right (1,0) |