Move channel impl into purescript from js using foreign for existential