Skip to content

Latest commit

 

History

History
1171 lines (952 loc) · 160 KB

CHANGELOG.md

File metadata and controls

1171 lines (952 loc) · 160 KB

Changelog

0.6.6 (2024-08-12)

Bug Fixes

  • lsp: Prevent crash on types not included from other modules (#2137) (865da8a)

0.6.5 (2024-07-31)

Features

  • lsp: Explicit type annotation code action (#2125) (d34d381)
  • lsp: Goto type definition (#2129) (4bb8fae)
  • lsp: Use argument label code action (#2126) (4399387)
  • 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

  • compiler: Don't trigger recompilation for unnecessary compiler flags (#2106) (4275c17)
  • lsp: Improve lsp behaviour on goto definition (#1893) (d822c87)
  • stdlib: Ensure references are retained in unsafe stdlib functions (#2118) (639856f)

0.6.4 (2024-06-27)

Features

Bug Fixes

0.6.3 (2024-04-06)

Features

  • compiler: Enable debug info in binary output (#2086) (8555853)

Bug Fixes

  • compiler: Properly encode hex values in Bytes literals (#2088) (263993d)

0.6.2 (2024-04-01)

Bug Fixes

  • grainlsp: Prevent LSP crash on startup when running in JS (#2084) (e99cf1f)

0.6.1 (2024-03-29)

Features

  • compiler: Add warning for non-integer array indices (#2077) (520dd8a)
  • compiler: Allow non-block bodies with loops (#2064) (6fd1603)
  • compiler: Improve warning when omitting fields in record pattern (#2079) (4a929fc)

Bug Fixes

  • compiler: Allow proper disambiguation of enum variants (#2068) (f3007b4)
  • compiler: Fix array infix assign semantics (#2080) (bea360d)
  • compiler: Fix disambiguation of record label access (#2072) (1f8a20d)
  • compiler: Set maximum wasm table size (#2061) (e8d643c)
  • grainfmt: Ensure constraints and keyword functions group properly (#2070) (12281ad)
  • grainfmt: Fix formatting of default argument types (#2081) (0c15e4a)
  • grainfmt: Fix printing of qualified infix operators (#2071) (c22932d)
  • 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: Allow @since and @returns once per export (#1946)
  • 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: Ensure --use-start-section can only be used with compile command (#1871)
  • cli: Allow specifying WASI environment variables and CLI args (#1840)
  • compiler: Require module prefix on use/provide for modules (#1868)
  • 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: Remove memory import from _genv (#1830)
  • 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)
  • compiler: Disallow enum variants with parens but no types (#1809)
  • 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)
  • compiler: Remove recursive_types and principal config (#1751)
  • 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)
  • compiler: Remove built-in FileDescriptor type (#1747)
  • compiler: Enable tail calls by default (#1589)
  • 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)
  • compiler: Allocate closures only when necessary (#1660)
  • 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: Apply correct rules for parsing Unicode whitespace (#1554)
  • 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)
  • compiler: Rename _grainEnv to _genv (#1607)
  • compiler: Add yield and macro reserved keywords (#1471)
  • compiler: Implement Infinity and NaN syntax (#1472)
  • stdlib: List.rotate wraparound for count > length (#1558)
  • compiler: Early return (#1464)
  • compiler: Include Option and Result as language-supplied types (#1591)
  • stdlib: Change array rotation direction (#1552)
  • stdlib: Support zipping arrays of different sizes (#1402)
  • Remove --parser-debug-level (#1311) (#1447)
  • compiler: Refactor enum constructors (#1211)

Features

  • Add exception opentype implementation to Oprint (#1896) (51d53f7)
  • Add Hex Exponent Decimals (8a69eb3)
  • ci: Add builds for preview binaries (#1777) (d512c5a)
  • cli: Allow specifying WASI environment variables and CLI args (#1840) (fb8fbf2)
  • cli: Improve error handling around grain run (#1913) (fc9b434)
  • compiler: Add magic primitive (#1766) (a28ebb4)
  • compiler: Add yield and macro reserved keywords (#1471) (f0e29c5)
  • compiler: Add ability to match on low level wasm types (#1588) (0d30888)
  • compiler: Add hex float syntax (#1743) (8a69eb3)
  • compiler: Add stack allocation information to small ints (#1780) (6f1a1a9)
  • compiler: Add Uint32 and Uint64 types (#1531) (42ffdc4)
  • compiler: Allocate closures only when necessary (#1660) (c40df12)
  • compiler: Allow a newline character after 'as' when aliasing (#1641) (2719034)
  • compiler: Allow arrays to do binary operation assignment (#1928) (8a335ae)
  • compiler: Allow importing a memory (#1661) (3140ba2)
  • compiler: Bytes literals (#1662) (3d8e4c5)
  • 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: Early return (#1464) (1bffc82)
  • compiler: Enable tail calls by default (#1589) (f6e5b00)
  • compiler: Explicit abstract types (#1680) (58cd224)
  • compiler: Implement Infinity and NaN syntax (#1472) (74a196d)
  • 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: Propagate attribute locations to Anftree (#1642) (cce2821)
  • compiler: Providing, including, reproviding exceptions (#1849) (687e747)
  • 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 module prefix on use/provide for modules (#1868) (5efb54c)
  • 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: Suppress warnings about using fromNumber for Int32/64 and Float32/64 tests (#1638) (b687e31)
  • compiler: Update include syntax (#2043) (5f44d4e)
  • compiler: Update use syntax (#2041) (cd346ab)
  • graindoc: Add test harness (#1767) (8a93ebe)
  • graindoc: Allow [@since](https://github.com/since) and [@returns](https://github.com/returns) once per export (#1946) (ad977aa)
  • 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: Refactored Graindoc parser (#1658) (b447ced)
  • graindoc: Replace module attribute with docblock on module header (#1647) (2ff9d9e)
  • graindoc: Support docblocks on submodules (#1684) (bc13017)
  • grainfmt: Implement new formatter (#1976) (1568aa0)
  • grainlsp: Implement goto definition (#1787) (3cb862a)
  • grainlsp: Implement inlay hints for module includes (#1793) (408da76)
  • grainlsp: Provide hovers on use statements (#1688) (c5cd21f)
  • lsp: Add hover for submodules (#2028) (85d8768)
  • lsp: Support goto definition on exceptions (#1895) (218b2f0)
  • lsp: Support hover on include statements (#1963) (b6e1570)
  • 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

  • cli: Correct typo in printing stack (#1924) (a4016f1)
  • cli: Ensure --use-start-section can only be used with compile command (#1871) (d9227d7)
  • cli: Show correct error when module traps (#2050) (88560f2)
  • compiler: Allow early return in let bindings (#1727) (43adefe)
  • compiler: Allow providing values of types provided later (#1897) (1c43bd6)
  • compiler: Allow reproviding from submodules (#1888) (97c00e1)
  • compiler: Apply correct rules for parsing Unicode whitespace (#1554) (4f19d71)
  • compiler: Correct locations for data constructor idents (#1752) (d015a97)
  • compiler: Correct the warning suggestion for Float32 And Float64 values (#1671) (32e0397)
  • compiler: Correctly handle and backpatch mutually recursive closure scope functions (#1808) (c2a0c5b)
  • compiler: Disallow enum variants with parens but no types (#1809) (25e4946)
  • compiler: Disallow multiple provides of the same value (#1689) (7ab7ddc)
  • compiler: Ensure constant number locations are propagated correctly when parsing (#2044) (53a33e6)
  • compiler: Ensure refcounts are maintained when tail calls use arguments multiple times (#1993) (86c6e12)
  • compiler: Ensure reprovided types unify (#2051) (4c3203c)
  • compiler: Ensure the extension is chopped in the case of module name error (#2060) (5c79c84)
  • compiler: Fix memory bug in universal exports (#1663) (87724f0)
  • compiler: Inline record exception constructors (#1709) (ffd4d44)
  • compiler: Properly apply well-formedness checks on patterns (#1989) (00abee8)
  • compiler: Properly handle parsing return of negative number (#1611) (0a5a97c)
  • compiler: Provide appropriate error for empty char literals (#1728) (e4dcda8)
  • compiler: Provide full module interface in intermediate wasm files (#1756) (683f803)
  • compiler: Re-providing types (#1874) (6df9eb2)
  • compiler: Remove number constant folding optimization (#1676) (181798d)
  • compiler: Remove static runtime pointers (#1806) (8d76dc9)
  • compiler: Supply correct locations for attributes (#2048) (b19df94)
  • compiler: Support deeply nested types in modules (#1673) (b6651bb)
  • compiler: Type aliasing in use statements (#1887) (79ab814)
  • Fix String.ReplaceAll (#1705) (d3af004)
  • graindoc: Escape * characters that would close markdown bold incorrectly (3b6b5ca)
  • graindoc: Escape * chars that would close markdown bold incorrectly (#1685) (3b6b5ca)
  • graindoc: Use Markdown bold helper for each case of bolding (#1695) (d798433)
  • lsp: Fix lsp crash when hovering on function with default arg (#1969) (dd25d02)
  • lsp: Prevent lsp crash when module cannot be found (#2003) (e4b97ea)
  • 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: Remove built-in FileDescriptor type (#1747) (d40e84a)
  • compiler: Remove memory import from _genv (#1830) (c6693dd)
  • compiler: Remove recursive_types and principal config (#1751) (534bdca)
  • compiler: Rename _grainEnv to _genv (#1607) (73c9499)
  • compiler: Require floats always have a digit on left & right of dot (#1703) (b657e1c)
  • graindoc: Remove section attribute (#1681) (e969ad7)
  • Remove --parser-debug-level (#1311) (#1447) (f78587a)
  • 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)

Features

Bug Fixes

  • compiler: Fix error location reporting of unbound modules and labels (#1577) (5146b14)

0.5.12 (2023-01-05)

Bug Fixes

  • grainfmt: Handle comments after braces properly (654ab8c)
  • grainfmt: Handle comments after braces properly when on one line (#1578) (654ab8c)
  • grainfmt: Properly handle coalesing operator (#1568) (4595f97)
  • stdlib: Remove memory corruption in File.fdReaddir (#1573) (060fc7b)

0.5.11 (2022-12-29)

Bug Fixes

  • compiler: Fix dependency compilation of wasi polyfill (#1563) (fa8b209)
  • grainfmt: Fix grouping of expressions on LHS of fn application, record access etc (#1562) (6c46015)

0.5.10 (2022-12-23)

Features

  • compiler: Allow lists and arrays on the left side of access expressions (#1557) (8c00750)
  • docs: Update approvals process using CODEOWNERS (#1541) (3eb9f7d)

Bug Fixes

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

0.5.9 (2022-12-14)

Features

  • compiler: Cache parsetrees during compilation process (#1548) (7b53aab)

Bug Fixes

  • compiler: Properly parse large hex numbers (#1546) (5f8d770)

0.5.8 (2022-12-10)

Features

Bug Fixes

0.5.7 (2022-12-06)

Bug Fixes

  • compiler: Prevent stack overflows when compiling long blocks (#1534) (dc6d699)

0.5.6 (2022-12-05)

Bug Fixes

0.5.5 (2022-12-05)

Features

  • compiler: Perform partial match checking on let bindings (#1486) (3678eb5)
  • 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

  • compiler: Fix precedence of >> operator (#1515) (1565c16)
  • compiler: Raise appropriate error on unbound export (#1528) (43d512d)
  • compiler: Raise appropriate exception when modules are missing during dependency graph construction (#1485) (d8cd8f1)
  • grainfmt: Add parentheses around some binops for precedence clarity (#1514) (3ac27cc)
  • grainfmt: Avoid duplicating comments inside records (#1428) (b993030)
  • grainfmt: Handle comment in or near if conditionals better (#1513) (8a60985)
  • grainfmt: Handle multiple line items and comments better (#1460) (5395fd4)
  • grainfmt: Maintain comments in function arguments (#1527) (6ad6dc1)
  • grainfmt: Reduce binop format time (#1482) (e850455)
  • grainlsp: Properly surface errors in other files (#1490) (6a09953)
  • runtime: Properly divide bigints in the number type (59e89d1)

0.5.4 (2022-11-12)

Features

  • compiler: Allow custom infix operators (#1419) (cc9b8b5)
  • 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: Fully expand types when finding concrete representation (#1448) (a5ff379)
  • compiler: Panic immediately when out of memory (#1450) (943d47d)
  • compiler: Use option converter for --profile argument (#1432) (57776f2)
  • grainfmt: Group expressions inside array accessors (#1462) (dd11dd4)
  • grainfmt: Handle chained value bindings properly (#1467) (07bfcd3)
  • grainfmt: Handle comments within lists (#1429) (05b5f52)
  • grainfmt: Handle source files with no code, only comments (#1411) (a435d60)
  • grainfmt: Indent lines when wrapping infix operators (#1465) (d705849)
  • grainfmt: Print comments found between comma-separated data statements (#1430) (be4b38d)
  • grainfmt: Properly format comments within a record (#1435) (3c56097)
  • grainfmt: Stop adding an extra line after block comments (#1436) (4e4903f)
  • 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

  • Arm64 docker builds (#1368) (5837df6)
  • compiler: Unicode-aware lexing (#1342) (6dc0dd1)
  • 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: Allow defining _start when using --use-start-section (#1349) (944f71c)
  • compiler: Apply list location to outer node (#1387) (06e79a8)
  • compiler: Correctly handle underscores in bigint literals (0af0669)
  • graindoc: Enable printing of arrow types (#1367) (e2b28ab)
  • graindoc: Use defined module name throughout generated doc (#1406) (c33a777)
  • grainfmt: Format rational numbers with parens when needed for precedence (#1385) (931bb42)
  • grainfmt: Use only the correct comments for constraints (#1388) (91d5cdf)
  • grainlsp: Send empty response if file cannot be formatted (#1386) (38a3f58)
  • 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

  • compiler: Allow compilation of empty programs (#1336) (32df14b)
  • compiler: Allow newline in or-patterns (#1323) (8fe8247)
  • compiler: Support record field updating assignment (#1320) (cc5519c)
  • stdlib: Add number constants to number libraries (#1331) (f640ec2)
  • stdlib: Implement Number.sin and Number.cos (#1343) (9357126)

Bug Fixes

  • compiler: Correct error message for unbound type variables (#1327) (762362a)
  • compiler: Fix compilation of closure scope mutable destructuring (#1346) (bdcdb3c)
  • compiler: Properly handle types not imported (#1329) (75bbb93)
  • compiler: Support printing tuple types in oprint (#1324) (c1d8907)
  • grainfmt: Support PPatOr and PPatAlias (#1322) (20050d2)
  • lsp: Always respond to hover request (#1328) (fb947b5)
  • stdlib: Make toNumber functions respect Number invariants (#1347) (78db882)

0.5.1 (2022-06-08)

Bug Fixes

  • compiler: Properly handle corrupted CMIs (#1314) (7f97410)

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)
  • compiler: Remove --lsp flag from grainc executable
  • lsp: Replaced one-off LSP command with persistent LSP server (#1131)
  • cli: Simplify version output (#1291)
  • cli: Show all global options within help for every command (#1285)
  • cli: Remove graceful flag & behavior (#1275)
  • compiler: Refactor HeapAllocated/StackAllocated into Managed/Unmanaged (#1268)
  • compiler: Replace optimization levels with compilation profiles (#1270)
  • grainfmt: Replace --in-place flag with -o flag
  • grainfmt: Remove stdin formatting support
  • compiler: Arbitrary-Precision Integer Arithmetic (#1167)
  • Switch from yarn to npm (#1226)
  • 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)
  • compiler: Selectively include functions in the global function table (#1183)
  • compiler: Add interface for compile module to hide resume
  • compiler: Disallow end-of-line before => (#1178)
  • 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

  • ci: Link all versions during release (#1290) (ceb8dac)
  • compiler: Add --memory-base flag (#1115) (0680826)
  • compiler: Add [@unsafe](https://github.com/unsafe) attribute for low-level code (#1074) (212faca)
  • compiler: Add warning for calls to IntXX.fromNumber and FloatXX.fromNumber with literal integers/floats (#1218) (2fb86e5)
  • compiler: Allow function re-exports to use regular call instruction (#1176) (afce3aa)
  • compiler: Arbitrary-Precision Integer Arithmetic (#1167) (6f34de2)
  • compiler: Call known functions across module boundaries (#1175) (b2d7440)
  • compiler: Cleaner wasm output for low-level wasm types (#1158) (88060dd)
  • compiler: Consolidate exe & js modes (fc61950)
  • 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: Name globals in wasm output (#1184) (51170e7)
  • compiler: Re-implement Grain parser (#1033) (9dc3c96)
  • compiler: Reduce closure sizes by utilizing $self argument when possible (#1152) (ba6a84c)
  • compiler: Refactor exports (#1244) (4637667)
  • compiler: Replace optimization levels with compilation profiles (#1270) (1a27c12)
  • compiler: Selectively include functions in the global function table (#1183) (67575f7)
  • compiler: Stack-allocated Chars (#1103) (095385e)
  • compiler: Support pattern aliases (#1174) (9ed093b)
  • compiler: Support pattern matching "or" patterns (#1173) (0fb29c4)
  • compiler: Upgrade binaryen to 0.15.0 to support Mac M1 arch (#1151) (fc61950)
  • compiler: Use symbol for equals sign (#1128) (3d7fc57)
  • 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)
  • lsp: Replaced one-off LSP command with persistent LSP server (#1131) (df91849)
  • 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

  • ci: Add a last-release-sha to release-please (#1296) (abf9749)
  • cli: Ensure parent flags are inherited by the format command (d3e7a33)
  • cli: Show all global options within help for every command (#1285) (1357e16)
  • compiler: Apply correct allocation type to numbers (#1140) (b9e9d59)
  • compiler: Avoid module aliases of themselves (df91849)
  • compiler: Fix compilation of functions annotated with alias (#1293) (b3e1882)
  • compiler: fix formatter multiple data bug (#1282) (f6fd962)
  • compiler: Iterate over guard clauses in typedTreeIter/typedTreeMap (#1283) (96e8ecb)
  • compiler: Move Filename usage to Filepath.String & normalize separators (584bcad)
  • compiler: Preserve all configs when compiling (#1207) (d8ff903)
  • compiler: Read custom sections in full (#1243) (f8a0891)
  • compiler: Refactor WASI polyfill resolution (#1261) (a39b48f)
  • compiler: Report binop locations properly (#1271) (4b9dd9c)
  • compiler: Report Win32 instead of Cygwin in JS compiler (#1251) (584bcad)
  • compiler: Respect stack type when dropping statements (#1138) (5a44e93)
  • compiler: Supply correct error for unbound record labels (#1200) (86e1bc0)
  • graindoc: Add parens around infix operators in titles (#1303) (acba9c1)
  • graindoc: Avoid singletons when building ordered comments (#1208) (3f28e6e)
  • graindoc: Fix type printing for types and abstract types (#1238) (aea3ea9)
  • graindoc: Improve location lookup so re-exports do not crash it (#1280) (6e782ee)
  • 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: Preserve the EOL characters of file (#1216) (ef2835a)
  • grainfmt: Properly handle if/then/else line breaks (#1217) (93fd3b5)
  • 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

  • cli: Remove graceful flag & behavior (#1275) (df55898)
  • cli: Simplify version output (#1291) (97f99f4)
  • compiler: Add interface for compile module to hide resume (d8ff903)
  • compiler: Disallow end-of-line before => (#1178) (8261e73)
  • compiler: Refactor HeapAllocated/StackAllocated into Managed/Unmanaged (#1268) (1590a37)
  • compiler: Remove --lsp flag from grainc executable (df91849)
  • compiler: Remove decRefIgnoreZeros (#1068) (3ae8eaa)
  • Drop node 14 support (#1092) (ef4358f)
  • grainfmt: Remove stdin formatting support (d3e7a33)
  • stdlib: Add type aliases to regex lib (#1036) (a926ea5)
  • stdlib: Remove sum function from the List module (#1300) (9101615)
  • Switch from yarn to npm (#1226) (5ea9274)

0.4.7 (2022-01-17)

Bug Fixes

  • compiler: Account for config that is not digestable (#1098) (b58323f)
  • compiler: Apply optimization flag at link stage (#1099) (49dac79)
  • compiler: Inform the compiler that lsp mode is running on a root file (b58323f)
  • compiler: Move lsp flag into grainc to remove it as a recompilation flag (b58323f)
  • graindoc: Remove special idents from receiving parens (#1104) (5cb0fda)
  • grainfmt: Indent function application args when adding parens (#1095) (64af7d3)
  • grainfmt: Inform the formatter that it is running against root files (b58323f)
  • grainfmt: Scope the comments in callback lambda closure (#1090) (0975580)

0.4.6 (2021-12-31)

Features

Bug Fixes

  • compiler: Correctly supply locations for types & variants (9bc7a55)
  • grainfmt: Improve correctness of formatting (9bc7a55)

0.4.5 (2021-12-11)

Features

Bug Fixes

  • compiler: Allow modules to re-export imported types containing generics (#1019) (003cb1e)
  • compiler: Consider invalid CMIs as out of date and recompile (#1061) (80da3a9)
  • compiler: Fix binop operator reported location (#1018) (422dbcb)
  • compiler: Fix counting of stack size (#1066) (f1b3e51)
  • compiler: Fix error message when trying to export a constructor (#1055) (54ddb67)
  • compiler: Fix memory leaks when loading from heap values (#1038) (7d3402d)
  • compiler: Properly apply bindings when executing match guard (#1039) (121644b)
  • compiler: Remove from default ident printer (#1056) (49cd5a0)
  • graindoc: Ensure value_description is resolved to outcome before printing (#1070) (5eb05cc)
  • grainfmt: Handle recursive enums (7dc77cd)
  • grainfmt: Resugar match lists properly (7dc77cd)
  • 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.4 (2021-10-27)

Features

Bug Fixes

  • compiler: Ensure main module is included in linker dependency graph (#996) (d5c6c04)
  • 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)
  • compiler: Properly unmark type manifest bodies (bc648ce)
  • grainfmt: Break long parameterized types (bc648ce)
  • grainfmt: Wrap type annotation for a long line let assignment (#1005) (963b505)
  • linking: Close file after reading (c404fcf)
  • Properly open & close files (#985) (c404fcf)
  • runtime: Add types to boxed GC functions to avoid weak type errors (ef0a69f)
  • stdlib: Fixed memory leak in String.explode (#1001) (c479a05)

0.4.3 (2021-10-11)

Features

  • Add npm releases to workflow (#948) (d55bbc0)
  • cli: Refactor forwardable options (#908) (9ecb49b)
  • compiler: Inline not (!) operator (#937) (3f5e9a9)
  • grainfmt: Add format in place or output to a new file (#904) (0d18935)
  • stdlib: Add Conv.wasmI32ToNumber function (#978) (c93ade8)
  • stdlib: Add string trim functions to String module (#951) (e55de8f)
  • stdlib: Regular Expressions (#680) (9601e16)

Bug Fixes

  • cli: Forward stdlib option to lsp and graindoc (#916) (07c5237)
  • cli: Only add --experimental-wasm-bigint flag on node 14 or 15 (#899) (1cc0c5c)
  • compiler: Allow trailing commas in imports and destructuring (#890) (f5c24c9)
  • compiler: Do not inline aliased mutables (#909) (a50430a)
  • compiler: Don't over-optimize mutable imports (#967) (c3066f6)
  • compiler: Don't warn on exhaustive boolean matches (#913) (4189745)
  • compiler: Ensure cwd directory is normalized on Windows (#952) (a3ab9c3)
  • compiler: Export functions with aliased names as wasm functions (#920) (afba142)
  • compiler: Fix parsing of block with lone 0-arg enum (#885) (edfc21e)
  • compiler: Fix stack/heap number allocation boundary (#974) (47b0f56)
  • compiler: Follow proper calling convention when callling stdlib equals in match (#895) (73fe7d4)
  • compiler: Parse array set with newline correctly (#926) (14e1822)
  • compiler: Remove existing exports when writing universal exports (#919) (e80de43)
  • compiler: Resolve all modules fully during linking (#950) (33b33a3)
  • Correctly preserve start position for character literals (#931) (8fcc575)
  • graindoc: Only extract attributes from Doc comments (#970) (7b6ee5f)
  • grainfmt: fix some spacing issues with the formatter (#955) (9c4be85)
  • grainfmt: Format CRLF files without error (#941) (ece7536)
  • grainfmt: Group infix functions when passed as params (bb9666d)
  • grainfmt: handle empty type for foreign exports (#907) (d3b60a4)
  • grainfmt: Improve formatter performance (#959) (4e739f1)
  • grainfmt: Print attributes for non-toplevel expressions (#887) (72292fe)
  • grainfmt: remove extra spaces around for/while loop conditions (#897) (2054a83)
  • grainfmt: Remove extraneous parens around infix function application (#902) (5c1906a)
  • grainfmt: Removed a trailing comma after a spread in a list, and fixed escaped single quote (#923) (3a138d6)
  • grainfmt: Resolve issues with comments within braces (#888) (9c88b89)
  • 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.2 (2021-09-07)

Bug Fixes

  • grainfmt: Remove extra spacing from type signatures (#877) (c8cf421)
  • 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.1 (2021-09-06)

Bug Fixes

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: Remove user manual memory management calls when --no-gc supplied (#817)
  • compiler: Refactor module resolution in order to properly resolve relative paths (#797)
  • Rename JS "runtime" to "js-runner"/"runner" throughout project
  • compiler: Rename grainRuntime to _grainEnv
  • Refactor out references to "runtime" that aren't related to stdlib/runtime (#755)
  • 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)
  • compiler: Avoid building JS bundles by default (#739)
  • stdlib: Export coerceNumberToWasmI32/I64/F32/F64 from Number runtime (#713)
  • compiler: Universal WebAssembly initial and maximum pages flags (#668)
  • cli: Split -g into --debug and --wat (#620)

Features

  • Add format command to the Grain CLI (#829) (9334b71)
  • Add GrainDoc for markdown generation using doc comments (#574) (558d5e2)
  • cli: Add grain doc command (558d5e2)
  • cli: Split -g into --debug and --wat (#620) (79809bb)
  • compiler: Add --no-bulk-memory flag to polyfill bulk memory ops (#819) (7db4ea6)
  • compiler: Add --wasi-polyfill flag for custom implementations (#800) (6879286)
  • compiler: Add Comments module to Grain_diagnostics (558d5e2)
  • compiler: Add Markdown module to Grain_utils (558d5e2)
  • compiler: Add Range module to Grain_utils (558d5e2)
  • 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: Allow disabling Binaryen optimizations (#780) (a6c929c)
  • compiler: Call known functions directly (#777) (ad282be)
  • compiler: Callee-owned values (#803) (c242e89)
  • compiler: Emit a warning when using Pervasives.(!=) with unsafe Wasm types (#758) (1041e38)
  • compiler: Emit a warning when using Pervasives.(==) with unsafe Wasm types (#742) (8b00055)
  • compiler: Improve assert messages to contain location information (#737) (26f645b)
  • compiler: List exports in wasm_utils (#845) (4fea67b)
  • compiler: Remove user manual memory management calls when --no-gc supplied (#817) (92efd40)
  • compiler: Universal WebAssembly initial and maximum pages flags (#668) (ec9c0e2)
  • graindoc: Add support for deprecated attribute (#751) (8540c73)
  • graindoc: Add support for extra information in module docblock (#809) (f28d234)
  • graindoc: Support [@since](https://www.github.com/since) and [@history](https://www.github.com/history) attributes (#785) (9386f46)
  • linker: Add --use-start-section flag to use start section in output (#844) (c221834)
  • 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)
  • Support mutually recursive data definitions (#725) (4474f88)

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: Correct pretty-printing of record types (#750) (3c0f942)
  • compiler: Do not add transitive dependencies as imports during CRC consistency check (#830) (a1caacc)
  • compiler: Don't report comment locations when disabled (#861) (c6821dd)
  • compiler: Fix incorrect char well-formedness error (#837) (4a201cf)
  • compiler: Fix location information for parsed toplevel statements (#801) (36c85f7)
  • compiler: Fix location of toplevel import statement (#794) (3f94057)
  • compiler: Fix typechecking of single-argument tuple annotation (#827) (7b1bb58)
  • compiler: Print parens for unit functions (#749) (fd88d2e)
  • compiler: Provide named function export for recursive functions (#843) (e7d2ff4)
  • compiler: Recompile cached modules when compiler flags change (#820) (50497dd)
  • compiler: Refactor function return value incRef logic (#765) (97fbe3d)
  • compiler: Refactor module resolution in order to properly resolve relative paths (#797) (97cd97d)
  • compiler: Return full string locations from parsing (#798) (392eabf)
  • compiler: Strip leading line asterisks in block and doc comments (#740) (45d8564)
  • else clause on new line (#678) (13b01c9)
  • graindoc: Added linker fixes for Windows (#824) (41dc6c8)
  • graindoc: Correctly order sections from source code (#748) (61da929)
  • graindoc: Correctly parse attributes, no matter the order (#784) (4a1b280)
  • graindoc: Ensure argument-less variants print with trailing comma (#810) (d0cc615)
  • grainfmt: Correctly add space between arguments in enum pattern (#865) (8c647fa)
  • grainfmt: Handle trailing block comments better (#860) (f15f37b)
  • grainfmt: Use Doc.space and surround trailing type annotations with parens (#866) (7bad8e2)
  • js-runner: Add default object for destructuring (#833) (ab96fd6)
  • js-runner: Monkeypatch fs_write in browser environment (#832) (330b56f)
  • lsp: Pattern-match the phase to match the stop hook (#760) (c4da4d9)
  • Properly initialize malloc free list (#700) (0576fd9)
  • Record function-call associativity (#701) (a6ca63f)
  • 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

  • compiler: Avoid building JS bundles by default (#739) (2925fb8)
  • compiler: Rename grainRuntime to _grainEnv (2d99c5a)
  • Refactor out references to "runtime" that aren't related to stdlib/runtime (#755) (2d99c5a)
  • Rename JS "runtime" to "js-runner"/"runner" throughout project (2d99c5a)
  • stdlib: Remove deprecated functions (#812) (7b74208)

0.3.2 (2021-05-29)

Features

  • compiler: add better hover to LSP (#667) (7c7e9d7)
  • compiler: Upgrade to binaryen.ml v0.10.0 (#623) (940f0f1)
  • 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)
  • Keep track of warnings and report them in LSP mode (#659) (5144e1b)
  • 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

  • Always use correct wasm type for throw (#652) (dcec4e0)
  • compiler: Correct reporting of locations for CRLF files (#658) (457a011)
  • compiler: properly handle special float equality (#664) (b63597a)
  • Fix parsing of ''' char literal (c5d3e44)
  • grainc: Apply separator normalization before cmdliner util (#654) (992dfbd)
  • 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)

Bug Fixes

  • cli: Correct typo in lsp catch block (#618) (b903ced)
  • Workaround for Windows drive letters with jsoo & pkg (#636) (d205cde)

Reverts

Miscellaneous Chores

0.3.0 (2021-04-21)

⚠ BREAKING CHANGES

  • cli: Remove -f CLI option
  • compiler: Remove --principal-types and --recursive-types compiler flags
  • compiler: Rename --cdebug to --verbose
  • cli: Pass compiler flags from the CLI to grainc directly (#613)
  • Correct type signature for _start
  • Introduce _gmain for old behavior of _start
  • Tail calls must be enabled explicitly via --experimental-wasm-tail-call
  • Static linking of Grain modules (#584)
  • stdlib: Replace JS entrypoint with locator file (#586)
  • Streamline runtime dependencies & entrypoints (#585)
  • 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)
  • upgrade binaryen to 0.4.0 & update test invocation to work with it (#435)
  • Add support for bitwise operators (#425)
  • remove ^ as unbox operator (fixes #183) (#426)

Features

  • for loops (#525) (1032a3d)
  • Add ability to throw exceptions (1f1cd4a)
  • Add ability to register custom exception printers (1f1cd4a)
  • add command line option to disable garbage collector (#239) (7f27a0a)
  • 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 support for loading Grain modules directly from an ArrayBuffer and running them (f07f305)
  • add support for LSP lenses (#416) (753a0dc)
  • add update method to map stdlib (#421) (292b5f9)
  • Allow newline when creating array (#447) (114cb1a)
  • Allow pattern matching on unsafe wasm i32s (#532) (8839c55)
  • allow setting the initial memory via CLI option (#448) (213ee5a)
  • Allow unsafe wasm values in globals (#519) (111b549)
  • Better lenses and hover for LSP (#501) (1223e9a)
  • change return type of Array.find/findIndex to Option (#459) (aa3767d)
  • Char (#474) (c9422f8)
  • Char literals (#477) (cf7eaa5)
  • cli: Pass compiler flags from the CLI to grainc directly (#613) (8f40383)
  • Compile grainc to JS & create binaries with pkg (#570) (f4919bd)
  • convert fallible List methods to return Option (#460) (a08768e)
  • Enable Binaryen optimizations (#556) (50ebf74)
  • Export compiled functions from modules (#529) (e302049)
  • 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)
  • Normalized wasm exports for linked modules (3d4ac6e)
  • Optimize local mutations (#527) (65a1947)
  • Optimize number to string conversions by writing UTF8 directly (#539) (f18d26e)
  • Pattern matching on arrays (#478) (681dddf)
  • Static linking of Grain modules (#584) (3d4ac6e)
  • statically link MinGW libraries on Windows (#438) (a154ac3)
  • stdlib: add Stack module (#491) (8310d33)
  • stdlib: Implement Char toString (#481) (37ba683)
  • stdlib: String.implode (#489) (045077b)
  • Support for more WebAssembly runtimes, including Wasmtime and Wasmer (3d4ac6e)
  • Update assignment semantics (#560) (03a3217)
  • upgrade binaryen to 0.4.0 & update test invocation to work with it (#435) (fbf52a8)
  • Upgrade to Binaryen 100 (#541) (6d1fc53)
  • Use Grain exceptions instead of JS exceptions (#565) (1f1cd4a)
  • Use real wasm tail call instruction (#510) (9c9ffe4)

Bug Fixes

  • export * with exceptions (1f1cd4a)
  • Allow bodiless blocks (#444) (ecfc70f)
  • and/or short circuiting (#536) (38ad495)
  • Can't use memory.data (#480) (1a4c3b9)
  • cli: Rework JSOO hacks to ensure stdin always gets data (#614) (b064119)
  • compiler: Always get little endian i64 from bytes (#587) (1b9853a)
  • compiler: Implement proper dependency resolver (#590) (d9ce392)
  • compiler: Resolve names when doing CRC checks (#615) (15ea9a1)
  • compiler: Update binaryen.ml bindings to include JS fixes (#600) (7bd9ac6)
  • Correct type signature for _start (3d4ac6e)
  • docker: Build our own image of ubuntu+node14 (#617) (3053d64)
  • Don't optimize away expressions which could possibly contain side effects (#523) (acc7d65)
  • ensure Dockerfile works with yarn prepare command (#418) (af40e03)
  • grainc: Only print compiler backtraces in debug mode (#588) (f5145ff)
  • loop body typechecking (#533) (18e68ea)
  • Multiline char locs (#484) (1e4a691)
  • Multiline string locs (#482) (d3eccee)
  • normalize filesystem paths to always use / separator (#433) (084a485)
  • One-sided if results in any type (#531) (d85659b)
  • Only backpatch closures for let-bindings (#428) (98a0b0b)
  • Parsing of conditional assignment with binary operators (#572) (17fd4fa)
  • Properly incRef exception printers (#581) (61c2a94)
  • remove ^ as unbox operator (fixes #183) (#426) (08b6b05)
  • Remove ppx_expect entirely to build on Windows (#609) (a234dd8)
  • replace shebang trick with flagged-respawn to support Windows (#430) (4ea2602)
  • Reset type vars when printing types (#420) (bb17787)
  • Rework memory management (#461) (84318b0)
  • runtime: Properly decRef record and array values (#500) (88adb94)
  • runtime: Return correct pointer to morecore (#602) (af39cc4)
  • set test sharding to 1 in attempt to avoid test race condition (#440) (3783ec6)
  • temporarily disable inline tests (#434) (0bc446a)
  • Throwing an exception now traps immediately in all cases (61c2a94)
  • Tidy up type printing (#417) (14c7bd6)
  • use direct node call instead of executable file (#431) (747ee8d)
  • Use Is instead of Eq for match variant comparison (1f1cd4a)
  • Use proper return type for calls to external functions (3d4ac6e)
  • utilize path.join to create filesystem paths in default locator (#432) (8aa4fa0)
  • word-size independent LEB input byte checking (#567) (4079824)

Miscellaneous Chores

  • cli: Remove -f CLI option (8f40383)
  • compiler: Remove --principal-types and --recursive-types compiler flags (8f40383)
  • compiler: Rename --cdebug to --verbose (8f40383)
  • Introduce _gmain for old behavior of _start (3d4ac6e)
  • 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)
  • Streamline runtime dependencies & entrypoints (#585) (bbdd38d)
  • Tail calls must be enabled explicitly via --experimental-wasm-tail-call (3d4ac6e)