Skip to content

Conversation

@Ziharrk
Copy link
Member

@Ziharrk Ziharrk commented Jul 1, 2025

No description provided.

@Ziharrk Ziharrk requested a review from Copilot July 1, 2025 12:32
Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull Request Overview

This PR introduces basic optimizations for Curry's intermediate language, specifically inlining unused and single-use variables in Let expressions and desugaring case expressions when the scrutinee is a known constructor.

  • Added a new Optimize module implementing the optimizations.
  • Integrated the optimization pass into the compiler pipeline and extended compiler options and Cabal configuration accordingly.

Reviewed Changes

Copilot reviewed 5 out of 5 changed files in this pull request and generated 1 comment.

Show a summary per file
File Description
src/Curry/Frontend/Transformations/Optimize.hs Implements let inlining and case-of-known optimizations.
src/Curry/Frontend/Transformations.hs Imports and integrates the new Optimize module.
src/Curry/Frontend/Modules.hs Hooks the optimization pass into the IL transformation pipeline.
src/Curry/Frontend/CompilerOpts.hs Adds new options and dump levels for optimizations.
curry-frontend.cabal Registers the Optimize module in the library.

@Ziharrk Ziharrk self-assigned this Jul 1, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants