Haskell

Haskell Code Screenshot Generator

Turn Haskell snippets into images worth sharing, without leaving your Mac.

Haskell is dense enough that a five-line snippet can carry a whole idea, which is exactly the shape that works as an image.

Codeshot detects Haskell from the code you paste, so there is no language picker to get wrong. Here is the same snippet in three of the 30 themes it ships with, rendered with the app's own stylesheets.

module Snapshot (export) where

import qualified Data.Text as T

data Options = Options
  { theme :: T.Text
  , scale :: Int
  }

export :: T.Text -> Options -> IO FilePath
export code opts = render code (theme opts) >>= save (scale opts)
GitHub · dark
module Snapshot (export) where

import qualified Data.Text as T

data Options = Options
  { theme :: T.Text
  , scale :: Int
  }

export :: T.Text -> Options -> IO FilePath
export code opts = render code (theme opts) >>= save (scale opts)
Solarized · dark
module Snapshot (export) where

import qualified Data.Text as T

data Options = Options
  { theme :: T.Text
  , scale :: Int
  }

export :: T.Text -> Options -> IO FilePath
export code opts = render code (theme opts) >>= save (scale opts)
Tokyo Night · dark

Choosing a theme for Haskell

Type signatures are usually the most interesting line. Keep them in frame even when trimming, since the signature often explains more than the body.

Getting the size right

Let the image follow your content, or lock it to a ratio — 1:1, 4:3, 3:2, 16:9, 9:16, 2:3, or 3:4 — then export at 1×, 2×, or 3× so it stays sharp on a retina display. Copy it straight to the clipboard with C, or save with S.

See all 30 themes side by side, or read the full workflow.

Built for Haskell, and 59 other languages

Everything runs on your Mac. Your code never leaves it.

Download for macOS