Re: Help using currypp

From: Michael Hanus <mh_at_informatik.uni-kiel.de>
Date: Sat, 1 Apr 2017 13:40:50 +0200

Hi James,

the Curry preprocessor is intended to be called by the Curry
parser/frontend where it is supplied with the right arguments.
In particular, <InputFilePath> is a temporary file which is always
different from <OrgFileName>. This was implicitly assumed in the
implementation of currypp and caused this strange error message.
The one line fix will be part of the next distribution,
but, if you want to proceed now, you should keep in mind
this assumption. Hence, you can invoke currypp as follows:

> cp ilp.curry tmp
> curry pp ilp.curry tmp ilp_out.curry defaultrules -v

If you want to invoke currypp automatically when loading a Curry
program, you should add the following line as the first line
of your module:

{-# OPTIONS_CYMAKE -F --pgmF=currypp --optF=defaultrules --optF=-o #-}

The option "-o" has the effect that the translated program
is also written to "ilp.curry.CURRYPP" so that you can look
at the performed transformations.

I hope this helps.

Best regards,

Michael

On 31.03.2017 22:58, James Koppel wrote:
> Hello!
> =

> I'm trying to inspect the output of currypp so I can debug an issue I've
> been having with default cases. I'm having substantial difficulty
> figuring out how it's supposed to be used.
> =

> The usage instructions say:
> =

> Usage: curry pp <OrgFileName> <InputFilePath> <OutputFilePath>
> <options> =

> =

> =

> =

> <OrgFileName> : name of original program source file
> =

> <InputFilePath> : name of the actual input file
> =

> <OutputFilePath>: name of the file where output should be written
> =

> =

> =

> =

> I don't understand the difference between OrgFileName and
> InputFileName. My best guess of how to invoke currypp is an invocation
> like this:
> =

> curry pp ilp.curry ilp.curry ilp_out.curry defaultrules -v
> =

> =

> Where "ilp.curry" is the file I want to transform, and I am running this
> from the directory that contains ilp.curry .
> =

> However, this simply gives the following error:
> =

> =

> ======================
====================
> =

> Curry Preprocessor (version of 12/01/2017)
> =

> ======================
=====================
> =

> ERROR: context(:(system,/(open,4)),No such file or directory)
> =

> =

> I'd appreciate help finding a way to understand the output of the
> preprocessor.
> =

> Sincerely,
> James Koppel
> MIT CSAIL =

> =

> =

> _______________________________________________
> curry mailing list
> curry_at_lists.rwth-aachen.de
> https://mailman.rwth-aachen.de/mailman/listinfo/curry
> =


_______________________________________________
curry mailing list
curry_at_lists.rwth-aachen.de
https://mailman.rwth-aachen.de/mailman/listinfo/curry
Received on Sa Apr 01 2017 - 13:50:21 CEST

This archive was generated by hypermail 2.3.0 : Do Jun 20 2024 - 07:15:13 CEST