Subtyping lets a value of one type stand where a more general type is expected. In a Free program, covariance makes Free[Console, A] usable as Free[[x] =>> Console[x] | Files[x], A]. section 13.5.1
Combining file and console effects
A file-reading operation returns Free[Files, List[String]], while printing returns Free[Console, Unit]. Without subtyping, composing them produces a type mismatch. A union type can express the combined effect: def cat(file: String): Free[[x] =>> Files[x] | Console[x], Unit].



