On Sat, Jun 16, 2012 at 3:47 AM, Dan Burton wrote:
>
> Convenience aside, doesn't the functor instance conceptually violate some
> sort of law?
>
> fmap (const 1) someSet
>
> The entire shape of the set changes.
>
> fmap (g . h) = fmap g . fmap h
>
> This law wouldn't hold given the following con
Parsec is a monadic combinator library that is well-documented, simple
to use, and produces good error messages. Parsec is not inherently
lazy/incremental and is not well-suited to handling large quantities
of simply formatted data. Parsec 3 adds to Parsec the ability to use
Parsec as a monad tr
On Tue, 2008-08-26 at 19:01 +0400, Bulat Ziganshin wrote:
> Hello Ashley,
>
> Monday, August 25, 2008, 3:12:18 AM, you wrote:
>
> > Is there any interest in implementing a top level "<-" to run monadic code?
>
> yes, definitely. as it's hard to develop "real" app w/o using global
> vars, h98 sti
This is a first release of the Parsec 3, the Google Summer of Code of
Paolo Martini.
The main changes are:
* The Parser monad has been generalized into a ParserT monad
transformer.
* The parsers have been generalized to work over a stream of any
type, in particular, w
On Wed, 2008-01-16 at 09:18 +, J.N. Oliveira wrote:
> On Jan 16, 2008, at 2:08 AM, Bruno Oliveira wrote:
>
> > Hello,
> >
> > I have been playing with ghc6.8.1 and type families and the
> > following program is accepted without any type-checking error:
> >
> >> data a :=: b where
> >>Eq
On Sun, 2007-11-18 at 12:11 -0800, Iavor Diatchki wrote:
> Hello,
>
> I was playing around with "bang patterns" and I noticed that
> when combined with asynchronous exceptions they can lead to
> programs where the order of the declarations in a binding
> group is important! Here is an example:
>
[Reply-To set to Haskell-Cafe]
At http://www.haskell.org/haskellwiki/AmeroHaskell is a page for a
proposed Haskell meeting originally aimed for the south eastern United
States. Quite a few people registered interest, but few of them were in
the SE. This email is to prompt any more interest in su
On Thu, 2007-07-12 at 12:49 -0400, Doug McIlroy wrote:
> For lovers of things small and beautiful,
> http://www.cs.dartmouth.edu/~doug/powser.html
> boils down basic operations on power series with numeric
> coefficients to the bare minimum--each is a one-liner.
> Included are overloaded arithmeti
Dirk Kleeblatt wrote:
apfelmus wrote:
Note that even currently, your operations cannot be strict in the
address a label refers to because this may be determined later than the
first use of the label. In other words, your example code
fac = do
[...]
(1) jmp loopTest
[...]
(2) loopTest
Ryan Ingram wrote:
[EMAIL PROTECTED] is better for this type of question. Follow-up is set
to it.
Here's a test case for the problem I'm having; I'm using runhaskell from
ghc v6.6.
Problem #1) Without -fallow-undecidable-instances, I get the following
error:
Constraint is no smaller
Albert Y. C. Lai wrote:
Derek Elkins wrote:
And then you come to Haskell and you -can- say, "Give me the something
that is not there yet."
Please give me the libraries that are not there yet! *duck*
We wait for people to need the libraries, then a large amount of delayed work
Tony Morris wrote:
mike clemow wrote:
Troy,
As a Java chimp embarking on the Haskell journey myself, I'd be
interested in hearing about specific ways that learning Haskell has
changed the way you program Java. How do you employ the "very
interesting concepts" that you have learned through your
Casey Hawthorne wrote:
You may find the following comment interesting.
"The mythos of type systems is that they help the programmer. But the
reality is compiler and hardware design. Not simply that a fantasy
type system is harder to implement, but that a restricted language is
easier to implem
Wolfgang Jeltsch wrote:
Am Donnerstag, 15. März 2007 03:23 schrieb Daniel Mahler:
Is there any way for the same type to implement a typeclass multiple ways.
You can wrap the type using newtype, thus creating a new type which can
implement type class methods differently.
This technique is so
On Fri, 15 Apr 2005 12:03:01 -0400
ChrisK <[EMAIL PROTECTED]> wrote:
> You are correct. Moand.Cont yield even runs without -O optimizing,
> just slower:
>
> Monad.Writer counts 10^9 zeros in 99 seconds (user time)
> Monad.Cont counts 10^8 zero in 35 seconds user time.
> So the writer is 3.5 tim
> for my diploma thesis, I need to find information about integration of
> functional and imperative programming concepts. Could somebody of you
> point me to good websites, papers, etc. about this topic?
You haven't been too specific about what kinds of things you are looking
for. One thing tha
On Sat, 14 Feb 2004 15:25:07 -
"Stenio" <[EMAIL PROTECTED]> wrote:
> I need to convert some scripts (hs) to lhs (literate script) and lhs
> (literate script) to hs using GHC. Can someone help me.
GHC comes with an unlit program that will convert lhs to hs files,
there's probably also some fla
> On Tue, 30 Dec 2003 23:14:05 +0100, Wolfgang Jeltsch
> <[EMAIL PROTECTED]> wrote:
[replying indirectly because the original email doesn't seem to have
gotten here yet]
> > I have an algorithm which updates one or more arrays in a loop. The
> > update operations depend on the (old) contents of
On Tue, 30 Dec 2003 10:38:33 -0800 (PST)
Ben Rudiak-Gould <[EMAIL PROTECTED]> wrote:
> On Tue, 30 Dec 2003, Scott wrote:
> > Why does Haskell have no continuations?
> > (http://www.haskell.org/hawiki/CoMonad)
> > If continuations are incompatible with non-strict semantics, I'd
> > appreciate an e
On Tue, 09 Dec 2003 10:51:08 +
Graham Klyne <[EMAIL PROTECTED]> wrote:
> At 15:52 08/12/03 -0500, Derek Elkins wrote:
> > > What Haskell byte code projects are out there?
> >
> >The most obvious is the LVM. See Helium though the LVM is not tied
> >to it.
On Mon, 8 Dec 2003 20:59:53 +0100
Wolfgang Jeltsch <[EMAIL PROTECTED]> wrote:
> Am Montag, 8. Dezember 2003 15:13 schrieb Tomasz Zielonka:
> > [...]
>
> > Even in unoptimized, byte-code compiled code?
>
> Does GHCi use byte code internally?
Yes.
> What Haskell byte code projects are out there
On Mon, 8 Dec 2003 15:37:46 +1100
Fergus Henderson <[EMAIL PROTECTED]> wrote:
> On 05-Dec-2003, Derek Elkins <[EMAIL PROTECTED]> wrote:
> > "Abraham Egnor" <[EMAIL PROTECTED]> wrote:
> > > I've occasionally wanted some sort of equivalent of an
On Wed, 03 Dec 2003 15:10:07 -0500
"Abraham Egnor" <[EMAIL PROTECTED]> wrote:
> I've occasionally wanted some sort of equivalent of an instanceOf
> function in haskell, i.e. one that would let me define a function that
> could dispatch on the type of its argument as well as the value. One
> optio
On Thu, 27 Nov 2003 14:19:53 +
Malcolm Wallace <[EMAIL PROTECTED]> wrote:
> > > Is there a list of problems anywhere with using trace? For
> > > example does it affect evaluation order?
>
> Apart from changing the evaluation order of expressions, trace has
> other drawbacks, noted I think b
On Thu, 13 Nov 2003 16:06:24 -0500
"Abraham Egnor" <[EMAIL PROTECTED]> wrote:
Sorry that I'm too lazy to download the the tar.bz2 and see for myself,
but...
> that applies those functions to a monadic reference. Instances for
> MRef are provided for both IORef and STRef.
Assuming MRef is li
On Thu, 16 Oct 2003 21:31:26 -0400
"Feingold, Jason (WingspanTech)" <[EMAIL PROTECTED]> wrote:
[You may want to set your email program to wrap lines on sending and
send just plain-text.]
> I infer from a discussion from March 2002 that concurrency in Haskell
> is not implemented in native threads
On Thu, 02 Oct 2003 12:47:15 +0200
Lennart Augustsson <[EMAIL PROTECTED]> wrote:
> Alastair Reid wrote:
>
> >>Another question with a trivial answer, what is the result of:
> >>
> >> main :: IO (IO ())
> >> main = return (putStr "Hello World!")
> >
> >
> > It is a computation which, if execut
On Thu, 25 Sep 2003 12:59:37 -0700
Mark Tullsen <[EMAIL PROTECTED]> wrote:
> Haskell has lazy/lifted products and not true products.
Aren't lazy products true products? What makes something a product is:
fst (x,y) = x
snd (x,y) = y
for all x and y. This holds with lazy products but not eager
On Tue, 16 Sep 2003 23:28:43 -0700
Ashley Yakeley <[EMAIL PROTECTED]> wrote:
> In article <[EMAIL PROTECTED]>,
> Derek Elkins <[EMAIL PROTECTED]> wrote:
>
> > > I don't think this type is an arrow. For a "product arrow", i.e.
> > > an
On Tue, 16 Sep 2003 14:32:48 -0500
"Yu Di" <[EMAIL PROTECTED]> wrote:
> What I am trying to do is to use Haskell to simulate some process, and
> meanwhile collecting information about the data-flow throughout the
> whole process into the output. The (String, a) example is just a
> simplified versi
On Tue, 16 Sep 2003 01:52:03 -0700
Ashley Yakeley <[EMAIL PROTECTED]> wrote:
> In article <[EMAIL PROTECTED]>,
> "Yu Di" <[EMAIL PROTECTED]> wrote:
Replying to both:
> > Hi, I want to create an arrow which is essentially
> >
> > data MyArrow a b = MyArrow ((String, a) -> (String,b))
>
> I don
On Sun, 14 Sep 2003 00:30:40 +0200
Marcin 'Qrczak' Kowalczyk <[EMAIL PROTECTED]> wrote:
> Dnia pi_ 12. wrze_nia 2003 20:31, Iavor Diatchki napisa_:
>
> > what do people think should be the tokens produced by a haskell
> > lexer when applied to the following input:
> >
> >A...
>
> A (construc
On Wed, 20 Aug 2003 08:25:39 -0700
"Hal Daume" <[EMAIL PROTECTED]> wrote:
> I use my 'DynamicMap' type to handle this sort of thing. However, I
> don't really recommend this approach unless you're very careful. You
> basically lose out on all nice type checking properties and enter a
> world of
On Mon, 18 Aug 2003 10:03:45 +1000
"Trouble ..." <[EMAIL PROTECTED]> wrote:
> Hi!
>
> I'm new to this whole programming thing, and I was wondering if
> someone can help me out with the following question:
>
> How do I translate a string into an integer. For example, I need to
> know how to trans
On Wed, 6 Aug 2003 23:24:13 +0200
"Fredrik Petersson" <[EMAIL PROTECTED]> wrote:
> Hi there!
> Iam new to the list so feel free to shout at me when i do wrong! :)
> Software-designer from sweden, likes fast bikes and metal, thats me,
> and hi to you all!
>
> Yeah ok to the problem,
> i have this
I kinda think someone mentioned this, perhaps even you. Or maybe I'm
thinking of something else. As I'm feeling too lazy to check the
archives, at the risk of saying something stupid or repeating something
said, you may want to look at named instances (google should turn
something up with a littl
On Sun, 3 Aug 2003 08:01:52 -0700 (PDT)
Ben Rudiak-Gould <[EMAIL PROTECTED]> wrote:
> On Sat, 2 Aug 2003, Derek Elkins wrote:
>
> > Ben Rudiak-Gould <[EMAIL PROTECTED]> wrote:
> >
> > > More recently, I've realized that I really don't underst
On Sat, 2 Aug 2003 00:45:07 -0700 (PDT)
Ben Rudiak-Gould <[EMAIL PROTECTED]> wrote:
> When I first learned about implicit parameters I thought they were a
> great idea. The honeymoon ended about the time I wrote some code of
> the form"let ?foo = 123 in expr2", where expr2 used ?foo implicitly,
>
On Fri, 1 Aug 2003 12:02:00 +0200
Tomasz Zielonka <[EMAIL PROTECTED]> wrote:
> On Thu, Jul 31, 2003 at 05:15:33PM -0400, Derek Elkins wrote:
> > On Thu, 31 Jul 2003 13:18:40 -0700
> > "Hal Daume" <[EMAIL PROTECTED]> wrote:
> >
> > > so, my q
On 01 Aug 2003 09:44:14 +0200
Peter Thiemann <[EMAIL PROTECTED]> wrote:
> I recently had my first exposure to Haskell's FFI when I was trying to
> compute MD5 and SHA1 hashes using the existing C implementations. In
> each case, the idea is to make the hash function available as function
>
> > md
Throughout this message you imply, if not outright state, that Dynamics
requires unsafeCoerce/unsafePerformIO. This is simply not the case.
GHC implements Dynamics with unsafeCoerce, or did last time I checked,
but it can easily be implemented using only existentials. (I presume
that this decisio
On Thu, 31 Jul 2003 13:18:40 -0700
"Hal Daume" <[EMAIL PROTECTED]> wrote:
> so, my questions are: does this exist in some other form I'm not aware
> of? is there something fundamentally broken about this (sorry for the
> pun)? any other comments, suggestions?
This looks like a bizarre rendition
On Fri, 18 Jul 2003 18:29:35 +0800
"Liu Junfeng" <[EMAIL PROTECTED]> wrote:
> Hi__
> If there is a function named "func" with type a->b in a win32 dll
> file. In Hugs use the primitive declaration:
> ---
> primitive prim_func :: a -> b
> func = prim_func
> ---
On Tue, 8 Jul 2003 23:16:33 -0300
"Andre W B Furtado" <[EMAIL PROTECTED]> wrote:
> Is it possible replace the question mark in the following code in
> order to make defaultMyType return a "don't care" value for b?
>
> data MyType t = MyType { a :: Int, b :: t}
>
> defaultMyType :: MyType
> defau
On Fri, 27 Jun 2003 12:22:46 +0400
"Serge D. Mechveliani" <[EMAIL PROTECTED]> wrote:
> Dear Haskellers,
>
> Once I wrote a function
>
> f' :: Int -> Int -> Int -> (Int, Int)
>
> f' n m l = let (d,k) = (gcd n m, quot n d) in (k, l*k)
>
> (the simplified version of real program),
> placin
On Thu, 19 Jun 2003 18:05:11 +0200
Christian Sievers <[EMAIL PROTECTED]> wrote:
> Derek Elkins wrote:
>
> > > flist :: [a->b] -> a -> [b]
> > > flist fs a = map (flip ($) a) fs
> > or much nicer (IMO)
> > flist fs a = map ($
On Tue, 17 Jun 2003 21:01:57 +0100
Graham Klyne <[EMAIL PROTECTED]> wrote:
> I'm convinced I've seen a function like this somewhere:
>[a->b] -> a -> [b]
> but cannot remember where. Or maybe:
>Monad m => m (a->b) -> a -> m b
> ?
>
> I could roll my own (*), but I'm trying not to duplicat
On Tue, 17 Jun 2003 09:07:06 +0100
Alastair Reid <[EMAIL PROTECTED]> wrote:
> On Tuesday 17 June 2003 2:33 am, Abraham Egnor wrote:
> > I'd like to make a haskell binding for a C++ library. Most of the
> > tools out there seem oriented towards c bindings, so it looks like
> > I'll be writing the
On Wed, 11 Jun 2003 20:00:00 +0200
Filip <[EMAIL PROTECTED]> wrote:
> I have a question :)
> What should I do if I have something like "IO Bool" and I need "Bool"
> ??
Read the "Gentle Introduction"
http://www.haskell.org/tutorial/
___
Haskell mailing
On Wed, 11 Jun 2003 09:19:46 +0200 (MET DST)
Koen Claessen <[EMAIL PROTECTED]> wrote:
> Derek Elkins wrote:
>
> | The question (at least to me) is more, 'you can
> | satisfy the RefMonad interface with STRefs or IORefs,
> | but those use "imperative" fea
On Tue, 10 Jun 2003 11:44:45 -0700 (PDT)
[EMAIL PROTECTED] wrote:
>
> > update :: (Typable b) => FM k -> Key k a -> b -> (FM ...)
>
> I didn't know constraints on values are allowed... Given below is the
> implementation of the required interface, in Haskell98
They aren't presumably as that wo
On Wed, 04 Jun 2003 15:19:53 -0700
Ashley Yakeley <[EMAIL PROTECTED]> wrote:
> In article <[EMAIL PROTECTED]>,
> [EMAIL PROTECTED] wrote:
>
> > Ashley Yakeley wrote:
> > ] ] Is it possible to actually implement a working instance of
> > RefMonad in ] ] Haskell, without making use of a built-in m
On Fri, 30 May 2003 00:00:26 -0500
"Tim Sweeney" <[EMAIL PROTECTED]> wrote:
> Hi Derek,
>
> How can one implement RefMonad below directly in Haskell?
>
> class Monad m => RefMonad m r | m -> r where
> newRef :: a -> m (r a)
> readRef :: r a -> m a
> writeRef :: r a -> a -> m ()
>
>
On Thu, 29 May 2003 22:48:05 -0500
"Tim Sweeney" <[EMAIL PROTECTED]> wrote:
> If it's not possible to implement a typesafe RefMonad instance
> directly in Haskell, without making use of built-in imperative
> features like IO, then doesn't this refute the claims that monads
> implement imperative f
54 matches
Mail list logo