curry-base-1.1.1: Functions for manipulating Curry programs

Copyright(c) 2009 Holger Siegel
2012 - 2014 Björn Peemöller
LicenseBSD-3-clause
Maintainerbjp@informatik.uni-kiel.de
Stabilityexperimental
Portabilityportable
Safe HaskellSafe
LanguageHaskell2010

Curry.Files.Unlit

Description

Since version 0.7 of the language report, Curry accepts literate source programs. In a literate source, all program lines must begin with a greater sign in the first column. All other lines are assumed to be documentation. In order to avoid some common errors with literate programs, Curry requires at least one program line to be present in the file. In addition, every block of program code must be preceded by a blank line and followed by a blank line.

It is also possible to use "begin{code}" and "end{code}" to mark code segments. Both styles can be used in mixed fashion.

Synopsis

Documentation

isLiterate :: FilePath -> Bool Source #

Check whether a FilePath represents a literate Curry module

unlit :: FilePath -> String -> CYM String Source #

Process a curry program into error messages (if any) and the corresponding non-literate program.