diff options
author | Daniel Gröber <dxld@darkboxed.org> | 2019-08-16 03:58:28 +0200 |
---|---|---|
committer | Daniel Gröber (dxld) <dxld@darkboxed.org> | 2019-09-17 17:48:26 +0200 |
commit | d19e59312f3a6648bd53d489c60ec11b73289f40 (patch) | |
tree | 5146177c3eafac13db252ea975012db244243d55 /tests/bkpregex/regex-indef/Regex.hs | |
parent | f73498e8c861871294e9472a261b66884df8ca7e (diff) |
Make caching more fine grained
Previously we only had a cache for the project info and each unit
info. However adding support for passing overridden compiler paths to build
tools introduces a nasty data dependency: to fully configure 'Program's
we (used to) need ProjInfo which needs an already configured 'Programs' in
readProjInfo (ugh).
After at least four failed attempts at untangling this I arrived at this
solution. Simply splitting up the caches into some smaller parts does the
trick and as a side product forced me to add an abstraction for the caching
logic so as to not reapeat myself even more.
Relatedly runQuery is not just a field accessor anymore but actualy does
some IO of itself to manage the cache and make already configured
'Program's available to the rest of the library.
Diffstat (limited to 'tests/bkpregex/regex-indef/Regex.hs')
0 files changed, 0 insertions, 0 deletions