coq-club AT inria.fr
Subject: The Coq mailing list
List archive
- From: Trevor Elliott <awesomelyawesome AT gmail.com>
- To: Pierre Letouzey <pierre.letouzey AT inria.fr>
- Cc: Wouter Swierstra <w.swierstra AT cs.ru.nl>, coq-club <coq-club AT inria.fr>
- Subject: Re: [Coq-Club] Haskell Extraction
- Date: Tue, 12 Apr 2011 11:57:13 -0700
- Domainkey-signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :cc:content-type; b=QdM3xmVrpCIhu+drlEtVEe/Lvyv8dN7YRJFFvaOv0iD0G7ZYEs2m/zqueBOXNQD0pW 1PEN8NCmIeXuwnbTgvRxWbKYHHZcnw24rVFMvmytKkXSRUlIDfCb93WyI/lWpkkWM9iy hS3rw9smPyYBIcB+0CtL9Xq30NHFPVllxGx0E=
Hi Pierre,
>> Additionally, if I just use Extract Constant
>> for plus and mult, the rhs is never used in my recursively extracted
>> program; the symbol mult is still used in fact_body.
>
> One more time, this sounds quite right. The semantic of Extract Constant
> is to change the _body_ of the concerned constant, but not the call sites:
I think that my description failed a bit here :)
When doing recursive extraction, I see no mention of (*) or (+), and
the full bodies of mult and plus added to my resulting program. It's
fine with me if this is the expected behavior, my only problem is the
difference between the OCaml and Haskell extractions. When extracting
to OCaml, i get something like this:
> let rec mult = (*)
whereas when extracting to Haskell, I get the following, even when I
have Extract Constant mult => "(*)":
> mult :: Prelude.Int -> Prelude.Int -> Prelude.Int
> mult n m =
> (\f0 fS n -> if n Prelude.<= 0 then f0 () else fS (n Prelude.- 1))
> (\_ -> 0)
> (\p -> plus m (mult p m))
> n
--trevor
- [Coq-Club] Haskell Extraction, Trevor Elliott
- Re: [Coq-Club] Haskell Extraction,
Wouter Swierstra
- Re: [Coq-Club] Haskell Extraction,
Trevor Elliott
- Re: [Coq-Club] Haskell Extraction,
Pierre Letouzey
- Re: [Coq-Club] Haskell Extraction, Trevor Elliott
- Re: [Coq-Club] Haskell Extraction,
Trevor Elliott
- Re: [Coq-Club] Haskell Extraction,
Pierre Letouzey
- Re: [Coq-Club] Haskell Extraction, Trevor Elliott
- Re: [Coq-Club] Haskell Extraction,
Pierre Letouzey
- Re: [Coq-Club] Haskell Extraction,
Trevor Elliott
- Re: [Coq-Club] Haskell Extraction, Trevor Elliott
- Re: [Coq-Club] Haskell Extraction,
Pierre Letouzey
- Re: [Coq-Club] Haskell Extraction, Pierre Letouzey
- Re: [Coq-Club] Haskell Extraction,
Trevor Elliott
- Re: [Coq-Club] Haskell Extraction,
Wouter Swierstra
Archive powered by MhonArc 2.6.16.