External Publication
Visit Post

Homomorphic static analysis

Haskell Community [Unofficial] May 31, 2026
Source

Hi!

Nice question! And I need to admit that I don’t have a clear answer.

Just two thoughts:

  1. We wouldn’t have this issue if Strong was defined in terms of *** instead of first' and second' (and similarly for Choice defined in terms of +++).
  2. One potential solution to the issue is to have an intermediate step to a data structure like
data StrongData a b =
  Fun :: (a -> b) -> Fun a b
  Compose :: Fun b c -> Fun a b -> Fun c d
  DiMap :: ...
  First :: Fun a b -> Fun (a, c) (b, c)
  Second :: Fun a b -> Fun (c, a) (c, b)

and every time you have a Compose (First ...) (Second ...) you optimize it to a parallel computation

Discussion in the ATmosphere

Loading comments...