I have module that I'm trying to write, which is always failing to build when ever I add a second (or more) cmdProperty to it.
I've tried a variety of ways to write the module but clearly my limited Haskell skills are causing me to reach the barrier of ignorance which I'm failing to penetrate.
The module is Pebble.hs and can be found here:
I'm hoping to shape that up into an upstream contribution, at some point
I've tried quite a few variations of:
sdk :: Property UnixLike|DebianLike -- (with and without HasInfo)
sdk = propertyList|combineProperties ("Pebble SDK") $ props
I've compared it over and over again to examples in JoeySites and my own working modules ie:
As I uncomment an additional cmdProperty, the build of Pebble.hs fails.
At a loss, cluebat blows greatly appreciated.
Most recent build output is here https://git.mcwhirter.io/snippets/5 with Line 95 being the point of interest, I think.
The compiler error message here is not nice; if use ghc 8.0 custom compile errors is able to be implemented some time, I'd hope for a error message more like:
Instead of the current mess which has a lot of bloat from type families. The meat of the error is here:
cmdProperty has type UncheckedProperty UnixLike; in order to get a Property that runs a command, you have to provide some way of checking if the command made a change to the system.
Since running tar certianly changes the system, adding
assume MadeChange
after it should do.Running pip install may not alwways change the system; it's up to you if you want to do a real check for change there or again
assume MadeChange
.I think those two changes are all you'll need to get it to compile.
The original suggestions did fix my problems.
Apologies for the late response.