On Mon, Jul 01, 2013 at 05:18:39PM +1200, Richard A. O'Keefe wrote:
On 1/07/2013, at 1:04 PM, Richard Cobbe wrote:
I should have been clearer in my original question: I'm curious about what
to do when a multi-argument function application gets split across lines.
That wiki page dicsusses
Hi,
on a related note: At HaL8 I was wondering how well Haskell would be
suited for a workflow similar to what the go programmers do: Do not
worry about code layout, but let the computer handle it! For more
rationale and examples see
http://golang.org/doc/effective_go.html#formatting
While
Code which is part of some expression should be indented
further in than the beginning of that expression [...]
Yes. Then the next question is how much further in.
My answer is: it does not matter, but make it consistent (like 4 spaces),
with the implication that indentation
On Mon, Jul 01, 2013 at 09:48:42AM +0200, Joachim Breitner wrote:
SNIP
I found https://github.com/jaspervdj/stylish-haskell/ (found via
http://stackoverflow.com/q/6870148/946226) which formats just some very
few aspects of Haskell. Does anyone have a more complete solution? Or is
interested
On Mon, Jul 01, 2013 at 05:18:39PM +1200, Richard A. O'Keefe wrote:
It looked pretty explicit to me:
The golden rule of indentation
...
you will do fairly well if you just remember a single rule:
Code which is part of some expression should be indented
further
Hi,
Am Montag, den 01.07.2013, 07:59 -0400 schrieb Richard Cobbe:
How does the indentation tool know if (a b c) is supposed to be the next
item in the do block, or merely a continuation of the previous application
of f?
I would still expect the developer to write correctly intended Haskell,
-cafe-boun...@haskell.org [haskell-cafe-boun...@haskell.org] on
behalf of Richard Cobbe [co...@ccs.neu.edu]
Sent: Monday, July 01, 2013 8:00 AM
To: haskell-cafe@haskell.org
Subject: Re: [Haskell-cafe] question about indentation conventions
On Mon, Jul 01, 2013 at 05:18:39PM +1200, Richard A. O'Keefe
On Mon, Jul 1, 2013 at 3:43 AM, Tom Ellis
tom-lists-haskell-cafe-2...@jaguarpaw.co.uk wrote:
is OK but
f (g x
y z)
is not.
It seems to me that this means
f x1 x2
x3 x4
is not. The OP was initially asking about this situation.
If you wrote that in a do, the
]
on behalf of Richard Cobbe [co...@ccs.neu.edu]
Sent: Monday, July 01, 2013 8:00 AM
To: haskell-cafe@haskell.org
Subject: Re: [Haskell-cafe] question about indentation conventions
On Mon, Jul 01, 2013 at 05:18:39PM +1200, Richard A. O'Keefe wrote:
It looked pretty explicit to me
On Mon, Jul 1, 2013 at 9:56 AM, Tikhon Jelvis tik...@jelv.is wrote:
I've thought about writing an automatic indenting tool for Haskell (or,
more accurately, a pretty-printer) for another project I have, and this is
the main thing that threw me off. While automatic indentation might make
sense
That's certainly true. As I mentioned, I was actually considering a
*pretty-printer* rather than an automatic indentation tool per se. The end
results are similar, but the pretty-printer is really only the latter part
of the problem: it's predicated on already having a valid AST.
My particular
On 2/07/2013, at 12:00 AM, Richard Cobbe wrote:
Sure. So my first question boils down to which of the two alternatives
below does the community prefer? (To be clear about the intended
semantics: this is the application of the function f to the arguments x, y,
and z.)
f x
y
z
On Sun, Jun 30, 2013 at 07:53:08PM -0400, Richard Cobbe wrote:
Two questions:
And what I've concluded by reading this thread:
1) Are there wide-spread conventions in the Haskell community for how to
indent an application expression that's split across multiple lines?
Well, there's general
I prefer the other style--as do others, evidently (see the example in my
first reply.) I agree that this was a good discussion, but let's not
conclude so easily that the entire community is in favor of one thing or
the other.
On Mon, Jul 1, 2013 at 8:24 PM, Richard Cobbe co...@ccs.neu.edu wrote:
I hope I'm not starting a holy war with this, but I'm curious about an
aspect of coding style that's been bugging me for a while, and I'm not
finding much discussion of this question on the web or in the mailing list
archives.
Two questions:
1) Are there wide-spread conventions in the Haskell
Hi Richard,
This page helped me when starting out:
http://en.wikibooks.org/wiki/Haskell/Indentation
On 2013-06-30 4:55 PM, Richard Cobbe co...@ccs.neu.edu wrote:
I hope I'm not starting a holy war with this, but I'm curious about an
aspect of coding style that's been bugging me for a while,
On Sun, Jun 30, 2013 at 05:41:46PM -0700, Darren Grant wrote:
Hi Richard,
This page helped me when starting out:
http://en.wikibooks.org/wiki/Haskell/Indentation
On 2013-06-30 4:55 PM, Richard Cobbe co...@ccs.neu.edu wrote:
snip
1) Are there wide-spread conventions in the Haskell
The Haskell Style Guide is quite popular:
https://github.com/tibbe/haskell-style-guide/blob/master/haskell-style.md
(accompying
elisp module:
https://github.com/tibbe/haskell-style-guide/blob/master/haskell-style.el)
I am not sure what the verdict is on functions spanning multiple lines,
other
On 1/07/2013, at 1:04 PM, Richard Cobbe wrote:
I should have been clearer in my original question: I'm curious about what
to do when a multi-argument function application gets split across lines.
That wiki page dicsusses how the layout rule interacts with various special
forms (let, where,
Ah, so is the idea, then, to use *op()* when `n` wasn't actually
constructed formally, but rather assembled by the user, so as to match
the type of the accessor function normally supplied as the argument to the
constructor?
On 6/7/2013 4:51 PM, Tom Ellis wrote:
On Fri, Jun 07, 2013 at
Hi All,
Referring to the following, which is taken from the *Control.Newtype
*documentation
page:
op ::
Newtypehttp://hackage.haskell.org/packages/archive/newtype/0.2/doc/html/Control-Newtype.html#t:Newtype
n
o = (o - n) - n -
* David Banas capn.fre...@gmail.com [2013-06-07 07:08:19-0700]
Hi All,
Referring to the following, which is taken from the *Control.Newtype
*documentation
page:
op ::
Newtypehttp://hackage.haskell.org/packages/archive/newtype/0.2/doc/html/Control-Newtype.html#t:Newtype
n
o = (o - n) -
On Fri, Jun 07, 2013 at 07:08:19AM -0700, David Banas wrote:
op ::
Newtypehttp://hackage.haskell.org/packages/archive/newtype/0.2/doc/html/Control-Newtype.html#t:Newtype
n
o = (o - n) - n -
oSourcehttp://hackage.haskell.org/packages/archive/newtype/0.2/doc/html/src/Control-Newtype.html#op
The phantom parameter solves the same problem as scoped type variables.
Granted, if you find yourself in that kind of polymorphic soup you have
deeper problems...
On Jun 7, 2013 2:53 PM, Tom Ellis
tom-lists-haskell-cafe-2...@jaguarpaw.co.uk wrote:
On Fri, Jun 07, 2013 at 07:08:19AM -0700, David
On Fri, Jun 07, 2013 at 04:05:09PM -0400, Joe Q wrote:
The phantom parameter solves the same problem as scoped type variables.
Granted, if you find yourself in that kind of polymorphic soup you have
deeper problems...
I don't understand this. Scoped type variables are used when you want to
On 6/7/2013 4:51 PM, Tom Ellis wrote:
On Fri, Jun 07, 2013 at 04:05:09PM -0400, Joe Q wrote:
The phantom parameter solves the same problem as scoped type variables.
Granted, if you find yourself in that kind of polymorphic soup you have
deeper problems...
I don't understand this. Scoped type
Thanks Richard, now I have my answers.
Richard Eisenberg wrote:
- The type system of Haskell is based on theoretical work that resolutely
assumes that types of non-* kind are uninhabited. While it is possible to
stretch imagination to allow types like 'Zero to be inhabited, the
designers of
Thanks Richard for your detailed answer.
Please find my reply below (note I have rearranged some of your paragraphs).
Richard Eisenberg wrote:
* Types at kind other than * do not have any inhabitants -- in fact, some
people would hesitate to call type-like things at kind other than * types!
On Jun 1, 2013, at 8:18 PM, TP wrote:
In other words, bottom can be an inhabitant of a concrete type, not a type
constructor, which I can understand. But a type of kind Nat is a concrete
type, so why bottom cannot be an inhabitant of this type?
We also have the nice maxim that every
On 6/1/13 3:18 PM, TP wrote:
In other words, bottom can be an inhabitant of a concrete type, not a type
constructor, which I can understand. But a type of kind Nat is a concrete
type, so why bottom cannot be an inhabitant of this type?
The technical term is proper type. That is, types are used
Hi all,
Following a discussion on Haskell Cafe some time ago (1), Roman C. wrote:
On the other hand, the type 'Succ 'Zero has kind 'Nat and doesn't have
any inhabitants — only types of kind * do.
Indeed, this is what seems to occur in the following example:
---
{-#
...@haskell.org] On Behalf Of TP
Sent: 31 May 2013 13:58
To: haskell-cafe@haskell.org
Subject: [Haskell-cafe] question about singletons
Hi all,
Following a discussion on Haskell Cafe some time ago (1), Roman C. wrote:
On the other hand, the type 'Succ 'Zero has kind 'Nat and doesn't have any
* TP paratribulati...@free.fr [2013-05-23 00:34:57+0200]
Hi,
In the program I am trying to write, I have a problem that can be reduced to
the following dummy example:
--
{-# LANGUAGE GADTs #-}
{-# LANGUAGE DataKinds #-}
{-# LANGUAGE KindSignatures #-}
{-#
Roman Cheplyaka wrote:
The rule of thumb is that you should never use IncoherentInstances.
The proper way to do it is:
data Person :: Gender - * where
Person :: String - Person b
Child
:: (PrettyPrint a, PrettyPrint b)
= String - Person a - Person b -
* TP paratribulati...@free.fr [2013-05-23 13:23:36+0200]
Roman Cheplyaka wrote:
The rule of thumb is that you should never use IncoherentInstances.
The proper way to do it is:
data Person :: Gender - * where
Person :: String - Person b
Child
::
Hi,
In the program I am trying to write, I have a problem that can be reduced to
the following dummy example:
--
{-# LANGUAGE GADTs #-}
{-# LANGUAGE DataKinds #-}
{-# LANGUAGE KindSignatures #-}
{-# LANGUAGE FlexibleInstances #-}
{-# LANGUAGE IncoherentInstances #-}
Chris Wong wrote:
data Person :: Gender - * where
Dead :: Person Gender -- WHAT DO I PUT HERE
Alive :: { name :: String
, weight :: Float
, father :: Person Gender } - Person Gender
Here's the problem. In the line:
Dead :: Person Gender
you
On 18 May 2013 11:16, TP paratribulati...@free.fr wrote:
snip
However, I have not managed to make the version with forall work.
Below, the
first occurrence of forall is ok, but the three following yield error.
{-# LANGUAGE GADTs #-}
{-# LANGUAGE
Denis Kasak wrote:
Note that all of this would work even without explicit quantification
since you
have already specified that Person accepts an argument of kind Gender. In
other
words, this works as expected:
data Person :: Gender - * where
Dead :: Person a
Alive :: { name ::
Hi everybody,
I have a question about deriving automatically a Show instance when using
GADT.
It works in this situation:
{-# LANGUAGE GADTs #-}
data Male
data Female
data Person gender where
Dead :: Person gender
Alive :: { name :: String
,
Hi TP,
On 17/05/13 15:32, TP wrote:
| [...]
|
| So I modify my code by removing deriving Show, and adding the line:
|
| instance Show (Person gender)
|
|
| But now, I obtain:
|
| $ runghc test_show.hs
| GHC stack-space overflow: current
Adam Gundry wrote:
[...]
To use standalone deriving, you need to write
deriving instance Show (Person gender)
and everything will work fine. By writing
instance Show (Person gender)
you are instead giving an instance with no methods, and the default
methods in the Show class contain
On Sat, May 18, 2013 at 9:11 AM, TP paratribulati...@free.fr wrote:
So the following version does not work:
[..]
data Person :: Gender - * where
Dead :: Person Gender -- WHAT DO I PUT HERE
Alive :: { name :: String
, weight ::
Hello, cafe.
I have a big problem using builders, so currently I'm using own
builder based on Nettle one [1].
It uses Strict bytestring to build into and unchecked writes, thus
it's very unsafe, plus other
builders/PutM, developed rapidly so I like to switch to another one.
However I use some
From my $0.2 experience, if you are planning of having multiple GHC
installation, it would be better to do a fresh install using the
bootstrapped GHC you can find on the website. Roughly I have done this way
(on my Mac and on My EC2 instance):
(inside a ghc bootstrapped folder)
./configure
I don't think so. However, you can install the OS X binaries for ghc 7.6.2
and make that sit just next to your Haskell Platform install. You can even
use your existing cabal-install to install packages for the freshly
installed ghc by doing 'cabal install foo --with-ghc=/path/to/ghc'. Just
watch
Hi,
I have Haskell Platform with GHC[i] 7.4.2 installed on a MacOS system. There's
a problem with the handling of certain Markdown constructs in literate Haskell
(lines starting with '#') that I understand is fixed in 7.6.2.
Therefore, I'd like to be able to update my GHC installation to
Hi All,
Say I have a haskell function 'f' that does a forkIO and starts an action
a. I create a DLL of this haskell code and inovke f from C. Can I
expect the a to continue to run once f has returned to C?
Regards,
Kashyap
___
Haskell-Cafe mailing
Just to clarify, here is the sample haskell code that I am using -
{-# LANGUAGE ForeignFunctionInterface #-}
module Glue where
import Foreign.C.String
import qualified Control.Concurrent as CC
funHaskell :: CString - IO Int
funHaskell cstr = do
putStrLn Haskell function called
str -
On Thu, Feb 28, 2013 at 6:09 AM, C K Kashyap ckkash...@gmail.com wrote:
Say I have a haskell function 'f' that does a forkIO and starts an action
a. I create a DLL of this haskell code and inovke f from C. Can I
expect the a to continue to run once f has returned to C?
While you're off in C
Quoth C K Kashyap ckkash...@gmail.com,
...
Say I have a haskell function 'f' that does a forkIO and starts an action
a. I create a DLL of this haskell code and inovke f from C. Can I
expect the a to continue to run once f has returned to C?
Once control returns to f's caller, outside of the
Hey Donn .. thanks, it turns out that threads do resume!!! This is how
I got my gmail stuff working.
I only have a doubt if the TCP keep/alive stuff continues to happen or
not
Regards,
Kashyap
On Thu, Feb 28, 2013 at 9:07 PM, Donn Cave d...@avvanta.com wrote:
Quoth C K Kashyap
On 13-02-21 05:18 AM, Doaitse Swierstra wrote:
I ran into the problem that for the packages which I install using
cabal install
The generated html does not contain links to the sources. This issue was raised
before in:
I ran into the problem that for the packages which I install using
cabal install
The generated html does not contain links to the sources. This issue was raised
before in:
http://stackoverflow.com/questions/1587635/haddock-for-cabal-installed-modules
I have been looking into the documentation
On 21 February 2013 21:18, Doaitse Swierstra doai...@swierstra.net wrote:
I ran into the problem that for the packages which I install using
cabal install
The generated html does not contain links to the sources. This issue was
raised before in:
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1
Yes, of course! Stupid me, thanks for pointing that out Daniel.
Now it works as expected.
Florian
On 09/22/2012 12:55 AM, Daniel Peebles wrote:
Shouldn't you have
IxZero :: Ix (CtxCons ty ctx) ty
instead of
IxZero :: Ix ctx ty
On
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1
Hello cafe,
I have the following GADT definitions capturing the simply typed
lambda calculus with de Bruijn indices for variables and explicitly
annotated types for variables:
{-# LANGUAGE GADTs #-}
{-# LANGUAGE KindSignatures #-}
{-# LANGUAGE
Shouldn't you have
IxZero :: Ix (CtxCons ty ctx) ty
instead of
IxZero :: Ix ctx ty
On Fri, Sep 21, 2012 at 8:34 AM, Florian Lorenzen
florian.loren...@tu-berlin.de wrote:
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1
Hello cafe,
I have the following GADT definitions capturing the
Hi experts,
I fear I don't understand how to properly use *Data.IORef*.
I wrote the following code:
1 -- Testing Data.IORef
2 module Main where
3
4 import Data.IORef
5
6 bump :: IORef Int - IO()
7 bump theRef = do
8 tmp - readIORef theRef
9 let tmp2 = tmp + 1
10
theValueRef isn't a pointer to theValue that you can use to somehow change
theValue (which is immutable).
theValueRef is a reference to a box that contains a totally separate,
mutable value.
When you use newIORef to create theValueRef, it's *copying* theValue into
the box. When you mutate
On Fri, Jun 22, 2012 at 5:30 PM, Captain Freako capn.fre...@gmail.com wrote:
12 main = do
13 let theValue = 1
14 print theValue
15 theValueRef - newIORef theValue
16 bump theValueRef
17 return theValue
theValue is a plain old immutable Haskell variable. newIORef
Okay, I get it now. Thanks to all of you for your quick replies!
So, here's what I need to do:
1. My Haskell code gets called by a higher level C function and asked to
initialize itself.
2. As part of that initialization, I'm expected to return a pointer to
an instance of a
On Fri, Jun 22, 2012 at 11:18 AM, Captain Freako capn.fre...@gmail.com wrote:
Okay, I get it now. Thanks to all of you for your quick replies!
So, here's what I need to do:
My Haskell code gets called by a higher level C function and asked to
initialize itself.
As part of that
I know it. I used a sqlite.dll file that is compiled for 32bit, while
my computer is 64bit.
sorry for this stupid question.
On Thu, May 24, 2012 at 10:04 AM, Canhua dreamerat...@gmail.com wrote:
Hi, I made a cabal package that use HDBC-sqlite3 on Windows.
When cabal install it, I got an error
Hi, I made a cabal package that use HDBC-sqlite3 on Windows.
When cabal install it, I got an error from ld.exe: cannot find -lsqlite3.
How can I tell ld.exe where sqlite3.dll is plcaed?
Thanks.
___
Haskell-Cafe mailing list
Haskell-Cafe@haskell.org
Hi!
Thanks to all who responded! I got a lot of information to read and think about.
For now I decided to use stm-channelize as the simplest approach which
seem to be enough.
On Mon, Mar 5, 2012 at 9:50 PM, Alexander V Vershilov
alexander.vershi...@gmail.com wrote:
Hello.
I've also written
Thank you Jason.
On Mon, Mar 5, 2012 at 1:05 PM, Jason Dagit dag...@gmail.com wrote:
I don't know if timeline has been established, but my understanding is
that there is a need for this and that the right people are aware of
it and looking into it.
The GHC trac has a ticket for this:
There is a possibility that the IHG might fund this during the next
cycle, which would mean that it would be in 7.6.1.
Cheers,
Simon
On 05/03/2012 07:35, Jason Dagit wrote:
I don't know if timeline has been established, but my understanding is
that there is a need for this and that
On Mon, Mar 5, 2012 at 2:54 PM, Simon Marlow marlo...@gmail.com wrote:
There is a possibility that the IHG might fund this during the next cycle,
which would mean that it would be in 7.6.1.
Cheers,
Simon
That is very good to hear!!!
Regards,
Kashyap
Hello.
I've also written simple chat server based on conduits and stm channels
https://github.com/qnikst/chat-server/blob/master/src/Main.hs
it has quite similar aproach and maybe this solution can be used together
to have better results.
--
Alexander Vershilov
Sat, Mar 03, 2012 at 02:05:17AM
Hi All,
Can someone please let me know if there is a 64bit target on Windows on the
horizon for GHC?
I am trying to push for changing the current implementation in my
organization in C++ to Haskell - Our primary targets are Windows and Mac.
Not being able to generate 64bit DLL's on Windows would
I don't know if timeline has been established, but my understanding is
that there is a need for this and that the right people are aware of
it and looking into it.
The GHC trac has a ticket for this:
http://hackage.haskell.org/trac/ghc/ticket/1884
On Sun, Mar 4, 2012 at 9:59 PM, C K Kashyap
On Fri, Mar 2, 2012 at 5:19 PM, Paul Graphov grap...@gmail.com wrote:
Hello Cafe!
I am trying to implement networked application in Haskell. It should
accept many
client connections and support bidirectional conversation, that is not
just loop with
Request - Response function but also
Hi,
On Sat, Mar 3, 2012 at 10:38 AM, Gregory Collins g...@gregorycollins.netwrote:
Hi,
The tutorial I gave for CUFP 2011 was a multi-user web chat program using
the Snap Framework. STM channels make this kind of problem super-easy to
deal with. Don't be afraid of forking lots of Haskell
On Sat, Mar 3, 2012 at 12:50 PM, Alp Mestanogullari alpmes...@gmail.comwrote:
That's exactly what I would have needed, several times in the past 2
years. I've been wondering about a good way to abstract this to have a
library where you'd just plug your business logic and thus not have to
care
Hello Cafe!
I am trying to implement networked application in Haskell. It should accept many
client connections and support bidirectional conversation, that is not
just loop with
Request - Response function but also sending notifications to clients etc.
NB: I came from C++ background and used to
Hello, Paul.
It seems you should not use 3 threads, but run in a data-driven behaviour with
one thread per client.
You can take a look at network-conduit [1] example, there is a very good aproach
to tcp-network application. There are some iteratee based examples but they are
not so extensible.
On Fri, Mar 2, 2012 at 3:04 PM, Alexander V Vershilov
alexander.vershi...@gmail.com wrote:
Hello, Paul.
It seems you should not use 3 threads, but run in a data-driven behaviour with
one thread per client.
I don't think this will work for Paul's situation. He needs to be
able to send
Fri, Mar 02, 2012 at 07:34:41PM -0500, Joey Adams wrote
On Fri, Mar 2, 2012 at 3:04 PM, Alexander V Vershilov
alexander.vershi...@gmail.com wrote:
Hello, Paul.
It seems you should not use 3 threads, but run in a data-driven behaviour
with
one thread per client.
I don't think this
On Fri, Mar 2, 2012 at 7:34 PM, Joey Adams joeyadams3.14...@gmail.com wrote:
I'll try to put together a simple chat server example, like the one I
wrote for stm-channelize.
Here it is:
https://github.com/joeyadams/haskell-chat-server-example
See, in particular, the serveLoop function.
Hello, cafe.
Is it possible to read data from different concurrent sources,
i.e. read data from source as soon as it become avaliable, e.g.
runResourceT $ (source1 stdin $= CL.map Left)
= (source2 handle $= CL.map Right)
$= application
$$ sink
On Tue, Feb 28, 2012 at 6:04 PM, Alexander V Vershilov
alexander.vershi...@gmail.com wrote:
Hello, cafe.
Is it possible to read data from different concurrent sources,
i.e. read data from source as soon as it become avaliable, e.g.
runResourceT $ (source1 stdin $= CL.map Left)
First of all, I'd probably name that operator =, since = is Kleisli
composition in Control.Monad.
Second, you're going to need new threads for this, since you'll be reading
from two sources concurrently. This isn't as big a problem as you might
think, because Haskell threads are dirt cheap,
Finally, I've uploaded a new version of stm-conduit [1] with these
combinators included. You should cabal update and then cabal install
stm-conduit to get the latest version, and now you can vertically compose
your sources!
Regards,
- clark
[1]
Hello.
Naming operator = instead of = is a good idea.
But this functions are looks very good and will make code easier to understand.
Also I'll try using non-STM channel (as Michael adviced) because in such a task
I don't need all STM power.
Thanks for response.
--
Alexander
Tue, Feb 28,
hi, I am cabal-installing webkit hackage on windows, and get a error:
pkg-config pckage webkit-1.0 version 1.1.15 is required but could
be not found
What should I next? install webkit? How to? I find there is a
webkitgtk+ project.
Which one should I install.
I have try to install both of them
Nevermind, I just realised I got something mixed up. Sorry to bother you.
--
View this message in context:
http://haskell.1045720.n5.nabble.com/question-regarding-Data-Array-Accelerate-tp5476144p5476586.html
Sent from the Haskell - Haskell-Cafe mailing list archive at Nabble.com.
Hi,
I have read the papers about the accelerate package that provides a
high-level interface to nvidia's cuda library and am very intrigued.
However, I have some start-up problems. Is this the right place for such
questions?
In particular, I'm having trouble with lifting and unlifting. From
In this excerpt from the `StateArrow' page:
runState ::
Arrowhttp://hackage.haskell.org/packages/archive/base/4.2.0.2/doc/html/Control-Arrow.html#t:Arrowa
=
StateArrowhttp://hackage.haskell.org/packages/archive/arrows/0.4.1.2/doc/html/Control-Arrow-Transformer-State.html#t:StateArrows
a
*e* b -
On 17 October 2011 23:59, Captain Freako capn.fre...@gmail.com wrote:
In this excerpt from the `StateArrow' page:
runState :: Arrow a = StateArrow s a e b - a (e, s) (b, s)Source
what's the significance of having written StateArrow s a e b, instead of
StateArrow s a b c?
In the context of
On Mon, Oct 17, 2011 at 5:32 PM, Conrad Parker con...@metadecks.org wrote:
On 17 October 2011 23:59, Captain Freako capn.fre...@gmail.com wrote:
In this excerpt from the `StateArrow' page:
runState :: Arrow a = StateArrow s a e b - a (e, s) (b, s)Source
what's the significance of having
Captain Freako capn.fre...@gmail.com wrote:
Encapsulating an automaton by running it on a stream of inputs,
obtaining a stream of outputs.
Typical usage in arrow notation:
proc p - do
...*ys - (|runAutomaton (\x - ...)|) xs*
Here xs refers to the input
Captain Freako (quoting Control.Arrow.Transformer.Automaton):
Encapsulating an automaton by running it on a stream of inputs, obtaining a
stream of outputs.
Typical usage in arrow notation:
proc p - do
...
ys - (|runAutomaton (\x - ...)|) xs
Here
Hi all,
In this excerpt from the
Automatonhttp://hackage.haskell.org/packages/archive/arrows/0.4.1.2/doc/html/Control-Arrow-Transformer-Automaton.html#t:Automatonpage:
runAutomaton ::
(ArrowLoopChttp://hackage.haskell.org/packages/archive/base/4.2.0.2/doc/html/Control-Arrow.html#t:ArrowLoopa,
Am 08.10.2011 16:04, schrieb Captain Freako:
Hi all,
In this definition from the Parsec library:
parse :: (Stream s Identity t)
= Parsec s () a - SourceName - s - Either ParseError a
parse p = runP p ()
what's the significance of `Identity t'?
(`t' isn't used
On 10/08/2011 12:46 PM, Jan-Willem Maessen wrote:
On Fri, Oct 7, 2011 at 2:46 PM, Brandon Moorebrandon_m_mo...@yahoo.com wrote:
Margnus Carlsson did something monadic several years ago.
http://dl.acm.org/citation.cfm?doid=581478.581482
Perhaps there is an implementation on Hackage or on his
David Barbour wrote:
Heinrich Apfelmus wrote:
Even then, events and behaviors are one abstraction level too low. In my
opinion, you are better off with a library/approach geared directly towards
incremental computations.
I believe behaviors are precisely the 'right' abstraction if the goal is
Hi all,
In this definition from the Parsec library:
parse :: (Stream s Identity t) = Parsec s () a - SourceName -
s - Either ParseError aparse p = runP p ()
what's the significance of `Identity t'?
(`t' isn't used anywhere.)
Thanks,
-db
___
On Fri, Oct 7, 2011 at 2:46 PM, Brandon Moore brandon_m_mo...@yahoo.com wrote:
Margnus Carlsson did something monadic several years ago.
http://dl.acm.org/citation.cfm?doid=581478.581482
Perhaps there is an implementation on Hackage or on his website.
This stuff also goes by the moniker
If I have this right, Stream is a monad transformer.
Stream s m t means that it parses 's', is stacked with monad 'm' and has a
result of type 't'
So Identity is a monad, the simplest monad, defined as such:
newtype Indentity t = Identity { runIdentity :: t }
It's the identity monad, that does
1 - 100 of 413 matches
Mail list logo