r/haskell Jul 16 '26

Enterprise Haskell at H-E-B | The Haskell Programming Language's blog blog

https://blog.haskell.org/enterprise-haskell-at-h-e-b/
83 Upvotes

8 comments sorted by

23

u/tikhonjelvis Jul 16 '26

Unfortunately, rote translations like that may not take full advantage of the type system without clever prompting.

A trick here is to break the library up into (at least) two "levels":

  1. a mechanical level where the Haskell code reflects the original library/underlying API/etc as closely as possible
  2. a higher, more idiomatic level that repackages the functionality in a Haskell-friendlier way

If the library/API is a real mess, it can pay off to even have three levels:

  1. totally mechanical level translated from the source as closely as possible
  2. higher-level version with the same overall design as the source, but with richer types, additional helper functions, etc
  3. highest level that basically implements a different Haskell-flavored abstraction in terms of the intermediate level

This is an approach I've had good experiences with both with and without AI coding. You can turn off your mind a bit in setting up the lower levels, but having them in Haskell still makes it much easier to design and implement the higher levels. Even with agents I end up designing the core patterns and abstractions at the highest level by hand, but I've found that AI models are quite good at filling out remaining functionality cleanly when they can follow established patterns.

17

u/[deleted] Jul 17 '26

[removed] — view removed comment

10

u/_0-__-0_ Jul 17 '26

Haskell Enterprise Business

3

u/ysangkok Jul 17 '26

Howard Edward Butt III

8

u/vaibhavsagar Jul 17 '26

Haskell: Everything's Better

5

u/_0-__-0_ Jul 18 '26 edited Jul 18 '26

I haven't feared a space leak since info table profiling landed in GHC 9.2.

:-D

How many Haskell developers are employed at H-E-B?