Skip to content

Latest commit

 

History

History
833 lines (618 loc) · 95.5 KB

File metadata and controls

833 lines (618 loc) · 95.5 KB

Changelog

0.7.3 (2026-05-10)

Bug Fixes

  • stdlib: Correct bugs in regex parsing (#2368) (636a6e5)
  • stdlib: correct the behavior of float pow opperations (#2366) (126a4c4)

0.7.2 (2026-02-08)

Features

  • compiler: Use Binaryen's bulk memory polyfill (#2334) (1c5478e)
  • stdlib: Standardize path module examples (#2325) (c6e3cb0)

0.7.1 (2025-07-01)

Features

  • graindoc: Pretty markdown tables (#2292) (1992734)
  • stdlib: Add Buffer.getChar (#2262) (95d03cb)
  • stdlib: Deprecate Buffer.set operations in favour of Bytes.set (#2303) (684df98)
  • stdlib: Expose equality operators through Number module (#2296) (5965dff)

0.7.0 (2025-04-26)

⚠ BREAKING CHANGES

  • cli: Require node >=22.13 (#2256)
  • compiler: Disallow whitespace for negative literals + allow infix operators on new line (#2136)
  • compiler: Custom Grain object files (#2104)
  • stdlib: Seeded hashing (#2170)
  • stdlib: Add an Ascii submodule to Char and move isAscii, toUppercase, toLowercase (#2178)

Features

  • Add getAll, setAll, removeAll to List.Associative (#2224) (9c49a23)
  • compiler: Custom Grain object files (#2104) (4b56c53)
  • compiler: Disallow whitespace for negative literals + allow infix operators on new line (#2136) (3186155)
  • runtime: Optimize == for lists (#2247) (1cba005)
  • runtime: Prevent stack overflow while collecting large lists (#2248) (097ae7d)
  • runtime: Simplify copy and fill polyfills in Memory module (#2148) (1b3a9f0)
  • stdlib: List.Associative Submodule (#2202) (fbb08bf)
  • stdlib: Add ** to Float64 and Float32 (#2163) (7542d92)
  • stdlib: Add Array.tryInit (#2209) (218ff78)
  • stdlib: Add Bytes.setChar and Bytes.getChar (#2215) (4919ba3)
  • stdlib: Add Char.encodedLength (#2238) (c549fac)
  • stdlib: Add copySign, sqrt, min, max, round, trunc, floor, ceil to Float32 (#2161) (f5a3dd3)
  • stdlib: Add copySign, sqrt, min, max, round, trunc, floor, ceil to Float64 (#2162) (e99dcba)
  • stdlib: Add Exception.toString (#2143) (0894dc5)
  • stdlib: Add isFinite, isClose, sin, cos, tan to Float32 (#2168) (bdb4641)
  • stdlib: Add isFinite, isClose, sin, cos, tan to Float64 (#2166) (fa728d2)
  • stdlib: Add List.filterMap, List.filterMapi, List.findMap (#2201) (551f5ad)
  • stdlib: add Path.removeExtension (#2226) (7b7acfd)
  • stdlib: Add Path.updateExtension (#2282) (6d795d0)
  • stdlib: Add String.repeat to String module (#2140) (6c33d08)
  • stdlib: Add toList, fromList, toArray, fromArray to Stack (#2198) (b815bcd)
  • stdlib: Add an Ascii submodule to Char and move isAscii, toUppercase, toLowercase (#2178) (328cf01)
  • stdlib: Add user-friendly file system module (#1966) (c4f638e)
  • stdlib: Implement reinterpret between float and int values (#2257) (e3a4eac)
  • stdlib: Json value access utils (#2150) (72cc978)
  • stdlib: Optimize List.init to support large lists (#2249) (3de64ba)
  • stdlib: Reimplement Number.gamma and Number.factorial (#2182) (1e5f921)
  • stdlib: Reimplement Number.sin, Number.cos, Number.tan (#2158) (f97c011)
  • stdlib: Seeded hashing (#2170) (ce872ab)

Bug Fixes

  • compiler: Handle non-exhaustive record patterns (#2274) (0431e74)
  • runtime: Correct Bi.toFloat64 rounding (#2160) (6755782)
  • stdlib: Correct sign bit in _rempio when computing trig reduction (#2181) (6a78502)
  • stdlib: Optimize number modulo (#2144) (960fadd)
  • stdlib: Properly print Range values (#2184) (11b1fc2)

Miscellaneous Chores

0.6.6 (2024-08-12)

Miscellaneous Chores

  • stdlib: Synchronize Grain versions

0.6.5 (2024-07-31)

Features

  • stdlib: Add abs, neg, isNaN, isInfinite to Float32 (#2116) (fb1d481)
  • stdlib: Add abs, neg, isNaN, isInfinite to Float64 (#2117) (9469346)
  • stdlib: Add forEachChar, forEachCharI, map and mapi to String module (#1864) (4305e82)

Bug Fixes

  • stdlib: Ensure references are retained in unsafe stdlib functions (#2118) (639856f)

0.6.4 (2024-06-27)

Features

0.6.3 (2024-04-06)

Miscellaneous Chores

  • stdlib: Synchronize Grain versions

0.6.2 (2024-04-01)

Miscellaneous Chores

  • stdlib: Synchronize Grain versions

0.6.1 (2024-03-29)

Bug Fixes

  • stdlib: Avoid WASI random_get in Hash stdlib during module startup (#2078) (7eadfb0)
  • stdlib: Implement print using a single element io vec (#2066) (9eeb0f2)

0.6.0 (2024-03-04)

⚠ BREAKING CHANGES

  • stdlib: Replace parseInt error strings with structured error enum (#1755)
  • stdlib: Move stdlib sys modules to wasi (#2056)
  • compiler: Remove arbitrary per-file compiler flags, add acceptable options as module attributes (#1804)
  • compiler: Require extension when including relative file paths (#1842)
  • compiler: Update include syntax (#2043)
  • stdlib: Remove sin, cos, tan, gamma, factorial from Number module (#2046)
  • compiler: Update use syntax (#2041)
  • grainfmt: Implement new formatter (#1976)
  • stdlib: Use default arguments in more of stdlib (#1772)
  • stdlib: Add print suffix default argument (#1768)
  • graindoc: Improve docgen for labeled & default arguments (#1776)
  • stdlib: Replace Float64 arithmatic/comparison functions with operators (#1957)
  • stdlib: Replace Float32 arithmatic/comparison functions with operators (#1954)
  • stdlib: Replace Int64 arithmatic functions with operators (#1935)
  • stdlib: Replace Int32 arithmatic functions with operators (#1936)
  • stdlib: Switch to using records for getInternalStats (#1898)
  • cli: Allow specifying WASI environment variables and CLI args (#1840)
  • stdlib: Reorder parameters to List.insert (#1857)
  • stdlib: Handle printing of reference cycles (#1844)
  • compiler: Change -> to => in type signatures (#1855)
  • compiler: Make types nonrecursive by default (#1826)
  • compiler: Remove static runtime pointers (#1806)
  • compiler: Changed comma to and in mutually rec types
  • compiler: Changed comma to and in recursive types and bindings (#1827)
  • Remove js-runner (#1585)
  • stdlib: Replace Result/Option and/or functions with operators (#1821)
  • compiler: Reduce size of runtime heap (#1807)
  • Require node version >=18.15 for WASI support (#1612)
  • stdlib: Ensure Array.fillRange works with negative indexing & throws IndexOutOfBound (#1761)
  • stdlib: Remove extra space when converting Bytes to String (#1800)
  • stdlib: Convert unsafe Wasm functions to operators (#1734)
  • stdlib: Use Array length as default end in Array.slice function (#1762)
  • stdlib: Use String length as default end in String.slice function (#1748)
  • Rework preopened directories (#1656)
  • stdlib: Group mutable/immutable data structures (#1652)
  • compiler: Optimize type metadata loading (#1741)
  • compiler: Labeled and default arguments (#1623)
  • stdlib: Replace bigint/number arithmetic functions with operators (#1742)
  • stdlib: Update Operator uint operator Names (#1738)
  • stdlib: Provide empty byte array from Bytes.make (#1729)
  • stdlib: Add optimization for Number.pow(Rational, Int) (#1716)
  • compiler: Custom box printing (#1713)
  • stdlib: Update Buffer/Bytes to use new integer types (#1704)
  • compiler: Require floats always have a digit on left & right of dot (#1703)
  • compiler: Remove 32-bit numbers from Number type (#1683)
  • compiler: Short integer values (#1669)
  • compiler: Supply primitive types via the compiler (#1667)
  • stdlib: Add ** (pow) operator to Pervasives module (#1690)
  • compiler: Remove Exclusive/Inclusive Ranges, provide as record via compiler (#1616)
  • stdlib: Make queue and stack mutable & provide Immutable submodules (#1479)
  • compiler: Disallow multiple provides of the same value (#1689)
  • graindoc: Only use original doc blocks when re-providing (#1687)
  • graindoc: Support docblocks on submodules (#1684)
  • graindoc: Remove section attribute (#1681)
  • compiler: Explicit abstract types (#1680)
  • compiler: Add Uint32 and Uint64 types (#1531)
  • stdlib: Remove cons and empty from Pervasives (#1657)
  • stdlib: Sys/File reading and writing operate on Bytes (#1655)
  • compiler: Make List a language-supplied type (#1648)
  • stdlib: Use correct casing for BigInt module name
  • graindoc: Replace module attribute with docblock on module header (#1647)
  • compiler: Module system (#1584)
  • compiler: Change Char internal representation (#1622)
  • compiler: Inline record constructors (#1586)
  • stdlib: Replace Number.nan & Number.infinity constants with keywords (#1618)
  • compiler: Remove support of single-argument tuples (#1608)
  • stdlib: List.rotate wraparound for count > length (#1558)
  • compiler: Include Option and Result as language-supplied types (#1591)
  • stdlib: Change array rotation direction (#1552)
  • stdlib: Support zipping arrays of different sizes (#1402)
  • compiler: Refactor enum constructors (#1211)

Features

  • Add Hex Exponent Decimals (8a69eb3)
  • cli: Allow specifying WASI environment variables and CLI args (#1840) (fb8fbf2)
  • compiler: Add hex float syntax (#1743) (8a69eb3)
  • compiler: Add Uint32 and Uint64 types (#1531) (42ffdc4)
  • compiler: Change -> to => in type signatures (#1855) (b3d68a4)
  • compiler: Change Char internal representation (#1622) (58c9a51)
  • compiler: Changed comma to and in mutually rec types (923625d)
  • compiler: Changed comma to and in recursive types and bindings (#1827) (923625d)
  • compiler: Custom box printing (#1713) (3c86e45)
  • compiler: Explicit abstract types (#1680) (58cd224)
  • compiler: Include Option and Result as language-supplied types (#1591) (bd5403f)
  • compiler: Inline record constructors (#1586) (43082f5)
  • compiler: Labeled and default arguments (#1623) (28a38ac)
  • compiler: Make List a language-supplied type (#1648) (2ee1328)
  • compiler: Make types nonrecursive by default (#1826) (46b8a5a)
  • compiler: Module system (#1584) (752da69)
  • compiler: Rational number type (#1603) (350f850)
  • compiler: Reduce size of runtime heap (#1807) (246f894)
  • compiler: Refactor enum constructors (#1211) (8d465b7)
  • compiler: Remove 32-bit numbers from Number type (#1683) (50bf8ee)
  • compiler: Remove arbitrary per-file compiler flags, add acceptable options as module attributes (#1804) (72b2139)
  • compiler: Remove Exclusive/Inclusive Ranges, provide as record via compiler (#1616) (49a399d)
  • compiler: Remove Pervasives' dependency on toString when types are elided (#1664) (f703476)
  • compiler: Remove support of single-argument tuples (#1608) (509cd85)
  • compiler: Require extension when including relative file paths (#1842) (dde62d3)
  • compiler: Short integer values (#1669) (fc4670d)
  • compiler: Streamlined reference counting (#1714) (0711868)
  • compiler: Supply primitive types via the compiler (#1667) (b41feb7)
  • compiler: Update include syntax (#2043) (5f44d4e)
  • compiler: Update use syntax (#2041) (cd346ab)
  • graindoc: Allow doc comments on variants and record fields (#1852) (53f770c)
  • graindoc: Improve docgen for labeled & default arguments (#1776) (be7ff9d)
  • graindoc: Only use original doc blocks when re-providing (#1687) (97c7ce4)
  • graindoc: Replace module attribute with docblock on module header (#1647) (2ff9d9e)
  • graindoc: Support docblocks on submodules (#1684) (bc13017)
  • grainfmt: Implement new formatter (#1976) (1568aa0)
  • Remove js-runner (#1585) (e10d612)
  • Rework preopened directories (#1656) (7d3006d)
  • runtime: Allow modulo on floating point numbers (#1914) (f90d8af)
  • stdlib: List.rotate wraparound for count > length (#1558) (6dd9680)
  • stdlib: Add ** (pow) operator to Pervasives module (#1690) (b16b455)
  • stdlib: Add ** operator to Int32 module (#1938) (32b9639)
  • stdlib: Add ** operator to Int64 module (#1937) (48de28b)
  • stdlib: Add == operator to Queue module (#1931) (3c0ea18)
  • stdlib: Add addCharFromCodePoint to Buffer module (#1883) (18b553a)
  • stdlib: Add asin, acos, atan, isClose to Number module (#1699) (353b544)
  • stdlib: Add atan2 to the Number module (#2016) (145b783)
  • stdlib: Add chunk function to Array module (#1708) (fba7c1d)
  • stdlib: Add fromArray to Queue module (#1932) (1c35a94)
  • stdlib: Add isEmpty to List module (#1860) (7362189)
  • stdlib: add isEmpty to String module (#1861) (e8cb932)
  • stdlib: Add Json module (#1133) (5a6e4c6)
  • stdlib: Add linearInterpolate, linearMap and clamp (#1707) (15842a1)
  • stdlib: Add print suffix default argument (#1768) (6701170)
  • stdlib: Add toArray to Queue (#1930) (7c865a4)
  • stdlib: Add toIntegerRatio and fromIntegerRatio to Rational Library (#1746) (008a735)
  • stdlib: Add toList and fromList functions to Queue module (#1866) (7cdcf95)
  • stdlib: Add Uri module (#1970) (5cf726e)
  • stdlib: Add ASCII utilities to String, Char (#1975) (f65002d)
  • stdlib: Add optimization for Number.pow(Rational, Int) (#1716) (67bee5c)
  • stdlib: Change array rotation direction (#1552) (bbe56ad)
  • stdlib: Convert unsafe Wasm functions to operators (#1734) (114d17b)
  • stdlib: Handle printing of reference cycles (#1844) (49c854e)
  • stdlib: Make queue and stack mutable & provide Immutable submodules (#1479) (979a20c)
  • stdlib: Move stdlib sys modules to wasi (#2056) (ca75e38)
  • stdlib: Provide empty byte array from Bytes.make (#1729) (fde3064)
  • stdlib: Remove parseInt dependency on Pervasives (#1649) (9408568)
  • stdlib: Reorder parameters to List.insert (#1857) (973f3f3)
  • stdlib: Replace Float32 arithmatic/comparison functions with operators (#1954) (52cc15a)
  • stdlib: Replace Float64 arithmatic/comparison functions with operators (#1957) (dea4cb5)
  • stdlib: Replace Int32 arithmatic functions with operators (#1936) (8a69dd3)
  • stdlib: Replace Int64 arithmatic functions with operators (#1935) (cfb909c)
  • stdlib: Replace Result/Option and/or functions with operators (#1821) (686de7e)
  • stdlib: Simplify equal using Memory.compare (#1972) (dc21976)
  • stdlib: Support zipping arrays of different sizes (#1402) (b8ae3d6)
  • stdlib: Use Array length as default end in Array.slice function (#1762) (a698fdc)
  • stdlib: Use String length as default end in String.slice function (#1748) (b7c41a6)

Bug Fixes

  • compiler: Disallow multiple provides of the same value (#1689) (7ab7ddc)
  • compiler: Remove static runtime pointers (#1806) (8d76dc9)
  • Fix String.ReplaceAll (#1705) (d3af004)
  • stdlib: Ensure Array.fillRange works with negative indexing & throws IndexOutOfBound (#1761) (3c3c4d9)
  • stdlib: Ensure consistent marshal representation (#2045) (029059f)
  • stdlib: Error when relativeTo used on relative source and absolute dest (#2054) (1626a1f)
  • stdlib: Fix overzealous Memory.fill in Buffer.truncate (#1781) (e1f24e9)
  • stdlib: Properly handle extremely large integer bases in Number.(**) (#1950) (84c076f)
  • stdlib: Properly resize empty Queue on push (#1865) (f7727ef)
  • stdlib: Properly resize empty Stack on push (#1867) (b90d924)
  • stdlib: Remove extra space when converting Bytes to String (#1800) (543807b)
  • stdlib: Return early from Process.argv() if length is zero (#1817) (8ccea28)
  • stdlib: Sys/File reading and writing operate on Bytes (#1655) (17cb28d)
  • stdlib: Use correct casing for BigInt module name (2ff9d9e)

Miscellaneous Chores

  • compiler: Optimize type metadata loading (#1741) (a4519bc)
  • compiler: Require floats always have a digit on left & right of dot (#1703) (b657e1c)
  • graindoc: Remove section attribute (#1681) (e969ad7)
  • Require node version >=18.15 for WASI support (#1612) (331ffc2)
  • stdlib: Group mutable/immutable data structures (#1652) (f93afef)
  • stdlib: Remove cons and empty from Pervasives (#1657) (f6f02bc)
  • stdlib: Remove sin, cos, tan, gamma, factorial from Number module (#2046) (85c4389)
  • stdlib: Replace parseInt error strings with structured error enum (#1755) (ea26d18)
  • stdlib: Replace bigint/number arithmetic functions with operators (#1742) (cbd46ee)
  • stdlib: Replace Number.nan & Number.infinity constants with keywords (#1618) (b437c13)
  • stdlib: Switch to using records for getInternalStats (#1898) (bdb119a)
  • stdlib: Update Buffer/Bytes to use new integer types (#1704) (d508e5a)
  • stdlib: Update Operator uint operator Names (#1738) (decb053)
  • stdlib: Use default arguments in more of stdlib (#1772) (f5e934f)

0.5.13 (2023-01-07)

Miscellaneous Chores

  • stdlib: Synchronize Grain versions

0.5.12 (2023-01-05)

Bug Fixes

  • stdlib: Remove memory corruption in File.fdReaddir (#1573) (060fc7b)

0.5.11 (2022-12-29)

Miscellaneous Chores

  • stdlib: Synchronize Grain versions

0.5.10 (2022-12-23)

Bug Fixes

  • compiler: Provide appropriate error during invalid array access (#1556) (3d7b9e3)

0.5.9 (2022-12-14)

Miscellaneous Chores

  • stdlib: Synchronize Grain versions

0.5.8 (2022-12-10)

Features

  • runtime: Optimize simple number comparison (f7ceae7)
  • stdlib: Add ImmutableArray module (#1477) (a34d8b9)

Bug Fixes

0.5.7 (2022-12-06)

Miscellaneous Chores

  • stdlib: Synchronize Grain versions

0.5.6 (2022-12-05)

Miscellaneous Chores

  • stdlib: Synchronize Grain versions

0.5.5 (2022-12-05)

Features

  • graindoc: Add attribute for exceptions that may be thrown (#1492) (b2e75c7)
  • graindoc: Support deprecations on module docblocks (#1498) (b3dc85c)
  • stdlib: Add parse function to Number module (#1517) (59e89d1)
  • stdlib: Add parseFloat function to Number module (#1288) (e21f2b1)
  • stdlib: Add split function to Regex module (#1469) (0c1eb73)
  • stdlib: Add splitAll function to Regex module (0c1eb73)
  • stdlib: Add Path module for working with system paths (#1452) (900e976)
  • stdlib: Improve performance in Array & List modules (#1487) (2168f6a)
  • stdlib: Improve performance of flatMap, some, and every functions in Array module (2168f6a)
  • stdlib: Improve performance of some and every functions in List module (2168f6a)

Bug Fixes

  • grainfmt: Add parentheses around some binops for precedence clarity (#1514) (3ac27cc)
  • grainfmt: Handle multiple line items and comments better (#1460) (5395fd4)
  • runtime: Properly divide bigints in the number type (59e89d1)

0.5.4 (2022-11-12)

Features

  • stdlib: Add empty constant to ImmutablePriorityQueue module (427335f)
  • stdlib: Add empty constant to Queue module (427335f)
  • stdlib: Add empty constant to Stack module (427335f)
  • stdlib: Add exp function to Number module (5af9a99)
  • stdlib: Add factorial function to Number module (5af9a99)
  • stdlib: Add gamma function to Number module (5af9a99)
  • stdlib: Add infinity constant to the Number module (c24f6c1)
  • stdlib: Add nan constant to the Number module (c24f6c1)
  • stdlib: Add pow function to Number module (5af9a99)
  • stdlib: Add replaceAll function to String module (5606cd2)
  • stdlib: Add replaceFirst function to String module (5606cd2)
  • stdlib: Add replaceLast function to String module (5606cd2)
  • stdlib: Add tan function to Number module (5af9a99)
  • stdlib: Add toDegrees function to Number module (5af9a99)
  • stdlib: Add toRadians function to Number module (5af9a99)
  • stdlib: Add additional functions to Number module (#1443) (5af9a99)
  • stdlib: Add replacement functions to String module (#1441) (5606cd2)
  • stdlib: Added empty constant to immutable data structures (#1466) (427335f)
  • stdlib: Implement fromArray in PriorityQueue & ImmutablePriorityQueue modules (#1451) (d321f84)
  • stdlib: Implement ImmutableMap and ImmutableSet (#1414) (b31120d)
  • stdlib: Improved efficiency of constructing a PriorityQueue from a List (d321f84)
  • stdlib: Optimize string trimming (#1442) (0212247)

Bug Fixes

  • compiler: Panic immediately when out of memory (#1450) (943d47d)
  • grainfmt: Handle chained value bindings properly (#1467) (07bfcd3)
  • grainfmt: Indent lines when wrapping infix operators (#1465) (d705849)
  • runtime: Handle bigint mul/div within Number correctly (#1475) (0fe8aa6)
  • stdlib: Fix anchoring behavior in Regex.replaceAll (#1440) (d513eff)
  • stdlib: Fix handling of NaN and Infinity in Number module (#1457) (c24f6c1)

0.5.3 (2022-08-05)

Features

  • Implement Pervasives.compare (#1399) (ebd87e4)
  • stdlib: Add charCodeAt function to String module (#1376) (c3abbc9)
  • stdlib: Add lastIndexOf function to String module (#1372) (b73d9bf)
  • stdlib: Implement isFloat, isInteger & isRational in Number module (#1393) (0af0669)
  • stdlib: Implement List.zip, List.unzip, List.zipWith, Array.reduceRight, Array.zipWith (#1363) (3e7c147)
  • stdlib: Implement mutable/immutable priority queues (#1397) (244be1b)
  • stdlib: Marshal (#1352) (d659de2)

Bug Fixes

  • compiler: Correctly handle underscores in bigint literals (0af0669)
  • graindoc: Use defined module name throughout generated doc (#1406) (c33a777)
  • stdlib: Correctly promote numbers to bigints when left-shifting (#1354) (5280e98)
  • stdlib: Prevent addBytesSlice throwing error on empty buffer (#1394) (bdd4be4)

0.5.2 (2022-06-29)

Features

  • stdlib: Add number constants to number libraries (#1331) (f640ec2)
  • stdlib: Implement Number.sin and Number.cos (#1343) (9357126)

Bug Fixes

  • stdlib: Make toNumber functions respect Number invariants (#1347) (78db882)

0.5.1 (2022-06-08)

Miscellaneous Chores

  • stdlib: Synchronize Grain versions

0.5.0 (2022-06-05)

⚠ BREAKING CHANGES

  • stdlib: Use explicit exports for Pervasives (#1301)
  • stdlib: Remove sum function from the List module (#1300)
  • stdlib: Ensure Void return for forEach functions in List module (#1307)
  • stdlib: Provide correct types for BigInt operations (#1297)
  • grainfmt: Replace --in-place flag with -o flag
  • grainfmt: Remove stdin formatting support
  • compiler: Arbitrary-Precision Integer Arithmetic (#1167)
  • Drop node 14 support (#1092)
  • stdlib: Add explicit void return type on Set.forEach (#1225)
  • stdlib: Add explicit void return type on Map.forEach (#1220)
  • stdlib: Add type aliases to regex lib (#1036)
  • compiler: Stack-allocated Chars (#1103)
  • stdlib: Align Buffer's addStringSlice API with String's slice (#1136)
  • graindoc: Add --current-version flag, required for since/history attributes (#1116)
  • compiler: Remove decRefIgnoreZeros (#1068)
  • compiler: Add --memory-base flag (#1115)
  • compiler: Re-implement Grain parser (#1033)

Features

  • compiler: Add --memory-base flag (#1115) (0680826)
  • compiler: Arbitrary-Precision Integer Arithmetic (#1167) (6f34de2)
  • compiler: Call known functions across module boundaries (#1175) (b2d7440)
  • compiler: Convert runtime/dataStructures.gr to primitives (#1145) (2d43b28)
  • compiler: Convert Sys libraries to @unsafe (#1272) (fcdfc2a)
  • compiler: Don't close over global values (#1134) (e8caec6)
  • compiler: Re-implement Grain parser (#1033) (9dc3c96)
  • compiler: Stack-allocated Chars (#1103) (095385e)
  • graindoc: Add --current-version flag, required for since/history attributes (#1116) (0f681ea)
  • graindoc: Allow directory input & output (#1263) (d4cb8ab)
  • grainfmt: Allow directory input & output (#1274) (d3e7a33)
  • grainfmt: Replace --in-place flag with -o flag (d3e7a33)
  • stdlib: Add module for pseudo-random number generation (#921) (db1fa4e)
  • stdlib: Add unsigned versions of Int32/Int64 comparison operations (#831) (5f20868)
  • stdlib: Added Bytes.clear function. Avoid allocation in Buffer.clear (#1124) (4afd17a)
  • stdlib: Convert runtime printing utils to @unsafe (#1135) (403e1d2)

Bug Fixes

  • cli: Ensure parent flags are inherited by the format command (d3e7a33)
  • graindoc: Add parens around infix operators in titles (#1303) (acba9c1)
  • graindoc: Preserve indentation in Doc comments during trim (#1119) (b8a6d57)
  • graindoc: Remove spaces between parens and infix idents (#1302) (95e596f)
  • graindoc: Use value_descriptions and type_declarations defined by the module signature (#1241) (5896242)
  • grainfmt: Remove parens around annotated types (#1109) (0ca66bd)
  • stdlib: Add explicit void return type on Map.forEach (#1220) (ab2066a)
  • stdlib: Add explicit void return type on Set.forEach (#1225) (694e6cf)
  • stdlib: Align Buffer's addStringSlice API with String's slice (#1136) (0c7cb82)
  • stdlib: Buffer.toBytes should not expose the raw instance of Bytes used by the buffer (#1130) (d2bb585)
  • stdlib: Ensure Void return for forEach functions in List module (#1307) (31f480c)
  • stdlib: Fix float printing in dtoa (#1165) (2987210)
  • stdlib: Fixed a memory leak in Buffer.addStringSlice. (#1122) (c4e1911)
  • stdlib: Fixed length and byteLength for strings over 2GiB. (#1126) (08a9487)
  • stdlib: Make Bytes.length handle sizes over 2GiB (#1123) (d7386eb)
  • stdlib: Provide correct types for BigInt operations (#1297) (fdd2f1c)
  • stdlib: Remove intermediate resizes in Buffer.autogrow (#1125) (c1695d0)
  • stdlib: Use explicit exports for Pervasives (#1301) (bad5897)

Miscellaneous Chores

0.4.6 (2022-01-17)

Bug Fixes

  • grainfmt: Indent function application args when adding parens (#1095) (64af7d3)

0.4.5 (2021-12-31)

Features

  • stdlib: Add sign function to Number module (#1079) (b6483d5)

0.4.4 (2021-12-11)

Features

Bug Fixes

  • graindoc: Ensure value_description is resolved to outcome before printing (#1070) (5eb05cc)
  • stdlib: Add bounds checking to Buffer addStringSlice & addBytesSlice (#1065) (06fe512)
  • stdlib: Fix String.encode GC (#1067) (0ab38c9)
  • stdlib: Removed memory leak in Hash module (#1045) (01a81c6)
  • stdlib: Removed memory leaks in Buffer module (#1047) (d33017b)
  • stdlib: Support arrays of any type in Array rotate (#1048) (3ceb1cf)
  • stdlib: Support empty arrays in Array rotate (3ceb1cf)

0.4.3 (2021-10-27)

Features

  • stdlib: Add cycle function to Array module (#993) (c595622)

Bug Fixes

  • compiler: Ensure TExpApp is always expansive in Grain (ef0a69f)
  • compiler: Handle let-mut value restriction, such that mutable lets are always expansive (ef0a69f)
  • compiler: Properly handle value restriction on function application & mutable vars (#988) (ef0a69f)
  • runtime: Add types to boxed GC functions to avoid weak type errors (ef0a69f)
  • stdlib: Fixed memory leak in String.explode (#1001) (c479a05)

0.4.2 (2021-10-11)

Features

  • compiler: Inline not (!) operator (#937) (3f5e9a9)
  • stdlib: Add Conv.wasmI32ToNumber function (#978) (c93ade8)
  • stdlib: Add string trim functions to String module (#951) (e55de8f)
  • stdlib: Regular Expressions (#680) (9601e16)

Bug Fixes

  • stdlib: Fix Char.code memory issue (#928) (dfa31d8)
  • stdlib: Fix issue with list printing (#894) (e2a33a9)
  • stdlib: Fix memory issue in list printing (#912) (3e0a805)
  • stdlib: Fix memory leaks in Char stdlib (#929) (99cc94b)

0.4.1 (2021-09-07)

Bug Fixes

  • stdlib: Annotate generic types in Buffer (#876) (ad46b9e)
  • stdlib: Correct fdPwrite return value (#875) (ceaf6af)
  • stdlib: Correct type signatures on some Array functions (#880) (04bf4d3)

0.4.0 (2021-09-06)

⚠ BREAKING CHANGES

  • compiler: Add typed well-formedness pass which forbids usage of WasmXX values outside of @disableGC context (#772)
  • stdlib: Use random seed for hash module (#854)
  • stdlib: Remove deprecated functions (#812)
  • stdlib: Convert sys functions to return Results instead of throwing errors (#792)
  • compiler: Callee-owned values (#803)
  • compiler: Improve assert messages to contain location information (#737)
  • runtime: Fix bug in equalHelp preventing simpleNum/boxedNum equality checks from happening correctly
  • Adjust Number equality, thus that 5 == 5.0 (#726)
  • stdlib: Export coerceNumberToWasmI32/I64/F32/F64 from Number runtime (#713)

Features

  • compiler: Add --no-bulk-memory flag to polyfill bulk memory ops (#819) (7db4ea6)
  • compiler: Add typed well-formedness pass which forbids usage of WasmXX values outside of [@disable](https://www.github.com/disable)GC context (#772) (42fbad6)
  • compiler: Callee-owned values (#803) (c242e89)
  • compiler: Improve assert messages to contain location information (#737) (26f645b)
  • graindoc: Add support for deprecated attribute (#751) (8540c73)
  • graindoc: Support [@since](https://www.github.com/since) and [@history](https://www.github.com/history) attributes (#785) (9386f46)
  • linker: Add better error for failed wasi polyfill import (3d8f70c)
  • stdlib: Add Array.reverse() function (#698) (538e987)
  • stdlib: Add Array.slice function (#727) (66319ca)
  • stdlib: Add Array.unzip function (#699) (cb9b49e)
  • stdlib: Add Array.zip function (#719) (1dc7f56)
  • stdlib: Add buffer module (627f181)
  • stdlib: Add Float32/Float64 constants for infinity/nan (#720) (4ff3b9f)
  • stdlib: Add GrainDoc to Array module (#763) (155c3e8)
  • stdlib: Add List.join and Array.join functions (#722) (01a64b6)
  • stdlib: Add Result.expect & Result.unwrap functions (#808) (c390e61)
  • stdlib: Add String.chatAt function (#721) (94ffbbe)
  • stdlib: Add String.encode and String.decode functions to standard library (#683) (5635a36)
  • stdlib: Convert sys functions to return Results instead of throwing errors (#792) (35cd957)
  • stdlib: Export coerceNumberToWasmI32/I64/F32/F64 from Number runtime (#713) (9353f0b)
  • stdlib: forEachCodePoint and forEachCodePointi (#766) (b95cfb7)
  • stdlib: Implement initial Number library (#687) (4a71209)
  • stdlib: Int32/64 clz, ctz, popcnt, rotl, rotr, eq, ne, eqz (#807) (ffddc51)
  • stdlib: Number utilities isNaN, isFinite, and isInfinite (#729) (b907da7)
  • stdlib: Optimized coerceNumberToWasmI32. (#782) (98e86ae)
  • stdlib: Provide Bytes hash implementation (#853) (ec7d902)
  • stdlib: String.encodeAtHelp bounds checks and optimization (#764) (27fccae)

Bug Fixes

  • Add @disableGC annotation to WasmXX-using getSize function in Bytes (#771) (bc4146b)
  • Adjust Number equality, thus that 5 == 5.0 (#726) (04aef16)
  • compiler: Refactor function return value incRef logic (#765) (97fbe3d)
  • compiler: Strip leading line asterisks in block and doc comments (#740) (45d8564)
  • Properly initialize malloc free list (#700) (0576fd9)
  • Reduce reduntant memory loads in Malloc.free (#747) (a5817b1)
  • runtime: Fix bug in equalHelp preventing simpleNum/boxedNum equality checks from happening correctly (04aef16)
  • stdlib: Avoid Pervasives.(!=) references on WasmI32 values (#759) (0f42544)
  • stdlib: Correctly indent nested record braces when printing (#724) (05f795d)
  • stdlib: decodeRangeHelp equality check in String module (#735) (42a03ca)
  • stdlib: Fixed memory leak in the print function. (#770) (df094f1)
  • stdlib: Fixed String.writeUtf8CodePoint for two byte sequences. (#786) (20b1a77)
  • stdlib: Premature free in toString (#863) (eec0f09)
  • stdlib: Remove fd_sync calls that are not used (#846) (3d8f70c)
  • stdlib: Respect callee-owned convention in sys/xx modules (35cd957)
  • stdlib: Return proper values from getClockTime for Sys/Time (#705) (cab0ce7)
  • stdlib: String.writeUtf8CodePoint should write 3 bytes for code point 0xFFFF. (#781) (e8f399c)
  • stdlib: Use random seed for hash module (#854) (a1a42d8)
  • tests: Fix mistaken == in WasmI32 tests (0f42544)

Miscellaneous Chores

0.3.2 (2021-05-29)

Features

  • Export number runtime functions as operators & deprecate old identifiers (#629) (b99441a)
  • Implement Bytes type and Bytes stdlib (#633) (4b81898)
  • Implement Grain array methods in Grain instead of the compiler (#660) (b1397fa)
  • Rename Queue/Stack functions & deprecate old identifiers (#635) (3a8da65)
  • stdlib: add Queue.size and Stack.size (#647) (82ed533)
  • stdlib: add Range.map (#674) (5c33861), closes #616
  • Support \b, \f, \t, and \v escapes (c5d3e44)

Bug Fixes

  • compiler: properly handle special float equality (#664) (b63597a)
  • Fix parsing of ''' char literal (c5d3e44)
  • Properly escape quoted strings in toString/print (#670) (c5d3e44)
  • stdlib: fdWrite range error (#677) (73e0a7a)

0.3.1 (2021-04-29)

⚠ BREAKING CHANGES

  • rename Queue/Stack lib methods (#625)

Reverts

Miscellaneous Chores

0.3.0 (2021-04-21)

⚠ BREAKING CHANGES

  • stdlib: Replace JS entrypoint with locator file (#586)
  • Rename registerBasePrinter to dangerouslyRegisterBasePrinter in runtime/exception
  • Use Grain exceptions instead of JS exceptions (#565)
  • Update assignment semantics (#560)
  • Grain implementation of memory allocator (#530)
  • Refactor value tags (#526)
  • stdlib: Ensure string methods are data-last (#494)
  • runtime: Print strings without quotes (#495)
  • Char literals (#477)
  • Char (#474)
  • Rework memory management (#461)
  • convert fallible List methods to return Option (#460)
  • change return type of Array.find/findIndex to Option (#459)
  • Add support for bitwise operators (#425)
  • remove ^ as unbox operator (fixes #183) (#426)

Features

  • Add ability to throw exceptions (1f1cd4a)
  • Add ability to register custom exception printers (1f1cd4a)
  • Add Exception stdlib with Exception.registerPrinter (1f1cd4a)
  • add initial Range stdlib module (#456) (508f23c)
  • add List.init to stdlib (#465) (6b833d8)
  • add reduce/flatMap/every/some to Array stdlib (#455) (51a7a80)
  • add reducei/counti/filter/filteri/unique to Array stdlib (#473) (3e70cd5)
  • add Set stdlib module (#466) (2eb2604)
  • Add support for bitwise operators (#425) (5c2b8bf)
  • add update method to map stdlib (#421) (292b5f9)
  • change return type of Array.find/findIndex to Option (#459) (aa3767d)
  • Char (#474) (c9422f8)
  • Char literals (#477) (cf7eaa5)
  • Compile grainc to JS & create binaries with pkg (#570) (f4919bd)
  • convert fallible List methods to return Option (#460) (a08768e)
  • Grain implementation of Char and String libraries (#559) (7424cc5)
  • Grain implementation of equals (#538) (09617bc)
  • Grain implementation of hashing (#557) (40723fc)
  • Grain implementation of memory allocator (#530) (fd8faaa)
  • Grain implementation of memory manager (#534) (cea6dcc)
  • Grain implementation of number libraries (#542) (d90d38b)
  • Grain implementation of number runtime (#537) (94460c0)
  • Grain implementation of toString/print (#540) (8c77905)
  • Grain wasi bindings (#562) (323006b)
  • Implement low-level wasm i32/i64/f32/f64 libraries (#517) (721d011)
  • Implement String.indexOf, String.explode, and String.split (#450) (6dc5466)
  • Implement support for printing in Grain (#561) (bfe471c)
  • Optimize number to string conversions by writing UTF8 directly (#539) (f18d26e)
  • stdlib: add Stack module (#491) (8310d33)
  • stdlib: Implement Char toString (#481) (37ba683)
  • stdlib: String.implode (#489) (045077b)
  • Update assignment semantics (#560) (03a3217)
  • Use Grain exceptions instead of JS exceptions (#565) (1f1cd4a)

Bug Fixes

  • export * with exceptions (1f1cd4a)
  • Can't use memory.data (#480) (1a4c3b9)
  • loop body typechecking (#533) (18e68ea)
  • Properly incRef exception printers (#581) (61c2a94)
  • remove ^ as unbox operator (fixes #183) (#426) (08b6b05)
  • Rework memory management (#461) (84318b0)
  • runtime: Return correct pointer to morecore (#602) (af39cc4)
  • Throwing an exception now traps immediately in all cases (61c2a94)
  • use direct node call instead of executable file (#431) (747ee8d)
  • Use Is instead of Eq for match variant comparison (1f1cd4a)

Miscellaneous Chores

  • Refactor value tags (#526) (9b21d22)
  • Rename registerBasePrinter to dangerouslyRegisterBasePrinter in runtime/exception (61c2a94)
  • runtime: Print strings without quotes (#495) (16671c2)
  • stdlib: Ensure string methods are data-last (#494) (f871efc)
  • stdlib: Replace JS entrypoint with locator file (#586) (a9ec7e2)