Peter Strand <[EMAIL PROTECTED]> writes:
> That is, a function is looked up in the namespaces of its arguments as
> well as in the normal places. So "add fm k v" where fm :: FiniteMap,
> x :: Int, v :: String would look for "add" in the modules where
> FiniteMap, Int and String was defined.
I sup
On Tue, Feb 24, 2004 at 05:24:41PM -, Simon Marlow wrote:
> [Graham Klyne wrote:]
> > I recently ran into some problems porting some Haskell code
> > to Windows
> > because it used the Text.Regex library, which is dependent on
> > a Unix-only system.
>
> Text.Regex works fine on Windows, at
I've had an idea stewing in my head to do with per-type function
namespaces, that the current module namespace discussion reminded me
about. The problem is that there is a limited namespace for functions,
so that if you define a new data type, it is unwise to call functions
which work on that
> I've had an idea stewing in my head to do with per-type function
> namespaces, that the current module namespace discussion reminded me
> about. The problem is that there is a limited namespace for functions,
> so that if you define a new data type, it is unwise to call functions
> which wor
Aetion Technologies LLC seeks another high-quality programmer.
Development is mostly in Haskell, with some Java, mostly under Linux.
An ideal candidate is excellent at acquiring, applying, and writing
about new knowledge. Additional background in disciplines like
mathematics, science, engineering,
On 27/02/2004, at 3:47 AM, Keith Wansbrough wrote:
I've had an idea stewing in my head to do with per-type function
namespaces, that the current module namespace discussion reminded me
about. The problem is that there is a limited namespace for
functions,
so that if you define a new data type, i
I think that this is a problem that can be solved with a simple convention
change, rather than a language extension - instead of appending type
names, I think it would be much better if modules simply used the short,
convenient, common names and expected the user to import them qualified
where over
On 27/02/2004, at 8:28 AM, Abraham Egnor wrote:
I think that this is a problem that can be solved with a simple
convention
change, rather than a language extension - instead of appending type
names, I think it would be much better if modules simply used the
short,
convenient, common names and ex
[EMAIL PROTECTED] writes:
> addToFM :: Ord key => FiniteMap key elt -> key -> elt -> FiniteMap key
> elt
> addToSet :: Ord a => Set a -> a -> Set a
> So, how can you come up with a type class which provides a
> polymorphic 'add' function, considering you don't even know how many
> parameters eac
[EMAIL PROTECTED] wrote:
I've had an idea stewing in my head to do with per-type function
namespaces, .
The idea that I've been throwing around is to be able to define a
separate namespace for each type; a function can either belong in a
"global" (default) namespace, or belong in a particul
Mr. Ozone wrote:
[snip]
> So at the moment, many Haskellers will append the type name to the
> function to indicate that it only works on that particular data type.
> In this respect, Haskell is at a disadvantage vs most object-oriented
> languages, because in them, you can write "x.add", and t
Alastair Reid <[EMAIL PROTECTED]> wrote:
> Haskell's module system provides a way for a module to merge multiple
> modules into one but provides no way to eliminate any ambiguities this
> may create. If we want to be able to use names like 'create' instead
> of 'createFont', we need to change the
Is fixing GHC arrays a big research job or is it
something that someone can straightforwardly
handle if my site actually gets enough traffic to
warrant it?
-Alex-
On Thu, 26 Feb 2004, Simon Peyton-Jones wrote:
> | But in managing this tradeoff, what is faster:
> | * constructing/destructing e.g.
I went ahead and implemented Perl Compatable Regular Expression support
as well as a module which uses template haskell to check regular
expressions at runtime.
The full set of modules is
RRegex - PCRE if available, else Posix, (compatable with Text.Regex)
RRegex.PCRE- Perl compatable
Gabriel wrote:
> | This overloading by namespace is usually called either ADL
> | (Argument-Dependent Lookup) or Koenig Lookup (especially in C++.)
>
> Actually in C++, it is called "argument dependent name
> lookup", and that is the way the C++ definition text calls
> it. As Andy Koenig has
Hello!
> So, how can you come up with a type class which provides a polymorphic
> 'add' function, considering you don't even know how many parameters
> each data type's individual add function uses?
Very easily: every Haskell function takes only one
argument. Always. Ever.
> For example, say I'
On 27/02/2004, at 1:13 PM, [EMAIL PROTECTED] wrote:
For example, say I'm writing the Data.Complex module; there's a
function in that module "phase :: RealFloat a => Complex a -> a". So,
how do you put this phase function into a type class? Perhaps you
could abstract away from the RealFloat and C
On Fri, 27 Feb 2004 [EMAIL PROTECTED] wrote:
> On 27/02/2004, at 1:13 PM, [EMAIL PROTECTED] wrote:
>
> 1) now I have to manually declare a class definition for every single
> function, and I have to declare it in advance before any module defines
> that function (most serious problem; see below),
"David Bergman" <[EMAIL PROTECTED]> writes:
| > The idea that I've been throwing around is to be able to define a
| > separate namespace for each type; a function can either belong in a
| > "global" (default) namespace, or belong in a particular type's
| > namespace. So, in the above example,
| But in managing this tradeoff, what is faster:
| * constructing/destructing e.g. 16 trees (for a 65000 item table)
| * 2 memcpy of 256 item arrays (perhaps after you primop?)
|
| If the later is not dramatically slower than I
| will bias towards more arrayness.
I doubt the latter is dramatical
> I have always wondered why the module system is not used at
> all in these conventions. I mean, the function names seem to
> come straight from the Haskell 1.2 days when there was no
> module system!
I used the module system in this way in the first version of the HGL
(http://haskell.org/graph
21 matches
Mail list logo