Henning Thielemann | 3 Jan 2008 12:06
Picon

Re: check if program uses haskell 98 only?


On Thu, 6 Dec 2007, Henning Thielemann wrote:

> On Thu, 6 Dec 2007, Thomas Hartman wrote:
>
> > On a related note... is there some easy way to be sure that a program I am
> > compiling uses only haskell 98? (Because any pure haskell 98 should always
> > compile on yhc... right?)
>
> You can for instance use 'haskell98' as dependent package instead of
> 'base' in the Cabal description. If you import other modules, I don't know
> how to check that these are Haskell 98. I weakly remember corner cases
> where GHC accepts more than Haskell 98 in Haskell 98 mode. (At least it
> sometimes suggests fixes for errors that are not Haskell 98, e.g.  class
> constraints in signatures. :-)

Now I have an example: GHC-6.4.1 accepts multi parameter type class
constraints without '-fglasgow-exts'.

> > I compile this with ghc, no options, and iIt doesn't have any {-#-#}
> > options, so according to what I understand, it is using pure haskell 98.
> > So I might think this was a candidate for using on yhc.
>
> I could not always pass a GHC-certified module to Hugs or even Haddock. I
> remember there is some difference with respect to the trailing 'where' in
> the 'instance' head, if the instance declaration is empty.  Haddock expect
> some spaces in infix operators (I believe ( # ) instead of (#)), which are
> not required by Hugs and GHC.
Dimitry Golubovsky | 5 Jan 2008 16:14
Picon
Gravatar

CouchDB module in Yhc source tree: clarification, and small problems with other packages

Hi,

Don asked:

> Are we likely to see the couchdb bindings released as a standalone
> library for the wider community?

Let me explain a little bit why the CouchDB module appears in the Yhc repo.

As the next stage of the Yhc/Javascript project, I am trying to set up
a web service where people might upload some Haskell code (or
reference to such code, these details haven't been clarified yet), and
get it compiled by background Yhc/ycr2js batch job, returning a HTML
page with Javascript in response.

CouchDB was picked* as intermediate storage for this project.
Therefore an interface module was needed, so I wrote one. This module,
`Database.CouchDB' is not 100% finished; it was coded up to satisfy
the needs of the first utility I wrote, `cdbup' which is currently
capable of uploading a text (utf-8 expected) or a binary file as a
document attachment to CouchDB. So some functionality hasn't been
coded yet, although it will definitely be, as the project develops.

Regarding packaging, I hope I will eventually put it on Hackage, but
there are some problems with another packages which I'll try to
explain here, so maybe those packages' developers  suggest something.

1. Text.JSON. This module was picked from Jun Mukai's haskellnet
package (http://darcs.haskell.org/SoC/haskellnet/). One problem with
this package, it needs too many dependencies (while JSON module relies
(Continue reading)


Gmane