s/^/#a) =>#(a) @\n ~Z = (aZ)\n (a1)_(a2) = (a1_a2)\n/ : s/\(#*\)a\(\w*\)/\1B\2,\U&/g y/ABbcdefghijklmnopqrstuvwxy/bacdefghijklmnopqrstuvwxyz/ h s/_/ `mappend` /g s/#/ Monoid /g s/ /instance (/ s/@/where/ s/.Z/mempty/gp g /z/d t

Note that non-ascii characters in the above source code will be escaped (such as \x9f).