Announcement: HSMin - more AI-friendly Haskell code! []

Code? Reading code is such a 2025 activity, now we just vibe! We should adapt our software such that it’s easier to read for machines. Tokens burn down trees, y’know. So we should minify!

For example, consider this program:

module Main where

main :: IO ()
main = putStr $ unlines $ hexagons 12 17

hexagons :: Int -> Int -> [String]
hexagons xRepeat yRepeat =
  yRepeat `times` [xRepeat `times` "/ \\_"
                  ,xRepeat `times` "\\_/ "]
  where
    n `times` l = concat (replicate n l)

That’s the same as this one-liner:

module Main where{main::IO ();main= putStr$unlines$hexagons 12 17;hexagons::Int->Int->[String];hexagons xRepeat yRepeat= yRepeat`times`[xRepeat`times`"/ \\_",xRepeat`times`"\\_/ "] where{times n l= concat (replicate n l)}}

Much better! I’ve never seen a module in my life that couldn’t be a one-liner. You can now one-line too with HSMin! Happy vibing :)

Recent stuff

Tags