Adding a DSEL library to the hierarchy

Hi, I'm expecting to publicly release the library of a Haskell-embedded Domain Specific Language, ForSyDe [1], in a few weeks time. However, I'm not still sure of what would be the most appropriate place in the hierarchy where to "plug" the library. To provide a little background, ForSyDe is aimed at modelling systems, and its implementation shares many concepts with Lava [2], the successful Haskell-embedded HDL. So the my question could be rephrased as "If you had to adapt the Lava library to the namespace extension, where would you put it?" My options are: 1) Use Language.ForSyDe But I don't know if embedded-languages really fit here since they don't explicitly "operate on source code" for the end-user (i.e. they don't transform or make computations over the representation of a language but rather provide the language itself) 2) Use the Org root name. However, we don't still have a domain, don't really think we'll have it any time soon, and besides, although the "Org" root name is proposed in the namespace extension, it doesn't really seem to be used in practice (tell me if I'm wrong). 3) Use our own root name: "ForSyDe". That's how it's currently implemented, but I guess that one of the purposes of having a namespace extension was precisely to avoid people adding their own root names. I would really appreciate any advice regarding this matter. Thanks in advance, Alfonso Acosta [1] http://www.imit.kth.se/info/FOFU/ForSyDe/ [2] http://www.cs.chalmers.se/~koen/Lava/

Hello Alfonso, Wednesday, November 14, 2007, 4:25:53 PM, you wrote:
1) Use Language.ForSyDe
for me seems most appropriate, unless you will invent some other root for DSELs. btw, isn't it better to rename lib into just Forsyde? Mixed-case makes reading a bit difficult -- Best regards, Bulat mailto:Bulat.Ziganshin@gmail.com

Hi Bulat,
On Nov 14, 2007 2:42 PM, Bulat Ziganshin
1) Use Language.ForSyDe
for me seems most appropriate, unless you will invent some other root for DSELs.
Well, I Don't think there is such a demand for a DSEL root, so maybe Language would be appropiate. On the other hand, as Katil mentioned, ForSyDe is simply shorter. Are there any strong opinions against creating a new ForSyDe root name?
btw, isn't it better to rename lib into just Forsyde? Mixed-case makes reading a bit difficult
I guess I'll have to ask the original designers of ForSyDe. ForSyDe's name falls into the case of LaTeX so they might want to keep it unmodified, and besides, they are the ones paying for my work ;).

Are there any strong opinions against creating a new ForSyDe root name?
I'd prefer more discussion about when to make new root names, when to wedge
things into the existing hierarchy, and when to create new root names, under
which to add projects (e.g. DSEL).
I often have trouble figuring out where to put things in the hierarchy. For
instance, type classes cut across classifications like Data vs Control.
That cross-cutting is what makes them so powerful. For TV, I made a new
"Interface" root name. It overlaps with Graphics.UI but is more general.
For DeepArrow, I used Control.Arrow.DeepArrow, although it's not about
"control" (just as monads or arrows are not about control).
I have doubts about whether module hierarchy is workable in general. Maybe
we could come up with something better.
- Conal
On Nov 14, 2007 3:32 PM, Alfonso Acosta
Hi Bulat,
On Nov 14, 2007 2:42 PM, Bulat Ziganshin
wrote: 1) Use Language.ForSyDe
for me seems most appropriate, unless you will invent some other root for DSELs.
Well, I Don't think there is such a demand for a DSEL root, so maybe Language would be appropiate.
On the other hand, as Katil mentioned, ForSyDe is simply shorter.
Are there any strong opinions against creating a new ForSyDe root name?
btw, isn't it better to rename lib into just Forsyde? Mixed-case makes reading a bit difficult
I guess I'll have to ask the original designers of ForSyDe. ForSyDe's name falls into the case of LaTeX so they might want to keep it unmodified, and besides, they are the ones paying for my work ;). _______________________________________________ Libraries mailing list Libraries@haskell.org http://www.haskell.org/mailman/listinfo/libraries

On 11/14/07, Conal Elliott
I'd prefer more discussion about when to make new root names, when to wedge things into the existing hierarchy, and when to create new root names, under which to add projects ( e.g. DSEL).
The easiest thing to do is just use the package name as the root.
Putting modules close together in the hierarchy doesn't have any
significance in Haskell or (as far as I can tell) Cabal, so there's no
advantage to putting things in the existing structure.
--
Dave Menendez

"Conal Elliott"
I'd prefer more discussion about when to make new root names, when to wedge things into the existing hierarchy, and when to create new root names, under which to add projects ( e.g. DSEL).
I belive the primary - and perhaps only justifiable - purpose of the hierarchy is to avoid namespace collisions. A new root is a good choice when you have a library that has a distinct name (like "ForSyDe", or, for that matter "Parsec"), and includes cross-hierarchy functionality.
I have doubts about whether module hierarchy is workable in general. Maybe we could come up with something better.
Here's an essay about categorizing stuff: http://www.shirky.com/writings/ontology_overrated.html The short version is that any hierarchy is going to have problems, and nobody (except in the physical world) is browsing a hierarchy anyway, they just enter terms in search fields. So a wide/shallow hierarchy incurs no additional cost, and reduces at least some of the problems compared to a narrow/deep one. -k -- If I haven't seen further, it is by standing in the footprints of giants

