sseefried/shady-graphics — comment on commit fc12faff3d1acb31fcef1a4d9316ab0d6ed34e50
File:  line 0
By conal:

> [...] you had already defined a `Monoid` instance for `Color` in module `Shady.Color` with definition [...]. This means it is true that `toColor mempty == clear` and also that ``toColor (a `mappend` b) == toColor a `mappend` toColor b``.

I see how this conclusion follows in the case of `Color`, since there `toColor = id`, but then the TCM is trivial.

> Incidentally, why did you call it `preClear`?

Because it's a "pre-image" of `clear` under `toColor`, i.e., `toColor preClear == clear`.

> Can you expand on your remark "I don't think of `toColor` that way, because we can distinguish between values that `toColor` identifies". I'm not sure I fully understand.

I always want semantic functions to be TCMs, and I see failure of this principle to be abstraction leaks every time. Which raises the question of what is a "semantic function". I was trying to give one requirement that `toColor` violates--namely injectivity--but I failed, since `toColor` *is* injective for `Bool`.