[ANN] Copilot 4 #534
ivanperez-keera
announced in
Announcements
Replies: 1 comment
-
Just to document it: the current version installs with GHC 9.10 if you modify I've messaged the maintainer of bitwise. |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Hi everyone!!
We are very, very excited to announce Copilot 4.0. This major release incorporates full support for modifying arrays, as well as creating new arrays from the fields. The same applies for structs, whose support was partially added in 3.19.1 and is now complete.
To provide a clean, uniform interface for both arrays and structs, we have decided to rename some functions offered by Copilot:
The function to access elements of an array for the purposes of extracting them is now
(!)
. The old function name(.!!)
is now deprecated.The function
(!!)
, previous exposed bycopilot-libraries
(and transitively bycopilot
), is now deprecated in that library and no longer exposed bycopilot
, to leave the name free for array modifications. The new function name is(!!!)
.The interface for modifying arrays and structs is as follows:
Similarly, struct fields can be accessed with the function
(#)
, like before, and modified with(##)
. For example, given a streambattery :: Stream Battery
, where:we can produce a new stream where the
temp
field is increased by one unit as follows:Note that the argument to
(=$)
is a function on streams, so you can also apply delays or stream transformations and they will be applied to a field or element only. This new interface can also be used to construct new values from the fields, but it's necessary to provide a default (initial) value. For example, given twoStream Bool
, you can put them together into an array as follows:Massive thanks to @fdedden @agoodloe @InnovativeInventor @RyanGlScott for their work making Copilot better every day.
For details on this release, see: https://github.com/Copilot-Language/copilot/releases/tag/v4.0.
As always, we're releasing exactly 2 months since the last release. Our next release is scheduled for Nov 7th, 2024.
Current emphasis is on improving the codebase in terms of stability and test coverage, removing unnecessary dependencies, hiding internal definitions, formatting the code to meet our new coding standards, and simplifying the Copilot interface. Users are encouraged to participate by opening issues and asking questions in this discussions section.
Happy Haskelling!
Beta Was this translation helpful? Give feedback.
All reactions