Carlo,
Thanks a lot! This looks very promising (though I have to test it for my
purpose more in depth). As you mention, the key seems to be the optionMaybe
combinator. Thanks for pointing to it.
Immanuel
2013/3/5 Carlo Hamalainen carlo.hamalai...@gmail.com
On Mon, Mar 4, 2013 at 1:44 AM,
I was trying to figure out a way to write absurd :: (forall p. p Char
- p Bool) - Void using only rank-n types. Someone suggested that
Haskell with RankNTypes and a magic primitive of type (forall p. p
Char - p Bool) might be sound (disregarding the normal ways to get ⊥,
of course).
Is that true?
Here is the crazy idea; instead of having a vim plugin to rule-them-all,
why you don't join your efforts and create a plugin which does only
indentation for Haskell code?
This way, we could have a modular stack and be free to use whatever plugins
work for syntax highlighting / unicode syntactic
Maybe this is something you do not even want to use a parser combinator library
for. The package
http://hackage.haskell.org/packages/archive/list-grouping/0.1.1/doc/html/Data-List-Grouping.html
contains a function breakBefore, so you can write
main = do inp - readFile ...
let
Hi Rob,
I usually prefer type class approach for early stage of development.
Type class approach is more flexible, less works required.
One might get a function with lots of constraints, and quite a lot of
language extensions may appear, though it works.
Once things got settled down, I
* Martin Drautzburg martin.drautzb...@web.de [2013-03-04 21:21:30+0100]
On Sunday, 3. March 2013 21:11:21 Roman Cheplyaka wrote:
Admittedly, programming with callbacks is not very pleasant. So we have
an excellent alternative — the continuation monad transformer!
This nested code
What is the advance of using type classes? A function of the form
f :: Show a = ...
really has an implicit argument
f :: Show__Dict a - ...
that the compiler infers for us. So, the advantage of type classes is one
of convenience: we don't have to pass dictionaries around, or even figure
Wow, I hadn't realized that someone had implemented resumable sinks... and
now resumable conduits too! Very interesting.
I'm not sure if I entirely understand your use case, but in general it
should be possible to have multiple Conduits running one after the other.
Here's an example of restarting
Just because you can't use the 'magic primitive' in question to
produce an element of the empty type doesn't mean the system is sound
(nor does type soundness have anything to do with proving 'false').
The question is what the primitive is supposed to do. If it's supposed
to work as a witness of
Depends on the application, of course. The (on by default) parallel GC
tends to kill performance for me... you might try running both with +RTS
-sstderr to see if GC time is significantly higher, and try adding +RTS
-qg1 if it is.
On Mon, Mar 4, 2013 at 2:23 PM, Łukasz Dąbek sznu...@gmail.com
2013/3/5 Nathan Howell nathan.d.how...@gmail.com
Depends on the application, of course. The (on by default) parallel GC
tends to kill performance for me... you might try running both with +RTS
-sstderr to see if GC time is significantly higher, and try adding +RTS
-qg1 if it is.
You are
On 13-03-05 12:19 AM, Christopher Howard wrote:
Hi. My Haskell is (sadly) getting a bit rusty. I was wondering what
would be the most straightforward and easily followed procedure for
translating a recursively defined sequence into a Haskell function. For
example, this one from a homework
Isn't that already valid Haskell? :)
(remove the underscore).
On Mar 5, 2013 5:21 AM, Christopher Howard
christopher.how...@frigidcode.com wrote:
Hi. My Haskell is (sadly) getting a bit rusty. I was wondering what
would be the most straightforward and easily followed procedure for
On Mon, Mar 4, 2013 at 5:50 PM, Rob Stewart robstewar...@gmail.com wrote:
...
-
import Control.Concurrent
-- API approach 1: Using type classes
class FooC a where
mkFooC :: IO a
readFooC :: a - IO Int
incrFooC :: a - IO ()
I recommend taking 'mkFooC' out of the typeclass. It
Hi all,
After more than eight months of careful design and development, The Snap
Framework team is happy to announce the first version of io-streams, a
simple and easy-to-use library for doing streaming I/O in Haskell.
The io-streams library is based around two basic types, InputStream a and
Is this something like conduits ?
___
Haskell-Cafe mailing list
Haskell-Cafe@haskell.org
http://www.haskell.org/mailman/listinfo/haskell-cafe
On Tue, Mar 5, 2013 at 9:24 AM, Michael Snoyman mich...@snoyman.com wrote:
...
I'm not sure if I entirely understand your use case, but in general it
should be possible to have multiple Conduits running one after the other.
Here's an example of restarting an accumulator after every multiple
s9gf4ult wrote:
Is this something like conduits ?
Yes, its also a bit like Iteratee, Enumerator, Pipes and Machines.
Erik
--
--
Erik de Castro Lopo
http://www.mega-nerd.com/
___
On Wed, Mar 6, 2013 at 5:48 AM, Joey Adams joeyadams3.14...@gmail.comwrote:
On Tue, Mar 5, 2013 at 9:24 AM, Michael Snoyman mich...@snoyman.comwrote:
...
I'm not sure if I entirely understand your use case, but in general it
should be possible to have multiple Conduits running one after the
19 matches
Mail list logo