[Haskell] Re: [Haskell-cafe] ANN: hsparql, a SPARQL query generator/DSL and client

2009-07-09 Thread Nicolas Pouillard
Excerpts from Jeff Wheeler's message of Thu Jul 09 00:27:51 +0200 2009: > I'm excited to announce the first version of hsparql. HSparql makes it > easy to query SPARQL-compliant servers using a relatively intuitive DSL > and very simple client. I've looked at your DSL

[Haskell] ANN: hsparql, a SPARQL query generator/DSL and client

2009-07-08 Thread Jeff Wheeler
I'm excited to announce the first version of hsparql. HSparql makes it easy to query SPARQL-compliant servers using a relatively intuitive DSL and very simple client. SPARQL is a SQL-ish query language for stores of RDF data. So, SPARQL lets you search the structured data in several big data

Re: typing query

2003-02-22 Thread Janis Voigtlaender
Amit Garg wrote: > > Hey all. > > I am trying to declare a read-only state monad and a read-write state > monad, so as to distinguish between methods on a data type that are > read-only vs. read-write. > > This is the best I could come up with: > > newtype ST s a = ST ( s -> (s,a) ) -- read-onl

Re: typing query

2003-02-21 Thread Iavor S. Diatchki
hi, the read only "state" monad is usually called "environment", or "reader" monad. since it is goind to be "read-only" there is no need to return a new state in the result (as it would presumably be the same as the input state). so the type becomes: newtype Env e a = E (e -> a) for somethi

typing query

2003-02-20 Thread Amit Garg
Hey all. I am trying to declare a read-only state monad and a read-write state monad, so as to distinguish between methods on a data type that are read-only vs. read-write. This is the best I could come up with: newtype ST s a = ST ( s -> (s,a) ) -- read-only newtype SW s a = SW ( s -> (s,a) ) -

Re: query about precedence: "$", the lazy function application operator

2002-05-30 Thread Arjan van IJzendoorn
Hi Mark, > Suppose I have functions > > f :: Int -> Int > f x -> x * x I suppose you mean: f x = x * x > g :: Int -> Int > g x -> x + 1 > > The lazy application operator "$" allows me to do: > > f $ g x > > instead of > > f (g x) > > But I don't understand why it w

Re: query about precedence: "$", the lazy function application operator

2002-05-30 Thread Johannes Waldmann
> f $ g x using the notations from http://haskell.org/onlinereport/lexemes.html, `f' and `g' are varids, while `$' is a conid. see also http://haskell.org/onlinereport/exps.html, `f $ g x' is parsed as exp -> exp qop exp -> exp qop ( fexp ) -> exp qop (fexp axep) (regardless of prece

query about precedence: "$", the lazy function application operator

2002-05-30 Thread Mark Phillips
Hi, As I understand it, function application has highest precedence (10 even!) whereas $, the operator which does the same thing, has lowest precedence (0 even!). But there's something that doesn't make sense to me. Suppose I have functions f :: Int -> Int f x -> x * x g :: Int

FW: Another H'98 Report query

2002-02-13 Thread Simon Peyton-Jones
llace [mailto:[EMAIL PROTECTED]] Sent: 31 January 2002 11:08 To: Haskell list Subject: Another H'98 Report query The revised H'98 Report, in the section on Modules, 5.2 (Export Lists), under the description of the forms T (c_i,...) and C (f_i,...) for explicitly named constructors, fieldnames,

Re: Another H'98 Report query

2002-01-31 Thread Iavor S. Diatchki
hi again, On Thursday 31 January 2002 10:18 am, Malcolm Wallace wrote: > > disallowing all duplicates seems tricky. is there a duplicate here: > > > > module A (f, module M) where > > import M(f) > > Yes, there is a duplicate here. Strangely enough, hbc does not report > this as an error, even

Re: Another H'98 Report query

