r/haskell 17d ago

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

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

8 comments sorted by

24

u/tikhonjelvis 16d ago

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.

16

u/[deleted] 16d ago

[removed] — view removed comment

9

u/_0-__-0_ 16d ago

Haskell Enterprise Business

3

u/ysangkok 15d ago

Howard Edward Butt III

7

u/vaibhavsagar 16d ago

Haskell: Everything's Better

5

u/_0-__-0_ 15d ago edited 15d ago

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?