Version 3
This branch contains some work on making KiCS2 run with recent versions of the libraries and the frontend. This includes:
- Updates to the
newtype
generation (see !5 (closed) and !7 (merged)) - Rewriting the Makefiles
- Using versioned output folders for the compilation artifacts (e.g.
.curry/kics2-3.0.0/...
) - Packaging the compiler for use with CPM and unvendoring most of the dependencies
- Updating the code generation of contexts and applications (see !4 (closed) for details)
- Using Stack to build the runtime libraries
Todo:
-
Ensure that basic expressions compile when using the REPL -
Fix generation of typeclass contexts -
Re-add the temporarily removed library modules to the Cabal file and make sure they compile (see !7 (merged)) -
Fix newtype generation (see !7 (merged)) -
Find a way of precompiling the runtime packages ( kics2-runtime
andkics2-libraries
) without relying on (legacy)v1
-commands fromcabal-install
(see !8 (merged)) -
Re-add CPM targets (see !9 (merged)) -
Re-add bootstrap targets (see !9 (merged)) -
Fix bug where partially exported higher-order newtypes cause type signatures of nondeterministic ( nd_...
) functions to be generated incorrectly (using the non-higher-order newtypeC_...
instead ofHO_C_...
)- This is e.g. the case in
CPM.ErrorLogger
where the module only exports the typeErrorLogger
and the selector functionrunErrorLogger
, however not the newtype constructorErrorLogger
- This is e.g. the case in
-
Fix bug where newtypes in higher-order data structures (including typeclass dictionaries) incorrectly use the first-order newtype instead of the higher-order variant. Consider the following example:
newtype X a = X (String -> a)
data D a = D (String -> X a)
D
now incorrectly compiles to:
data C_D t0
= C_D (Curry_Prelude.OP_List Curry_Prelude.C_Char -> Cover -> ConstStore
-> C_X t0)
| HO_C_D (Func (Curry_Prelude.OP_List Curry_Prelude.C_Char) (C_X t0))
| ...
instead of
data C_D t0
= ...
| HO_C_D (Func (Curry_Prelude.OP_List Curry_Prelude.C_Char) (HO_C_X t0))
| ...
Edited by Fredrik Wieczerkowski