[Haskell-cafe] Conduit Best Practices for leftover data

2012-04-12 Thread Myles C. Maxfield
Hello, I am interested in the argument to Done, namely, leftover data. More specifically, when implementing a conduit/sink, what should the conduit specify for the (Maybe i) argument to Done in the following scenarios (Please note that these scenarios only make sense if the type of 'i' is

Re: [Haskell-cafe] Is type class 'Addressable' already exists.

2012-04-12 Thread Michael Sloan
Hello! Yes, classes of that variety exist in a few packages. This is a particularly good treatment of it: http://hackage.haskell.org/package/keys Here are some classes from a very WIP implementation of a few Commutative Replicated Data Types:

Re: [Haskell-cafe] Is type class 'Addressable' already exists.

2012-04-12 Thread 陈文龙
The Indexable class is declared as class Lookup f = Indexable f where index :: f a - Key f - a Why f must be instance of Lookup? 2012/4/12 Michael Sloan mgsl...@gmail.com Hello! Yes, classes of that variety exist in a few packages. This is a particularly good treatment of it:

Re: [Haskell-cafe] open source project for student

2012-04-12 Thread Jeremy O'Donoghue
Hi Dan, I am the maintainer of wxHaskell, but please don't let that worry you, as I'm actually not going to go on and recommend wxHaskell as an Open Source project for a relative beginner - it is architecturally complex, and you need to know as much C++ as you do Haskell. You might choose to

Re: [Haskell-cafe] Is type class 'Addressable' already exists.

2012-04-12 Thread Michael Sloan
I think this is the result of a bit of a dilemma: 1) We want to express the fact that any Indexable thing also has a straightforward definition for lookup. 2) Not all things supporting lookup support index, hence the direction of the class hierarchy. This is an ugly part of the default methods

[Haskell-cafe] prettyprint with IO

2012-04-12 Thread Warren Harris
I wrote a parsec parser that does symbols lookups during the parsing process (ParsecT String Store IO a). Now I'd like to write a pretty printer that does the reverse. Unfortunately there doesn't appear to be a transformer version of Text.PrettyPrint.HughesPJ. Can anyone suggest a way to do

Re: [Haskell-cafe] I Need a Better Functional Language!

2012-04-12 Thread Conal Elliott
Agreed. The original note confuses programs (syntax) with functions (semantics). -- Conal On Thu, Apr 5, 2012 at 8:52 AM, Dan Doel dan.d...@gmail.com wrote: On Thu, Apr 5, 2012 at 10:14 AM, Grigory Sarnitskiy sargrig...@ya.ru wrote: First, what are 'functions' we are interested at? It can't

Re: [Haskell-cafe] prettyprint with IO

2012-04-12 Thread Antoine Latter
Hi Warren, On Thu, Apr 12, 2012 at 6:31 PM, Warren Harris warrensomeb...@gmail.com wrote: I wrote a parsec parser that does symbols lookups during the parsing process (ParsecT String Store IO a). Now I'd like to write a pretty printer that does the reverse. Unfortunately there doesn't appear

Re: [Haskell-cafe] prettyprint with IO

2012-04-12 Thread Evan Laforge
On Thu, Apr 12, 2012 at 6:22 PM, Antoine Latter aslat...@gmail.com wrote: Hi Warren, On Thu, Apr 12, 2012 at 6:31 PM, Warren Harris warrensomeb...@gmail.com wrote: I wrote a parsec parser that does symbols lookups during the parsing process (ParsecT String Store IO a). Now I'd like to

Re: [Haskell-cafe] prettyprint with IO

2012-04-12 Thread Warren Harris
Antoine, Thanks for the suggestions. No sooner did I send my message than I came to the same conclusion of creating a monadic version of the combinators to simplify the migration. It actually worked out fairly well -- most of the code ported over to the monadic version unaltered. The only