Fix generation of AbstractCurry
The new frontend generates .acy files which are different (buggy)
compared to the previous version. Type declarations have the following
structure in AbstractCurry (version 2.0), see AbstractCurry.Types
in package abstract-curry
:
data CTypeDecl
= CType QName CVisibility [CTVarIName] [CConsDecl] [QName]
| CTypeSyn QName CVisibility [CTVarIName] CTypeExpr
| CNewType QName CVisibility [CTVarIName] CConsDecl [QName]
deriving (Eq, Show)
Consider the following minimal program:
data List = Empty
PAKCS/KiCS2 version generates the following acy file for this program:
{- AbstractCurry 2.0 -}
CurryProg "T"
["Prelude"]
Nothing
[]
[]
[CType ("T","List") Public [] [CCons [] (CContext []) ("T","Empty") Public []] []]
[]
[]
Unfortunately, the current frontend produces the following acy file:
{- AbstractCurry 2.0 -}
CurryProg "T"
[]
Nothing
[]
[]
[CType ("T","List") Public [] [CCons ("T","Empty") Public []] []]
[]
[]
As a consequence, many important Curry tools (CurryCheck, CurryDoc, CurryPP) required for a basic Curry system do not work in the new version!