[Haskell-cafe] Standard package file format

Mario Blažević mblazevic at stilo.com
Fri Sep 16 15:21:23 UTC 2016


On 2016-09-16 10:48 AM, Imants Cekusins wrote:
> ok how about a pragma:
>
>         7.13.6.3. Annotating modules
>
> You can annotate modules with the |ANN| pragma by using
> the |module| keyword. For example:
>
> {-# ANN module (Just "A `Maybe String' annotation") #-}

I suppose this could do, but there are some downsides:
   - somewhat cumbersome syntax,
   - reliance on a GHC extension, and worst of all,
   - not a Haskell value.

	The last point implies that the package.hs with this kind of module 
annotation could not produce a proper GenericPackageDescription when 
executed as a Haskell program.


> if the topic is _Standard package file format_, why not agree on e.g.
> adopting *GenericPackageDescription* or another similar haskell type
> (rather than a text-based file) as the standard?
>
> then any format (cabal, yaml, json, ...) may be used as long as a
> library exists and is maintained for each such format,  which parses /
> produces the format from / to the standard type?

	This makes perfect sense to me. The devil may be in the details. Would 
cabal-install need to link in all these maintained libraries statically? 
Or would there be some plug-in mechanism to load them on demand?



More information about the Haskell-Cafe mailing list