pufuwozu/roy — pull request #110 by taku0 (2012-02-19 15:41:18+00:00)
Title: Allow Native type coerced to any type.

### Probrem
Native objects virtually cannot passed to other functions.

### Motivating example

let redraw canvas = \e ->
let x = e.clientX
let y = e.clientY
let width = canvas.width
let height = canvas.height

canvas.clearRect 0 0 width height
canvas.strokeRect 0 0 width height
canvas.fillRect (x - 10) (y - 10) 20 20

let onLoad e =
let canvas = document.getElementById 'canvas'

canvas.addEventListener 'mousemove' (redraw canvas)

### Expected
The code is compiled without errors.

### Actural
Error: Type error: Native is not {width: 'ch, height: 'ci, clearRect: Function(Number, Number, 'ch, 'ci, 'cj), strokeRect: Function(Number, Number, 'ch, 'ci, 'ck), fillRect: Function(Number, Number, Number, Number, 'cl)}

### Proposition
Allow Native type coerced to any type, i.e. treat Native type as ∀x.x