Abstract Hidden Markov Models: a monadic account of quantitative information flow (Logical Methods in Computer Science, 2019)