On 02/01/2012 06:12, Arseniy Alekseyev wrote:
I don't know what to actually do with this after putting it in a *.lhs file.
You can :load *.lhs into ghci the same way you load .hs-files.
I swear I tried this before, but now it suddenly works.
Must be the chaos of stupid random assumptions
I want to write a function whose behavior is as follows:
foo string1\nstring2\r\nstring3\nstring4 = [string1,
string2\r\nstring3, string4]
Note the sequence \r\n, which is ignored. How can I do this?
___
Haskell-Cafe mailing list
Doesn't the function lines handle different line-endings?
(In the Prelude and in Data.List)
If not, doing this with parsec would be easy (yet maybe slightly
overkill...)
2012/1/2 max m...@mtw.ru
I want to write a function whose behavior is as follows:
foo
В Mon, 2 Jan 2012 10:45:18 +0100
Yves Parès limestr...@gmail.com пишет:
Prelude lines string1\nstring2\r\nstring3\nstring4
[string1,string2\r,string3,string4]
Doesn't the function lines handle different line-endings?
(In the Prelude and in Data.List)
If not, doing this with parsec would be
Doesn't the function lines handle different line-endings?
(In the Prelude and in Data.List)
It does not ignore \r\n.
Cheers,
Simon
___
Haskell-Cafe mailing list
Haskell-Cafe@haskell.org
http://www.haskell.org/mailman/listinfo/haskell-cafe
Conal Elliott cites Steve Horne:
I look at this World parameter as purely hypothetical, a trick
used to gain an intuition. Whereas Jerzy (I think) uses it to
claim Haskell is referentially transparent - those differing x and
y values come from different worlds, or different
We are happy to announce that the next Dutch functional programming day will
take place on January 6, 2012, at the university campus de Uithof of Utrecht
University.
The program, participants registered thus far, and further details can be found
at:
Am 02.01.2012 10:44, schrieb max:
I want to write a function whose behavior is as follows:
foo string1\nstring2\r\nstring3\nstring4 = [string1,
string2\r\nstring3, string4]
Note the sequence \r\n, which is ignored. How can I do this?
replace the sequence by something unique first, i.e. a
A perhaps acceptable notion of the property we want (purity etc.) is
that all the extensions of the purely functional core language of Haskell
(say the lazy lambda calculus extended with data constructors, etc) are
_conservative_, that is all the equations that hold
in the pure core language
On 02/01/2012 09:44, max wrote:
I want to write a function whose behavior is as follows:
foo string1\nstring2\r\nstring3\nstring4 = [string1,
string2\r\nstring3, string4]
Note the sequence \r\n, which is ignored. How can I do this?
Doing it probably the hard way (and getting it wrong) looks
On Mon, Jan 2, 2012 at 3:14 PM, max m...@mtw.ru wrote:
I want to write a function whose behavior is as follows:
foo string1\nstring2\r\nstring3\nstring4 = [string1,
string2\r\nstring3, string4]
Note the sequence \r\n, which is ignored. How can I do this?
Here's a simple way (may not be the
On Mon, Jan 02, 2012 at 12:44:23PM +0300, max wrote:
I want to write a function whose behavior is as follows:
foo string1\nstring2\r\nstring3\nstring4 = [string1,
string2\r\nstring3, string4]
Note the sequence \r\n, which is ignored. How can I do this?
On 02/01/2012 10:03, Jerzy Karczmarczuk wrote:
But I disagree quite strongly with the idea of /World parameter as
purely hypothetical, a trick used to gain an intuition/. I mentioned
the language Clean (no reaction, seems that Haskellians continue to
ignore it...)
I don't know about others,
Okay, so it doesn't handle different line-endings.
I have a more general solution (statefulSplit)
http://hpaste.org/55980
I cannot test it as I don't have an interpreter at hand, but if someone
has, I'd be glad to have comments.
(It might be more readable by using the State monad)
2012/1/2 max
max m...@mtw.ru writes:
I want to write a function whose behavior is as follows:
foo string1\nstring2\r\nstring3\nstring4 = [string1,
string2\r\nstring3, string4]
Note the sequence \r\n, which is ignored. How can I do this?
cabal install split
then do something like
import Data.List
On Mon, Jan 02, 2012 at 12:44:23PM +0300, max wrote:
I want to write a function whose behavior is as follows:
foo string1\nstring2\r\nstring3\nstring4 = [string1,
string2\r\nstring3, string4]
Note the sequence \r\n, which is ignored. How can I do this?
On Mon, Jan 2, 2012 at 03:32, Steve Horne sh006d3...@blueyonder.co.ukwrote:
BTW - interesting how the signatures of test1 and test2 are reported - I
hadn't realised monad transformers were relevant there. Of course it does
seem a bit silly to implement both StateT and State when StateT can
В Mon, 02 Jan 2012 11:12:49 +
Jon Fairbairn jon.fairba...@cl.cam.ac.uk пишет:
max m...@mtw.ru writes:
I want to write a function whose behavior is as follows:
foo string1\nstring2\r\nstring3\nstring4 = [string1,
string2\r\nstring3, string4]
Note the sequence \r\n, which is
On Mon, Jan 2, 2012 at 10:12 AM, max m...@mtw.ru wrote:
This is the simplest solution of the proposed, in my opinion. Thank you
very much.
Better yet, don't use String and use Text. Then you just need
T.splitOn \r\n [1].
Cheers,
[1]
On Mon, Jan 2, 2012 at 5:52 PM, Felipe Almeida Lessa
felipe.le...@gmail.com wrote:
On Mon, Jan 2, 2012 at 10:12 AM, max m...@mtw.ru wrote:
This is the simplest solution of the proposed, in my opinion. Thank you
very much.
Better yet, don't use String and use Text. Then you just need
Sebastian Fischer wrote:
Your `ListTo` type achieves space efficiency for Applicative composition of
list functions by executing them in lock-step. Because of the additional
laziness provided by the `Fmap` constructor, compositions like
interpret a . interpret b
can also be executed in
Hi All,
The http://justhub.org Haskell distribution for Enterprize Linux
(RHEL/CentOS 5 6)
is now live.
The distribution deviates from current practice. When you upgrade to a
new Platform
from justhub.org you add the new platform to your Haskell
infrastructure rather than
replacing the old
Hi,
I am fiddling around with the package http-enumerator to download web pages.
I was used to `simpleHttp` do do that. However, I would like to infuence the
proxy settings, because sometimes I am behind a firewall.
Is there a simple way to do this?
Thanks!
Han.
--
View this message in
On Mon, Jan 2, 2012 at 6:31 PM, hanjoosten han.joos...@atos.net wrote:
Hi,
I am fiddling around with the package http-enumerator to download web pages.
I was used to `simpleHttp` do do that. However, I would like to infuence the
proxy settings, because sometimes I am behind a firewall.
Is
[I am sorry for if get two copies of this -- no sign of the first copy.]
The justhub.org Haskell distribution for Enterprise Linux (RHEL/CentOS
5 6) is now live.
The distribution deviates from current practice. When you upgrade to a
new Haskell Platform you add the new platform to your Haskell
String is really for small strings. Text is more efficent and also has
more functionality, including most, if not all, of the functions
defined for String.
On Mon, Jan 2, 2012 at 3:12 PM, Anupam Jain ajn...@gmail.com wrote:
On Mon, Jan 2, 2012 at 5:52 PM, Felipe Almeida Lessa
Hi,
On Jan 2, 2012, at 2:34 PM, Heinrich Apfelmus wrote:
Without an explicit guarantee that the function is incremental, we can't do
anything here. But we can just add another constructor to that effect if we
turn ListTo into a GADT:
data ListTo a b where
CaseOf :: b - (a
On 2012/1/1 Ertugrul Söylemez e...@ertes.de wrote:
Steve Horne sh006d3...@blueyonder.co.uk wrote:
Of course even the bind operator arguably isn't primitive. We could
translate to get rid of those too, and see what lies underneath. This
is where we start seeing functions of type...
Hi Sigbjorn (and Don),
I'm back for another reason. feed leaks and uses a lot of memory due to the xml
package. Rather than fix xml I ported feed to xml-enumerator, which is used by
yesod and more actively maintained than xml. This seems to have fixed the
problem so I'm thinking of uploading
If I may: I'm about to upload a new version of xml-enumerator that
will state that it's officially deprecated in favor of xml-conduit. My
guess is you'll be able to migrate to the latter by just changing the
package name in your cabal file.
On Mon, Jan 2, 2012 at 8:54 PM, Simon Michael
Hi Simon and all,
You might want to consider using xml-conduit instead of
xml-enumerator. Michael Snoyman has shifted his attention to this new
alternative.
Cheers,
Aristid
2012/1/2 Simon Michael si...@joyful.com:
Hi Sigbjorn (and Don),
I'm back for another reason. feed leaks and uses a
On Jan 2, 2012, at 1:30 PM, Conal Elliott wrote:
On 2012/1/1 Ertugrul Söylemez e...@ertes.de wrote:
And that's fine, because IO is an embedded DSL. A better view of IO is
a GADT like:
data IO :: * - * where
GetLine :: IO String
PutStrLn :: String - IO ()
...
I've been trying to install threadscope on my macbook pro runing OSX 10.7
(Lion). This hasn't been easy.
Thanks to help here, I finally got glib installed, but now one of the
hangups is in installing the package gio. The following happens:
Building gio-0.12.2...
Building library...
creating
On Mon, Jan 2, 2012 at 21:36, Victor Miller victorsmil...@gmail.com wrote:
command line: cannot satisfy -package-id
mtl-2.0.1.0-5b7a9cce5565d8cc8721ba4f95becf1b
(use -v for more information)
However, cabal list tells me:
* mtl
Synopsis: Monad classes, using functional dependencies
Brandon, Thanks again. That put me on the right track. When I did a
ghc-pkg list it added a message saying that the cache was out of date and
that I should run ghc-pkg recache. I did that and gio appears to
installing.
Victor
On Mon, Jan 2, 2012 at 9:49 PM, Brandon Allbery
On Sun, 01 Jan 2012 05:29:42 -0700, Sebastian Fischer fisc...@nii.ac.jp
wrote:
On Sat, Dec 31, 2011 at 4:09 PM, Kevin Quick qu...@sparq.org wrote:
onVarElem :: forall a . (Show a) = (Maybe a - String) - Var -
String
The problem is the scope of the quantification of the type variable 'a'.
36 matches
Mail list logo