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
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
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
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
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) ) -
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
> 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
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
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,
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
> 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
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
> > 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
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
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.
| >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
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
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
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
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
-
> 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 :: [
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
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
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
24 matches
Mail list logo