morganstanley / hobbes

A language and an embedded JIT compiler
http://hobbes.readthedocs.io/
Apache License 2.0
1.16k stars 105 forks source link

add boundary checks to element :: (Array xs x) => (xs,long,long) -> [x] #373

Closed smunix closed 3 years ago

smunix commented 3 years ago

Isn't that just a bug? There's nothing about the type that excludes a safe result, unlike element. Why build ceremony/scaffolding around a bug?

Originally posted by @kthielen in https://github.com/Morgan-Stanley/hobbes/pull/372#r495474601

Also remove elementsM from class Array