Builtin Arrays
Current Status
On master branch, the array implementation is bit-rotted, but it's behind a compiler flag -builtin-arrays so it doesn't affect the compilation when disabled. It implemented unboxed arrays, with a few operators on it. The design was trying to explore the dependent type system, allowing us to check for array bounds, etc. It didn't allow take or put operations.
Progress
The dargent branch (apart from the Dargent development) also includes a work-in-progress of built-in arrays. A limited form of take and put operations have been implemented. The programmer can only take one element from the array. This design greatly simplifies index checks. Arrays can now be either boxed or unboxed. If the array is boxed, then allocation and free should be done via the C FFI by the programmer. A map2 primitive function is implemented, which allows simultaneously mapping over two arrays.
The array features are still behind the same flag. We also allow a restricted form of Dargent layout on array types. The surface typechecker is at the moment unsound, due to index checking problems.
Related Issues
#315 #331