purebred-mua / purebred

A terminal based mail user agent based on notmuch
GNU Affero General Public License v3.0
139 stars 19 forks source link

avoid unnecessary recompilation due to CPP #454

Closed frasertweedale closed 2 years ago

frasertweedale commented 2 years ago

CPP is currently used in several large modules to choose between lazy or strict list representations. This leads to unecessary recompilation when cabal_macros.h changes (e.g. due to dependency changes). See blog post for further explanation:

http://blog.haskell-exists.com/yuras/posts/stop-abusing-cpp-in-haskell.html

Abstract the list type behind a new module Purebred.Types.Items, which uses CPP. Refactor other modules that use CPP to choose a list representation to use Items and avoid CPP in those modules.