curry-frontend: Compile the functional logic language Curry to several intermediate formats

[ bsd3, language, library, program ] [ Propose Tags ]

The Curry front end consists of the executable program "curry-frontend". It is used by various backends to compile Curry programs to an intermediate representation. The code is a stripped-down version of an early version of the Muenster Curry Compiler (http://danae.uni-muenster.de/curry/) which has been extended to produce different intermediate representations. For further information, please check http://curry-language.org


[Skip to Readme]

Modules

[Last Documentation]

  • Base
    • Base.AnnotExpr
    • Base.CurryKinds
    • Base.CurryTypes
    • Base.Expr
    • Base.KindSubst
    • Base.Kinds
    • Base.Messages
    • Base.NestEnv
    • Base.PrettyKinds
    • Base.PrettyTypes
    • Base.SCC
    • Base.Subst
    • Base.TopEnv
    • Base.TypeExpansion
    • Base.TypeSubst
    • Base.Types
    • Base.Typing
    • Base.Utils
  • Checks
    • Checks.DeriveCheck
    • Checks.ExportCheck
    • Checks.ExtensionCheck
    • Checks.ImportSyntaxCheck
    • Checks.InstanceCheck
    • Checks.InterfaceCheck
    • Checks.InterfaceSyntaxCheck
    • Checks.KindCheck
    • Checks.PrecCheck
    • Checks.SyntaxCheck
    • Checks.TypeCheck
    • Checks.TypeSyntaxCheck
    • Checks.WarnCheck
  • CompilerEnv
  • CompilerOpts
  • CondCompile
  • Curry
    • Curry.AbstractCurry
      • Curry.AbstractCurry.Files
      • Curry.AbstractCurry.Type
    • Base
      • Curry.Base.Ident
      • Curry.Base.LLParseComb
      • Curry.Base.LexComb
      • Curry.Base.Message
      • Curry.Base.Monad
      • Curry.Base.Position
      • Curry.Base.Pretty
      • Curry.Base.Span
      • Curry.Base.SpanInfo
    • CondCompile
      • Curry.CondCompile.Parser
      • Curry.CondCompile.Transform
      • Curry.CondCompile.Type
    • Files
      • Curry.Files.Filenames
      • Curry.Files.PathUtils
      • Curry.Files.Unlit
    • Curry.FlatCurry
      • Annotated
        • Curry.FlatCurry.Annotated.Goodies
        • Curry.FlatCurry.Annotated.Type
      • Curry.FlatCurry.Files
      • Curry.FlatCurry.Goodies
      • Curry.FlatCurry.InterfaceEquivalence
      • Curry.FlatCurry.Pretty
      • Curry.FlatCurry.Type
      • Curry.FlatCurry.Typeable
      • Typed
        • Curry.FlatCurry.Typed.Goodies
        • Curry.FlatCurry.Typed.Type
    • Curry.Syntax
      • Curry.Syntax.Extension
      • Curry.Syntax.InterfaceEquivalence
      • Curry.Syntax.Lexer
      • Curry.Syntax.Parser
      • Curry.Syntax.Pretty
      • Curry.Syntax.ShowModule
      • Curry.Syntax.Type
      • Curry.Syntax.Utils
  • CurryBuilder
  • CurryDeps
  • Env
    • Env.Class
    • Env.Instance
    • Env.Interface
    • Env.ModuleAlias
    • Env.OpPrec
    • Env.Type
    • Env.TypeConstructor
    • Env.Value
  • Exports
  • Files
    • Files.CymakePath
  • Generators
    • Generators.GenAbstractCurry
    • Generators.GenAnnotatedFlatCurry
    • Generators.GenFlatCurry
    • Generators.GenTypedFlatCurry
  • Html
    • Html.CurryHtml
    • Html.SyntaxColoring
  • IL
    • IL.Pretty
    • IL.ShowModule
    • IL.Type
    • IL.Typing
  • Imports
  • Interfaces
  • Modules
  • Paths_curry_frontend
  • TokenStream
  • Transformations
    • Transformations.CaseCompletion
    • Transformations.CurryToIL
    • Transformations.Derive
    • Transformations.Desugar
    • Transformations.Dictionary
    • Transformations.Lift
    • Transformations.Newtypes
    • Transformations.Qual
    • Transformations.Simplify

Downloads

Maintainer's Corner

Package maintainers

For package maintainers and hackage trustees

Candidates

Versions [RSS] 0.1, 0.2, 0.2.1, 0.2.2, 0.2.3, 0.2.4, 0.2.5, 0.2.6, 0.2.7, 0.2.8, 0.2.9, 0.2.10, 0.2.11, 0.2.12, 1.0.1, 1.0.2, 1.0.3, 1.0.4, 2.0.0
Change log CHANGELOG.md
Dependencies base (>=4.11 && <4.15), binary (>=0.8 && <0.9), bytestring (>=0.10 && <0.11), containers (>=0.6 && <0.7), curry-frontend, directory (>=1.2 && <1.4), extra (>=1.4.6 && <1.8), file-embed (>=0.0 && <0.1), filepath (>=1.4 && <1.5), mtl (>=2.2 && <2.3), network-uri (>=2.6 && <2.7), parsec (>=3.1 && <3.2), pretty (>=1.1 && <1.2), process (>=1.6 && <1.7), set-extra (>=1.4 && <1.5), template-haskell (>=2.10 && <2.16), time (>=1.9 && <2.0), transformers (>=0.5 && <0.6) [details]
License BSD-3-Clause
Author Wolfgang Lux, Martin Engelke, Bernd Brassel, Holger Siegel, Bjoern Peemoeller, Finn Teegen
Maintainer fte@informatik.uni-kiel.de
Category Language
Home page http://curry-language.org
Source repo head: git clone https://git.ps.informatik.uni-kiel.de/curry/curry-frontend.git
Uploaded by CurryLanguage at 2021-02-11T12:33:11Z
Distributions Debian:2.0.0
Reverse Dependencies 2 direct, 2 indirect [details]
Executables curry-frontend
Downloads 14083 total (44 in the last 30 days)
Rating (no votes yet) [estimated by Bayesian average]
Your Rating
  • λ
  • λ
  • λ
Status Docs not available [build log]
All reported builds failed as of 2021-02-11 [all 2 reports]

Readme for curry-frontend-2.0.0

[back to package description]

Curry Frontend

The frontend lexes, parses, type-checks and transforms Curry source files into a variety of intermediate formats, including

  • FlatCurry for program analyzers and backends
  • AbstractCurry for program manipulation tools
  • HTML for documentation

It is used by the two major Curry compilers, PAKCS and KiCS2.

Requirements

  • Make sure that a recent version of Haskell Stack is installed on your computer

Building

  • To build the project, run make.
  • To test the project, run make runtests.

The built executable will be located at bin/curry-frontend.

Usage

For a detailed overview of the available options, you can use the following command:

curry-frontend --help

Available Formats

--flat  : Generate a FlatCurry (.fcy) and FlatInterface (.fint) file
--xml   : Generate a FlatXML (_flat.xml) file
--acy   : Generate a (type-inferred) AbstractCurry (.acy) file
--uacy  : Generate an untyped AbstractCurry (.uacy) file

The generation of an untyped AbstractCurry program is performed without type checking (i.e. programs with type checks will compile). All functions will either have the type signature specified in the source or, if not available, the dummy type prelude.untyped.

FlatCurry files will always be generated for the imported modules, since the interfaces are required for static-semantic analysis and type inference (only for typed AbstractCurry).

Remarks

  • To use the PAKCS libraries (especially for the Prelude), the environment variable PAKCS_LIB has to point to the correct paths, e.g. using

    export PAKCS_LIB=[pakcs path]/pacs/lib:[pakcs path]/pacs/lib/meta:...

    where [pakcs path] is the directory containing the PAKCS distribution.

  • In contrast to PAKCS, the frontend allow use of anonymous variables (denoted by an underscore _) in type declarations, e.g.

    data T _ = c
    

Known Issues

See GitLab