// val local : (‘r1 -> ‘r2) -> Reader -> Reader

when it really should be

// val local : (‘r1 -> ‘r2) -> Reader -> Reader

the function signature for the function composition (>>) is ‘a -> ‘b -> ‘b -> ‘c

which should force the type of the new reader created in local to be ‘r1 -> ‘a since function composition would expand out to ‘r1 -> ‘r2 -> ‘r2 -> ‘a

]]>