You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Most of all of those files are what we might call 'BuildInfo', following Cabal, plus a few component-specific fields. When that code was written, Dhall didn't have a way to combine record types. But now the //\\ operator is a thing, and we can factor out all 28 or so shared fields (plus another 10 when #42 lands) into a new file types/BuildInfo.dhall, and then define them with reference to that plus their idiosyncratic fields.
This has an additional benefit because then you can define libraryBuildInfo : Library -> BuildInfo, executableBuildInfo, etc, and then write mapBuildInfo : (BuildInfo ->Config -> BuildInfo) -> Package -> Package to, e.g., conveniently add warnings to all components.
It'd be nice if --print-type would output the build components in terms of BuildInfo too.
The text was updated successfully, but these errors were encountered:
Most of all of those files are what we might call 'BuildInfo', following Cabal, plus a few component-specific fields. When that code was written, Dhall didn't have a way to combine record types. But now the
//\\
operator is a thing, and we can factor out all 28 or so shared fields (plus another 10 when #42 lands) into a new filetypes/BuildInfo.dhall
, and then define them with reference to that plus their idiosyncratic fields.This has an additional benefit because then you can define
libraryBuildInfo : Library -> BuildInfo
,executableBuildInfo
, etc, and then writemapBuildInfo : (BuildInfo ->Config -> BuildInfo) -> Package -> Package
to, e.g., conveniently add warnings to all components.It'd be nice if
--print-type
would output the build components in terms ofBuildInfo
too.The text was updated successfully, but these errors were encountered: