summaryrefslogtreecommitdiff
path: root/src/Propellor/Types/Info.hs
diff options
context:
space:
mode:
authorJoey Hess2019-11-11 15:44:12 -0400
committerJoey Hess2019-11-11 15:44:12 -0400
commit3632a07142dca7422c3343e98de33f2abec629aa (patch)
treecd07a6d58c9d0edaad1a1cd8196c3183cf5d1ba3 /src/Propellor/Types/Info.hs
parent596bfcd2e26d6120e190519fca1946b613e002ec (diff)
Changed the ChrootBootstrapper type class's buildchroot method to take a Info parameter, instead of Maybe System.
The System can be extracted from the Info; this also allows the chroot's Info to be introspected for eg, the apt mirror. (API change)
Diffstat (limited to 'src/Propellor/Types/Info.hs')
-rw-r--r--src/Propellor/Types/Info.hs1
1 files changed, 1 insertions, 0 deletions
diff --git a/src/Propellor/Types/Info.hs b/src/Propellor/Types/Info.hs
index b941cc8f..27633712 100644
--- a/src/Propellor/Types/Info.hs
+++ b/src/Propellor/Types/Info.hs
@@ -63,6 +63,7 @@ addInfo (Info l) v = Info (l++[InfoEntry v])
toInfo :: IsInfo v => v -> Info
toInfo = addInfo mempty
+-- | Extracts a value from an Info.
fromInfo :: IsInfo v => Info -> v
fromInfo (Info l) = mconcat (mapMaybe extractInfoEntry l)