2002-01-31 Thread Malcolm Wallace
> disallowing all duplicates seems tricky. is there a duplicate here: > > module A (f, module M) where > import M(f) Yes, there is a duplicate here. Strangely enough, hbc does not report this as an error, even though it refuses to compile the following very similar case: module A (f, module

Re: Another H'98 Report query

2002-01-31 Thread Iavor S. Diatchki
hi On Thursday 31 January 2002 03:53 am, Malcolm Wallace wrote: > > > I see no reason to disallow duplicates at the subordinate level if > > > they are permitted otherwise. > > > > Well, disallowing duplicates here may improve error detection, > > catching some unintentional typos and cut-and-pas

Re: Another H'98 Report query

2002-01-31 Thread Malcolm Wallace
> > I see no reason to disallow duplicates at the subordinate level if > > they are permitted otherwise. > > Well, disallowing duplicates here may improve error detection, > catching some unintentional typos and cut-and-paste errors. By the same argument, we should disallow *all* duplicates, for

Re: Another H'98 Report query

2002-01-31 Thread Fergus Henderson
On 31-Jan-2002, Malcolm Wallace <[EMAIL PROTECTED]> wrote: > The subordinate names c_i (f_i) must not contain duplicates. > > Yet later in the text it is stated that > > Exports lists are cumulative: the set of entities exported by an > export list is the union of the entities export

Another H'98 Report query

2002-01-31 Thread Malcolm Wallace
The revised H'98 Report, in the section on Modules, 5.2 (Export Lists), under the description of the forms T (c_i,...) and C (f_i,...) for explicitly named constructors, fieldnames, and methods of the respective type or class, says: The subordinate names c_i (f_i) must not contain duplicates.

RE: dependent type query

2002-01-20 Thread Simon Peyton-Jones
| >Furthermore, I can't even write: | > | >data (MyClass f a) => MyData2 f = MyData2 f | | Well now this is odd. I had no trouble simulating it with this: | | data MyData2 f = MyData2 f | | mkMyData2 :: (MyClass f a) => f -> MyData2 f | mkMyData2 = MyData2 | | Looks like extended Haskel

Re: dependent type query

2002-01-18 Thread Ashley Yakeley
At 2002-01-18 12:01, Hal Daume III wrote: >class MyClass f a | a -> f, f -> a where ... > >I want to write a data type: > >data (MyClass f a) => MyData f = MyData (f, a) > >But this doesn't seem to be valid because "a" isn't in scope. Class constraints in 'data' declarations only affect the type

dependent type query

2002-01-18 Thread Hal Daume III
Suppose I have the following definition: class MyClass f a | a -> f, f -> a where ... I want to write a data type: data (MyClass f a) => MyData f = MyData (f, a) But this doesn't seem to be valid because "a" isn't in scope. But a is uniquely determined by f. What gives? Furthermore, I can't

Re: frp neophyte query (franTk specific)

2001-07-27 Thread Amit Garg
Hehe ...i figured it out :) Essentially followed the thread of logic outlined in the 'fix' for the 'remainder' problem by Lars. Thanks! btw, would it be correct to say that 'fixIO' is used to create unbounded loops without using run-time recursion? Or that its a way of telling the compiler not to

frp neophyte query (franTk specific)

2001-07-26 Thread Amit Garg
Hi. Ive been trying to play with the functional reactive framework provided with franTk (i've also seen www.haskell.org/frp). In this context, i wanted to create an event stream to drive my programs ... i could not get 'toStream time' to work. My solution works essentially using this: wi

RE: Query

2000-08-03 Thread Chris Angus
- > From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]] > Sent: 03 August 2000 16:21 > To: [EMAIL PROTECTED] > Subject: Query > > > > Hi, > > Would mind asnswring the following : > > Write a Haskell function tupleSum of type > > tupleSum :: [

Query

2000-08-03 Thread mohamed_hassan
Hi, Would mind asnswring the following : Write a Haskell function tupleSum of type tupleSum :: [Int]-- (Int, Int) that given a list of integers: @separetes all negatives from the list and then add -1 to each element of this sub-list; @sum all elements of the list of negatives and sum

Query re gcd() in Haskell 98

1999-02-01 Thread michael abbott
It seems a bit late to raise this, but I notice that the standard prelude for Haskell 98 in the final draft still defines gcd 0 0 = error ... I remember some inconclusive discussion on this some time ago, but there is no reason not to let gcd 0 0 == 0, as would happen anyway without speci

RE: Query re gcd() in Haskell 98

1999-02-01 Thread Simon Peyton-Jones
x27;re past that point. Simon > -Original Message- > From: michael abbott [mailto:[EMAIL PROTECTED]] > Sent: Monday, February 01, 1999 10:47 AM > To: Simon Peyton-Jones > Cc: [EMAIL PROTECTED] > Subject: Query re gcd() in Haskell 98 > > > It seems a bit late to ra