Skip to content

WIP: Update KiCS2 to compile with the new frontend

Fredrik Wieczerkowski requested to merge update-frontend into master

This (highly work-in-progress) branch updates KiCS2 to compile with newer versions of the frontend, specifically curry-frontend!31 (merged). Since the standard libraries have received quite a few changes since the last update to KiCS2, this branch also:

  • updates KiCS2 to use the new modules (e.g. Data.List instead of List)
  • updates the code generation, including
    • the generation of Curry contexts by using QuantifiedConstraints (thereby addressing issues like #28)
    • the generation of valid type applications by using PolyKinds (thereby fixing the type of C_Apply, possibly related to #24?)
  • fixes minor issues, like
    • making sure that a Prelude import is always present (unless NoImplicitPrelude is enabled)
    • considering non-existent dependencies to be out-of-date (this is e.g. an issue where a Curry_Trace_Prelude is required, but has not been built yet)

Some notable issues left to address:

  • Newtype generation is still broken (see #22), newtypes in the KiCS2 codebase have been (temporarily) replaced by data (this includes ContT, ExceptT, MaybeT and StateT).
  • The Prelude currently recompiles in every iteration of compile-all-libs.sh. To prevent the script from looping infinitely, the check has been updated to ignore Compiling Prelude in the output, we may however want to find a more elegant solution for this in the future.
  • The main goal generated by the REPL seems to be missing a Curry context, e.g. when evaluating
let last (_ ++ [x]) = x in last [1, 2, 3 :: Int]
  • The libraries do not compile yet.
Edited by Fredrik Wieczerkowski

Merge request reports