External Publication
Visit Post

Layoutz 0.3.2 🪶 Zero-dep Elm-style TUI’s for Haskell - now w/ terminal plots & more

Haskell Community [Unofficial] March 5, 2026
Source
  • With LLM’s, boilerplate code that formats & ā€œpretty-printsā€ is cheaper than ever …
  • Thus, more than ever , ā€œstring formatting codeā€ is spawning, and polluting domain logic
  • Ultimately, layoutz is just a tiny, declarative DSL to combat this

How does the architecture compare to brick?

To me the entry points look quite similar.

Brick:

data App s e n =
    App { appDraw :: s -> [Widget n]
        , appChooseCursor :: s -> [CursorLocation n] -> Maybe (CursorLocation n)
        , appHandleEvent :: BrickEvent n e -> EventM n s ()
        , appStartEvent :: EventM n s ()
        , appAttrMap :: s -> AttrMap
        }

Layoutz:

data LayoutzApp state msg = LayoutzApp
  { appInit          :: (state, Cmd msg)                 -- ^ Initial state and startup commands
  , appUpdate        :: msg -> state -> (state, Cmd msg) -- ^ Update state with message, return new state and commands
  , appSubscriptions :: state -> Sub msg                 -- ^ Declare event subscriptions based on current state
  , appView          :: state -> L                       -- ^ Render state to UI
  }

Discussion in the ATmosphere

Loading comments...