summaryrefslogtreecommitdiff
AgeCommit message (Collapse)Author
2016-03-24don't unify the two types of properties inside a RevertablePropertyJoey Hess
While it was ok to have RevertableProperty HasInfo even when the undo property did not have any info, and it would be ok to have RevertableProperty Debian even when the undo property targeted a wider set of OS's, type-level resource conflict detection needs to keep the two straight, as in RevertableProperty (Port 80 + Debian) Debian Without that, reverting a web server property and also including another property that uses port 80 would fail to compile, since the type system would not know if reverting RevertableProperty (Port 80 + Debian) continued using the resource or not. The downside is the need to write RevertableProperty Debian Debian ... Perhaps I'll add a type alias to avoid that or something.
2016-03-241st stage integrating MetaTypesJoey Hess
2016-03-24renameJoey Hess
2016-03-24temporarily remove UsedPortJoey Hess
This can come back later as a full Resource data type. For now, I want to focus on merging what I have working.
2016-03-24fix exportJoey Hess
2016-03-20flip to modern versionJoey Hess
2016-03-20rename for consistency with singletons libraryJoey Hess
2016-03-20really bad implementation of type level OS detectionJoey Hess
2016-03-20Merge branch 'master' into typed-os-requirementsJoey Hess
2016-03-20use + rather than :+: type operatorJoey Hess
This seems to not overlap with the + function and is nicer to read and write
2016-03-20rename moduleJoey Hess
2016-03-20make more clear that propellor targets debian stable's ghcJoey Hess
2016-03-20renameJoey Hess
2016-03-20fix tick warningJoey Hess
2016-03-20cleanupJoey Hess
2016-03-20finished conversion to singletonsJoey Hess
2016-03-20fix tightenTargetsJoey Hess
2016-03-20Merge branch 'master' of ssh://propellor.branchable.comJoey Hess
2016-03-20Merge branch 'joeyconfig'Joey Hess
2016-03-20tagJoey Hess
2016-03-20Added a commentarnaud@30aba4d9f1742050874551d3ddc55ca8694809f8
2016-03-19Added a commentarnaud@30aba4d9f1742050874551d3ddc55ca8694809f8
2016-03-19wipJoey Hess
2016-03-19commentJoey Hess
2016-03-19Merge branch 'master' of ssh://propellor.branchable.comJoey Hess
2016-03-19commentJoey Hess
2016-03-19wipJoey Hess
2016-03-19Added a comment: Spinning hosts in parallelarnaud@30aba4d9f1742050874551d3ddc55ca8694809f8
2016-03-19From GH PR #13evan@0e4cded17eab71af967a38b123fbc211cf215421
2016-03-19typoJoey Hess
2016-03-19haddockJoey Hess
2016-03-19Merge branch 'joeyconfig'Joey Hess
2016-03-19fix type errorJoey Hess
2016-03-18propellor spinJoey Hess
2016-03-18Tor.named: Fix bug that sometimes caused the property to fail the first ↵Joey Hess
time, though retrying succeeded. May have only been a problem on debian stable, the /var/lib/tor/keys/ was not created by installing the package.
2016-03-18propellor spinJoey Hess
2016-03-18propellor spinJoey Hess
2016-03-18propellor spinJoey Hess
2016-03-18propellor spinJoey Hess
2016-03-18propellor spinJoey Hess
2016-03-18propellor spinJoey Hess
2016-03-18wipJoey Hess
2016-03-18wipJoey Hess
Converted to singletons. Type level functions not updated yet.
2016-03-17correctJoey Hess
2016-03-17wipJoey Hess
2016-03-17Merge branch 'master' of ssh://propellor.branchable.comJoey Hess
2016-03-17commentJoey Hess
2016-03-17commentsJoey Hess
2016-03-17add OuterTargetJoey Hess
Separate data type to guarantee that ensureProperty is passed the actual outer target, and not some other Targeting value from eg, unixLike.
2016-03-17let's not try to get outertarget from monadJoey Hess
To get outertarget from the Propellor monad, the monad would have to be parameteriszed with an outertarget type, since there's no single type. For example: newtype Propellor target p = Propellor { runWithHost :: RWST target () () IO p } deriving (Monad, Applicative, Functor) But then mkProperty becomes a problem, since the Propellor action passed to it needs to already be of UnixLike type: mkProperty :: Propellor UnixLike () -> Property UnixLike mkProperty a = Property unixLike a Could maybe live with that, but then `target` type check fails: Expected type: Propellor (Targeting combinedtarget) () Actual type: Propellor (Targeting oldtarget) () Problem being that it's reusing the `a` which is a Propellor target () target newtarget (Property oldtarget a) = Property (intersectTarget oldtarget newtarget) a And, the new Property has a different target, so it can't use the old `a`. So, I'd need a way to cast one Propellor target () to a different target. Maybe: target newtarget (Property oldtarget (Propellor a)) = let combinedtarget = intersectTarget oldtarget newtarget in Property combinedtarget (Propellor (unsafeCoerce a)) But is that safe?? Even if it is, I can't see how to make ensureProperty get the outertarget type. It returns Propellor (Targeting outertarget) (), which can read the target from the RWST monad, but how to use that where the type of the function is defined? Rather than all that complication, it doesn't seem too bad to require outertarget be passed to ensureProperty.