in which the haskell community totally does my homework for me
joeyh at
type-level prevention of port conflicts, here propellor comes!
Olivier Mehani likes this.
I'm looking forward to that day when successfully compiling a Propellor config will be sufficent to guarantee the server will work, and one will never actually have to deploy it at all.
Oh, wait...
Oh, wait...
I'm just astounded that a) this can be done, type level unique list checking and all and b) someone did it in response to a 5 minute question and c) at the beautiful beautiful type error message
Couldn't match type 'False with 'True
Expected type: 'True
Actual type: ServiceTypes.UniquePorts '[443, 80, 443]
Aka
Hey dude, you can't run a tor bridge and a web server on the same host
(given their default configurations)
We're truely living in the future of programming... well, some of us are, some of the time. Rest of us are patching bash. :)
Raúl Benencia likes this.
I think I'll be able to improve the type error message some too, along the lines of "Couldn't match type PortConflicts with SanePorts"