"Alfonso Acosta"
My options are: 3) Use our own root name: "ForSyDe". That's how it's currently implemented, but I guess that one of the purposes of having a namespace extension was precisely to avoid people adding their own root names.
It's what I do, too. Frankly, I don't see any problem with this, and if I had a penny for every time I had to type D a t a . B y t e S t r i n g . L a z y . C h a r 8 or T e x t . P a r s e r C o m b i n a t o r s . P a r s e c in ghci just to disambiguate some operation... -k -- If I haven't seen further, it is by standing in the footprints of giants

On Wed, Nov 14, 2007 at 02:45:23PM +0100, Ketil Malde wrote:
"Alfonso Acosta"
writes: My options are: 3) Use our own root name: "ForSyDe". That's how it's currently implemented, but I guess that one of the purposes of having a namespace extension was precisely to avoid people adding their own root names.
It's what I do, too. Frankly, I don't see any problem with this, and if I had a penny for every time I had to type D a t a . B y t e S t r i n g . L a z y . C h a r 8 or T e x t . P a r s e r C o m b i n a t o r s . P a r s e c in ghci just to disambiguate some operation... Does that mean I'm not the only one longing for
:m +Data.ByteString.Lazy.Char8 as B In that case I should probably submit a feature request for it. Greetings, Remi
-k -- If I haven't seen further, it is by standing in the footprints of giants _______________________________________________ Libraries mailing list Libraries@haskell.org http://www.haskell.org/mailman/listinfo/libraries

On Wed, 14 Nov 2007, Remi Turk wrote:
On Wed, Nov 14, 2007 at 02:45:23PM +0100, Ketil Malde wrote:
It's what I do, too. Frankly, I don't see any problem with this, and if I had a penny for every time I had to type D a t a . B y t e S t r i n g . L a z y . C h a r 8 or T e x t . P a r s e r C o m b i n a t o r s . P a r s e c in ghci just to disambiguate some operation... Does that mean I'm not the only one longing for
:m +Data.ByteString.Lazy.Char8 as B
In that case I should probably submit a feature request for it.
If I need these module renamings frequently I usually write a module, which imports the modules with renaming and load that into GHCi.

It's what I do, too. Frankly, I don't see any problem with this, and if I had a penny for every time I had to type D a t a . B y t e S t r i n g . L a z y . C h a r 8 or T e x t . P a r s e r C o m b i n a t o r s . P a r s e c in ghci just to disambiguate some operation... Does that mean I'm not the only one longing for
:m +Data.ByteString.Lazy.Char8 as B
In that case I should probably submit a feature request for it.
+1 Importing modules in ghci is really annoying for several reasons: - Above mentioned. - Loose my imports on failed load (maybe we could keep the current bindings, imports until the whole load is finished?) - Super long prompt. Cheers, Johan

johan.tibell:
It's what I do, too. Frankly, I don't see any problem with this, and if I had a penny for every time I had to type D a t a . B y t e S t r i n g . L a z y . C h a r 8 or T e x t . P a r s e r C o m b i n a t o r s . P a r s e c in ghci just to disambiguate some operation... Does that mean I'm not the only one longing for
:m +Data.ByteString.Lazy.Char8 as B
In that case I should probably submit a feature request for it.
+1
Importing modules in ghci is really annoying for several reasons:
- Above mentioned. - Loose my imports on failed load (maybe we could keep the current bindings, imports until the whole load is finished?) - Super long prompt.
+1

| > > Does that mean I'm not the only one longing for | > > | > > :m +Data.ByteString.Lazy.Char8 as B | > > | > > In that case I should probably submit a feature request for it. | > | > +1 | > | > Importing modules in ghci is really annoying for several reasons: | > | > - Above mentioned. | > - Loose my imports on failed load (maybe we could keep the current | > bindings, imports until the whole load is finished?) | > - Super long prompt. Add a feature request by all means! Simon

On Nov 15, 2007 10:03 AM, Simon Peyton-Jones
| > > Does that mean I'm not the only one longing for | > > | > > :m +Data.ByteString.Lazy.Char8 as B | > > | > > In that case I should probably submit a feature request for it. | > | > +1 | > | > Importing modules in ghci is really annoying for several reasons: | > | > - Above mentioned.
http://hackage.haskell.org/trac/ghc/ticket/1895
| > - Loose my imports on failed load (maybe we could keep the current | > bindings, imports until the whole load is finished?)
http://hackage.haskell.org/trac/ghc/ticket/1896
| > - Super long prompt.
Possible to set in .ghci
Add a feature request by all means!
Simon
participants (10)
-
Alfonso Acosta
-
Bulat Ziganshin
-
Conal Elliott
-
David Menendez
-
Don Stewart
-
Henning Thielemann
-
Johan Tibell
-
Ketil Malde
-
Remi Turk
-
Simon Peyton-Jones