Re: [haskell art] [Haskell-cafe] the library of beautiful instruments implemented in haskell / csound

2015-09-13 Thread Tom Murphy
These sound great, congratulations! "Batteries included" is a great place to be. Can you point to references you used to create the instrument definitions? Tom On Sun, Sep 13, 2015 at 9:13 AM, Anton Kholomiov <anton.kholom...@gmail.com> wrote: > Status update for my h

[Haskell-cafe] Lenses that work with Arrows

2013-10-07 Thread Tom Ellis
in their library. I have also started a Reddit discussion here: http://www.reddit.com/r/haskell/comments/1nwetz/lenses_that_work_with_arrows/ Tom ___ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org/mailman/listinfo/haskell-cafe

Re: [Haskell-cafe] Lifting IO actions into Applicatives

2013-10-07 Thread Tom Ellis
, one which extends to a monad morphism and one which does not: http://www.reddit.com/r/haskell/comments/1ni8r6/should_it_be_monadio_applicativeio_functorio_or/ccjodj5 Tom ___ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org

Re: [Haskell-cafe] Lenses that work with Arrows

2013-10-07 Thread Tom Ellis
On Mon, Oct 07, 2013 at 07:14:44PM +0200, Niklas Haas wrote: On Mon, 7 Oct 2013 10:40:13 +0100, Tom Ellis tom-lists-haskell-cafe-2...@jaguarpaw.co.uk wrote: I introduce a very simple extension to the Lens datatype from Control.Lens that allows it to work with Arrows: https

Re: [Haskell-cafe] Lenses that work with Arrows

2013-10-07 Thread Tom Ellis
On Mon, Oct 07, 2013 at 06:22:33PM +0100, Tom Ellis wrote: On Mon, Oct 07, 2013 at 07:14:44PM +0200, Niklas Haas wrote: On Mon, 7 Oct 2013 10:40:13 +0100, Tom Ellis tom-lists-haskell-cafe-2...@jaguarpaw.co.uk wrote: I introduce a very simple extension to the Lens datatype from

Re: [Haskell-cafe] Any precedent or plan for guaranteed-safe Eq and Ord instances?

2013-10-02 Thread Tom Ellis
-Lazy.html to find such examples, and the only one that jumped out was showTree. Are there others? Still, although the library is, in principle, able to distinguish equal maps, isn't this just a leaking implementation detail? Is it somehow of benefit to API users? Tom

Re: [Haskell-cafe] Any precedent or plan for guaranteed-safe Eq and Ord instances?

2013-10-02 Thread Tom Ellis
On Wed, Oct 02, 2013 at 03:46:42PM +0200, Stijn van Drongelen wrote: * Operators in Eq and Ord diverge iff any of their parameters are bottom. What's the benefit of this requirement, as opposed to, for example False = _ = True ... Tom

Re: [Haskell-cafe] Lifting IO actions into Applicatives

2013-10-01 Thread Tom Ellis
ApplicativeIO makes more sense than MonadIO, which is unnecessarily restrictive. With planned Functor/Applicative/Monad shuffle, the former could completely replace the latter. Tom ___ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org

Re: [Haskell-cafe] Lifting IO actions into Applicatives

2013-10-01 Thread Tom Ellis
and monad morphism. Tom ___ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org/mailman/listinfo/haskell-cafe

Re: [Haskell-cafe] Lifting IO actions into Applicatives

2013-10-01 Thread Tom Ellis
On Tue, Oct 01, 2013 at 03:17:40PM +0300, Yitzchak Gale wrote: Tom Ellis wrote: Shouldn't it be an *Applicative* constraint? class Applicative t = ApplicativeIO t where liftIO :: IO a - t a and require that liftIO (pure x) = pure x liftIO (f * x) = liftIO f

[Haskell-cafe] Product Profunctor and Contravariant

2013-09-29 Thread Tom Ellis
up a lot inside my database library. Has anyone ever seen these before? Has Edward Kmett written a library for these already? Thanks, Tom ___ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org/mailman/listinfo/haskell-cafe

Re: [Haskell-cafe] Mystery of an Eq instance

2013-09-20 Thread Tom Ellis
On Fri, Sep 20, 2013 at 06:34:04PM +0200, Stijn van Drongelen wrote: Please find yourself a copy of What Every Computer Scientist Should Know About Floating-Point Arithmetic by David Goldberg, and read it. It should be very enlightening. It explains a bit about how IEEE754, pretty much the

Re: [Haskell-cafe] Mystery of an Eq instance

2013-09-20 Thread Tom Ellis
3.1622776601683795 == 3.1622776601683797 True Prelude 3.1622776601683795 == 3.1622776601683798 False The truncation happens base 2, not base 10. Is that what's confusing you? Tom ___ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org

Re: [Haskell-cafe] Bytestring map/zipWith rationale

2013-09-12 Thread Tom Ellis
wanted to zipWith a function of type Word8 - Word8 - Foo instead of Word8 - Word8 - Word8? Tom ___ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org/mailman/listinfo/haskell-cafe

Re: [Haskell-cafe] Unary functions and infix notation

2013-09-06 Thread Tom Ellis
++ .what) 1.what There's nothing special about infix notation here: Prelude :t \x - id x 1 \x - id x 1 :: Num a = (a - t) - t Prelude (\x - id x 1) (\y - show y ++ .what) 1.what Tom ___ Haskell-Cafe mailing list Haskell-Cafe

Re: [Haskell-cafe] Strange IO sequence behaviour (Was: sequence causing stack overflow on pretty small lists)

2013-09-06 Thread Tom Ellis
On Wed, Sep 04, 2013 at 04:35:17PM +0100, Tom Ellis wrote: As an addendum to the recent discussion, can anyone explain why main crashes quickly with a stack overflow, whereas main' is happy to print Hi for ages (eventually crashing due to an out of memory condition)? bignum = 100 * 1000

[Haskell-cafe] Strange IO sequence behaviour (Was: sequence causing stack overflow on pretty small lists)

2013-09-04 Thread Tom Ellis
' = replicateM bignum (putStrLn Hi) Tom ___ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org/mailman/listinfo/haskell-cafe

Re: [Haskell-cafe] How to read a file and return a String?

2013-09-04 Thread Tom Ellis
it in a String? You need to lift 'lines' into the IO functor, rather than trying to remove the String from IO (which doesn't make sense). Try fmap lines (readFile filename) Tom ___ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http

Re: [Haskell-cafe] sequence causing stack overflow on pretty small lists

2013-08-27 Thread Tom Ellis
this. The same stack overflow occurs with tenmil :: Int tenmil = 10 * 1000 * 1000 main :: IO () main = do list - replicateM tenmil (return ()) :: IO [()] list `seq` return () return () is not excessiely lazy, is it? Could you explain further? Tom

Re: [Haskell-cafe] Lifting strictness to types

2013-08-22 Thread Tom Ellis
already has this http://caml.inria.fr/pub/docs/manual-ocaml/libref/Lazy.html but I think Haskellers would do it better because we have a lot of experience with purity, laziness and monad and comonad transformers. Tom ___ Haskell-Cafe mailing list

Re: [Haskell-cafe] Errors in non-monadic code

2013-08-19 Thread Tom Ellis
for these functions, so we can easily talk about them. Why, what would be different in your question for a non-total function or one in the context of the IO monad? Tom ___ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org/mailman

Re: [Haskell-cafe] Errors in non-monadic code

2013-08-19 Thread Tom Ellis
not looking at the documentation at the time when you write the code. This is /exactly/ the reason to avoid exceptions where possible. Tom ___ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org/mailman/listinfo/haskell-cafe

Re: [Haskell-cafe] Errors in non-monadic code

2013-08-19 Thread Tom Ellis
a monad. Then at least we'd all know. Tom ___ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org/mailman/listinfo/haskell-cafe

Re: [Haskell-cafe] Database.postgreSQL.Simple - ambigious type

2013-08-18 Thread Tom Ellis
with single-column tables with Only. Well done for getting it working! Tom ___ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org/mailman/listinfo/haskell-cafe

Re: [Haskell-cafe] inv f g = f . g . f

2013-08-17 Thread Tom Ellis
) . dropWhile isSpace This sounds like a job for a lens, or similar. Tom ___ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org/mailman/listinfo/haskell-cafe

Re: [Haskell-cafe] Database.postgreSQL.Simple - ambigious type

2013-08-17 Thread Tom Ellis
main = print = (hello :: IO [Int]) or give hello a monomorphic type signature, such as hello :: IO [Int] Tom ___ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org/mailman/listinfo/haskell-cafe

Re: [Haskell-cafe] Applicative is like an Arrow

2013-08-16 Thread Tom Ellis
that if you can provide any references. I am using arrows very heavily. Tom ___ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org/mailman/listinfo/haskell-cafe

Re: [Haskell-cafe] ANN: hi2 -- a better indentation mode for Emacs' haskell-mode

2013-08-09 Thread Tom Ellis
of haskell-mode). The changes are mainly to the UI, although, I plan to have a look on the parser too. The code can be found on github: https://github.com/errge/hi2. Feel free to send me feedback, bug reports, pull requests, etc. Just tried it and I already like it! Thanks. Tom

Re: [Haskell-cafe] Alternative name for return

2013-08-08 Thread Tom Ellis
you run it. What do you mean by the same thing? You cannot compare 'them' in any reasonable sense. This, the impossibility to check putStr c == putStr c, is btw, a refutation of the claim by Tom Ellis that you can do even less with (). The void object is an instance of the Eq and Ord classes

Re: [Haskell-cafe] Identity of indiscernibles (Was: Alternative name for return)

2013-08-08 Thread Tom Ellis
On Thu, Aug 08, 2013 at 11:38:08AM +0200, Jerzy Karczmarczuk wrote: Tom Ellis: If I were writing a Haskell compiler I could certainly define 'IO' to be a datatype that would allow me to compare 'putStr c' to itself. The comparison could not be of operational equivalence, but it would still

Re: [Haskell-cafe] Identity of indiscernibles (Was: Alternative name for return)

2013-08-08 Thread Tom Ellis
for the definition of impure. Tom ___ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org/mailman/listinfo/haskell-cafe

Re: [Haskell-cafe] Identity of indiscernibles

2013-08-08 Thread Tom Ellis
the performance of a runtime system based on suhc a representation! Tom ___ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org/mailman/listinfo/haskell-cafe

Re: [Haskell-cafe] Identity of indiscernibles

2013-08-08 Thread Tom Ellis
On Thu, Aug 08, 2013 at 05:23:50PM +0100, Oliver Charles wrote: On 08/08/2013 05:05 PM, Tom Ellis wrote: On Thu, Aug 08, 2013 at 03:38:41PM +0200, Jerzy Karczmarczuk wrote: One could simply implement IO as a free monad Interesting. I wonder how. See [1] for an explanation of free

Re: [Haskell-cafe] Identity of indiscernibles

2013-08-08 Thread Tom Ellis
should this work if the user adds an IO operation, e.g by wrapping a C function? Wrapping a C function could perhaps be provided by something like data IOF a = ... | forall i o. Foreign String i (o - a) | ... csin :: Double - IO Double csin x = liftF (Foreign math.h sin x id) Tom

Re: [Haskell-cafe] Identity of indiscernibles

2013-08-08 Thread Tom Ellis
On Thu, Aug 08, 2013 at 05:44:11PM +0100, Tom Ellis wrote: On Thu, Aug 08, 2013 at 06:25:12PM +0200, Daniel Trstenjak wrote: See [1] for an explanation of free monads in general. For IO in particular, define a functor data IOF a = GetChar (Char - a) | PutChar Char

Re: [Haskell-cafe] Identity of indiscernibles

2013-08-08 Thread Tom Ellis
On Fri, Aug 09, 2013 at 12:38:45AM +0700, Kim-Ee Yeoh wrote: On Thu, Aug 8, 2013 at 11:05 PM, Tom Ellis tom-lists-haskell-cafe-2...@jaguarpaw.co.uk wrote: On Thu, Aug 08, 2013 at 03:38:41PM +0200, Jerzy Karczmarczuk wrote: One could simply implement IO as a free monad Interesting. I

Re: [Haskell-cafe] Alternative name for return

2013-08-06 Thread Tom Ellis
On Tue, Aug 06, 2013 at 10:03:04AM +0200, J. Stutterheim wrote: `putStrLn Hi` is not a pure value... Why not? ___ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org/mailman/listinfo/haskell-cafe

Re: [Haskell-cafe] Alternative name for return

2013-08-06 Thread Tom Ellis
On Tue, Aug 06, 2013 at 04:26:05PM +0200, Jerzy Karczmarczuk wrote: 1. First, it is not true that you can do with, say, (printStr Ho! ) whatever you want. In fact, you can do almost nothing with it. You can transport it as such, and you can use it as the argument of (=). I don't think this

Re: [Haskell-cafe] Hoogle problems?

2013-08-01 Thread Tom Ellis
On Thu, Aug 01, 2013 at 01:25:22PM +0100, Richard Evans wrote: It still doesn't work when I try it. What URL are you using? http://www.haskell.org/hoogle works fine for me. ___ Haskell-Cafe mailing list Haskell-Cafe@haskell.org

Re: [Haskell-cafe] ANNOUNCE: hdbi-1.0.0 and hdbi-postgresql-1.0.0

2013-07-31 Thread Tom Ellis
languages do this too. What is the rationale for this when in Haskell we have safer methods of interpolation at our disposal (for example HoleyMonoid)? Is it simply a matter of using the most familiar interface, or is there a deeper reason this is necessary? Thanks, Tom

Re: [Haskell-cafe] ANNOUNCE: hdbi-1.0.0 and hdbi-postgresql-1.0.0

2013-07-31 Thread Tom Ellis
Either. One of the things I find worst about postgres-simple is the exceptions it throws. The benefit of Haskell is that we can do things in a Haskelly way! Tom ___ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org/mailman/listinfo

Re: [Haskell-cafe] ANNOUNCE: hdbi-1.0.0 and hdbi-postgresql-1.0.0

2013-07-31 Thread Tom Ellis
* of parameters supplied matches the number of placeholders in the query string. That would make sense, don't you think? Tom ___ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org/mailman/listinfo/haskell-cafe

Re: [Haskell-cafe] Proposal: Non-recursive let

2013-07-25 Thread Tom Ellis
statement. It seems there are a number of straightforward ways to make this code much clearer that do not require non-recursive let. Tom ___ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org/mailman/listinfo/haskell-cafe

Re: [Haskell-cafe] memoization

2013-07-24 Thread Tom Ellis
://www.haskell.org/pipermail/haskell-cafe/2013-February/105201.html Tom ___ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org/mailman/listinfo/haskell-cafe

Re: [Haskell-cafe] memoization

2013-07-23 Thread Tom Ellis
with optimization on GHC (sometimes) does it, even when not appropriate http://www.haskell.org/pipermail/haskell-cafe/2013-February/105201.html Tom ___ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org/mailman/listinfo/haskell

Re: [Haskell-cafe] memoization

2013-07-22 Thread Tom Ellis
time trying to grasp this a few months ago, but as I said it's subtle, at least to someone like me who hasn't studied lambda calculus in depth!) Tom ___ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org/mailman/listinfo/haskell-cafe

Re: [Haskell-cafe] memoization

2013-07-22 Thread Tom Ellis
memoised? I'm not aware of any difference between these two definitions. Tom ___ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org/mailman/listinfo/haskell-cafe

Re: [Haskell-cafe] memoization

2013-07-22 Thread Tom Ellis
of the where to a let). What matters is not the let binding, but where the let binding occurs in relation to the lambda. There's no compiler magic here, just operational semantics. Tom ___ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http

Re: [Haskell-cafe] Wrapping all fields of a data type in e.g. Maybe

2013-07-16 Thread Tom Ellis
wrapped in Maybe? You can always try data Cfg f = Cfg { verbose :: f Bool } and set f to Maybe or Identity depending on what you use it for. It will be slightly notationally cumbersome to extract values from the Identity functor though. Tom

Re: [Haskell-cafe] What have happened to haskell.org?

2013-07-15 Thread Tom Ellis
On Mon, Jul 15, 2013 at 07:19:12AM -0700, Kirill Zaborsky wrote: http://www.haskell.org/hoogle/ responds with some ELF file. After running strings on it, it does seem to be (at least part of) the hoogle binary. ___ Haskell-Cafe mailing list

Re: [Haskell-cafe] Linux users needed for OpenGL extensions survey

2013-07-09 Thread Tom Ellis
hope it will get to you. Brian's email address is at the top of that page. Just replace at with @. Tom ___ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org/mailman/listinfo/haskell-cafe

[Haskell-cafe] Probabilistic functional programming with Baysig/BayesHive

2013-07-09 Thread Tom Nielsen
a few videos: http://bayeshive.com Baysig quick tour (QuickBAYSIG): http://bayeshive.com/helppage/Baysig%20quick%20tour:%20fundamentals More documentation: http://bayeshive.com/help Regards, Tom Nielsen OpenBrain Ltd. ___ Haskell-Cafe mailing list Haskell

Re: [Haskell-cafe] Casting newtype to base type?

2013-07-02 Thread Tom Ellis
(Show, Eq) getC_IO :: P - IO String getC_IO p = case getC p of IOS a - a getC_IO (P _ _ (IOS a)) = a How about unIOS :: IOS - IO String unIOS (IOS a) = a getC_IO :: P - IO String getC_IO = unIOS . getC Tom ___ Haskell-Cafe

Re: [Haskell-cafe] question about indentation conventions

2013-07-01 Thread Tom Ellis
for example that f (g x y z) 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. Tom ___ Haskell-Cafe mailing list Haskell

Re: [Haskell-cafe] Casting newtype to base type?

2013-07-01 Thread Tom Ellis
defining something like data P_lesser = P_lesser { a_lesser :: String, b_lesser :: String } deriving (Show, Eq) to_lesser p = P_lesser (a p) (b p) and just factoring everything through to_lesser when you want to compare or show. Tom

Re: [Haskell-cafe] Spam on list??

2013-07-01 Thread Tom Ellis
Yeah I'm getting stuff from j...@eukor.com every time I post. ___ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org/mailman/listinfo/haskell-cafe

Re: [Haskell-cafe] tangential request...

2013-06-24 Thread Tom Ellis
On Mon, Jun 24, 2013 at 08:02:17AM -0700, Mark Lentczner wrote: And yet, just four fonts make up over 75% of the sample - and two of those are essentially identical! Inconsolata and Consolas? ___ Haskell-Cafe mailing list Haskell-Cafe@haskell.org

Re: [Haskell-cafe] data constructor names

2013-06-22 Thread Tom Ellis
because constructors live in a different namespace from types. If you meant it will be too confusing for the programmer that's fair enough. Tom ___ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org/mailman/listinfo/haskell-cafe

[Haskell-cafe] Best practices for Arrows?

2013-06-22 Thread Tom Ellis
I feel I may be doing a lot of programming with Arrows in the near future. Currently I'm delighted that Arrow notation[1] exists. It makes using Arrows much less painful. Are there any best-practices I should be aware of with Arrows? Or is it just a case of getting on with it? Tom 1. http

Re: [Haskell-cafe] Best practices for Arrows?

2013-06-22 Thread Tom Ellis
Hi Ertugul. Thanks for taking the time to write me an in-depth reply! I have a few comments and a question. On Sat, Jun 22, 2013 at 03:36:15PM +0200, Ertugrul Söylemez wrote: Tom Ellis tom-lists-haskell-cafe-2...@jaguarpaw.co.uk wrote: Are there any best-practices I should be aware

Re: [Haskell-cafe] opengl type confusion

2013-06-17 Thread Tom Ellis
suspect that's because, as you point out, they all have to be the same argument and ghc is being smart and saying if the first arg _must_ be GLdouble (because I'm explicitly forcing the type), then the rest must be too. That is exactly the reason. Tom

Re: [Haskell-cafe] opengl type confusion

2013-06-16 Thread Tom Ellis
the compiler know that you mean 0.0 to be a GLdouble and not a GLfloat? Tom ___ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org/mailman/listinfo/haskell-cafe

Re: [Haskell-cafe] (no subject)

2013-06-10 Thread Tom Ellis
the same clean, consistent programming language as it is now! Hear hear! Hopefully we, the Haskell community, will be able to support this endevour with our time and efforts. Tom ___ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http

Re: [Haskell-cafe] Only vaporware needs promises

2013-06-10 Thread Tom Ellis
On Mon, Jun 10, 2013 at 03:21:28PM +0200, Ertugrul Söylemez wrote: Tom Ellis tom-lists-haskell-cafe-2...@jaguarpaw.co.uk wrote: Hear hear! Hopefully we, the Haskell community, will be able to support this endevour with our time and efforts. Every Haskell user does this in their own way

Re: [Haskell-cafe] (no subject)

2013-06-10 Thread Tom Ellis
that it may endure, rather than literally as a demand for the Haskell committee to grant him promises. I hope I haven't misunderstood. Tom ___ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org/mailman/listinfo/haskell-cafe

Re: [Haskell-cafe] Question about Newtype op() function arguments.

2013-06-07 Thread Tom Ellis
unpack itself. Tom ___ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org/mailman/listinfo/haskell-cafe

Re: [Haskell-cafe] Question about Newtype op() function arguments.

2013-06-07 Thread Tom Ellis
to use a type variable from the top level within the body of a function. If you use op and specify a particular constructor then you don't have a variable but a concrete instance of a type. But maybe I'm missing some more powerful way this can be used ... Tom On Jun 7, 2013 2:53 PM, Tom Ellis

[Haskell-cafe] PPDP'13: Last call for papers

2013-06-06 Thread Tom Schrijvers
University Potsdam, Germany Tom Schrijvers Ghent University, Belgium Martin SulzmannHochschule Karlsruhe, Germany Wouter Swierstra Universiteit Utrecht, The Netherlands Tarmo Uustalu Institute of Cybernetics, Estonia Janis Voigtlaender

Re: [Haskell-cafe] Array, Vector, Bytestring

2013-06-04 Thread Tom Ellis
duplication of functionality? Tom ___ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org/mailman/listinfo/haskell-cafe

Re: [Haskell-cafe] Array, Vector, Bytestring

2013-06-04 Thread Tom Ellis
are suggesting that there is redundancy in the implementation details of these libraries, not in the APIs they expose. Then again, I was just trying to understand the discussion at hand. I don't have an opinion on it. Tom ___ Haskell-Cafe mailing list Haskell-Cafe

Re: [Haskell-cafe] Type classes

2013-05-28 Thread Tom Ellis
a). You will find they are the same. http://hackage.haskell.org/packages/archive/mtl/1.1.0.2/doc/html/src/Control-Monad-Reader.html#Reader http://hackage.haskell.org/packages/archive/comonad/3.0.0.2/doc/html/src/Control-Comonad.html#Cokleisli Tom

Re: [Haskell-cafe] Type classes

2013-05-28 Thread Tom Ellis
be the same type as _ ~ _ but I don't see how to demonstrate the isomorphsim here. Tom ___ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org/mailman/listinfo/haskell-cafe

Re: [Haskell-cafe] Type classes

2013-05-28 Thread Tom Ellis
On Tue, May 28, 2013 at 09:09:48PM +0200, Johannes Gerer wrote: What about these two very simple type classes. Are they equivalent? [...] class Pointed f where pure :: a - f a class Unit f where unit :: f a a newtype UnitPointed f a = UnitPointed f a a instance Unit f = Pointed

Re: [Haskell-cafe] Type classes

2013-05-28 Thread Tom Ellis
this is perfectly obvious and well known, but I haven't managed to work it out on my own. Tom ___ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org/mailman/listinfo/haskell-cafe

Re: [Haskell-cafe] hackage update brigade (was Re: ANNOUNCE: new bridge! (prelude-prime))

2013-05-27 Thread Tom Ellis
On Mon, May 27, 2013 at 02:10:28PM -0400, Clark Gaebel wrote: I'd be down for helping update packages when the time comes. As am I, for what it's worth. ___ Haskell-Cafe mailing list Haskell-Cafe@haskell.org

Re: [Haskell-cafe] HTML framework for web-ui

2013-05-21 Thread Tom Ellis
seem to like them). Tom ___ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org/mailman/listinfo/haskell-cafe

[Haskell-cafe] More general pattern matching

2013-05-19 Thread Tom Ellis
it before. There's something very lensy going on here too. There's nothing special about 'Category's here, but it's an example where the structure is demonstrated nicely. It's a shame that the structure of the pattern must be duplicated on the left and right of the binding. Tom

Re: [Haskell-cafe] fromIntegral not enough?

2013-05-13 Thread Tom Ellis
definition of angles forces dAng to be of type a. Then in order to define dAng as the result of a / there must be a Fractional instance for a. Hope that helps. Tom ___ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org/mailman

Re: [Haskell-cafe] fromIntegral not enough?

2013-05-13 Thread Tom Ellis
On Mon, May 13, 2013 at 11:43:41PM +0100, Tom Ellis wrote: On Mon, May 13, 2013 at 02:08:26PM -0800, Christopher Howard wrote: instance Integral a = Coord2 (CircAppr a) where coords2 (CircAppr divns ang rad) = let dAng = 2 * pi / (fromIntegral divns) in let angles = map

[Haskell-cafe] PPDP 2013: 2nd Call for Papers

2013-05-07 Thread Tom Schrijvers
University of Porto, Portugal Torsten Schaub University Potsdam, Germany Tom Schrijvers Ghent University, Belgium Martin SulzmannHochschule Karlsruhe, Germany Wouter Swierstra Universiteit Utrecht, The Netherlands Tarmo Uustalu Institute

Re: [Haskell-cafe] Fwd: Backward compatibility

2013-05-05 Thread Tom Ellis
On Sun, May 05, 2013 at 10:46:23PM +0200, Alberto G. Corona wrote: The case of WASH is a pity. Architecturally It was more advanced that many recent haskell web frameworks. The package would have been a success with little changes in the DSL syntax. Could you briefly summarise the difference

Re: [Haskell-cafe] Backward compatibility

2013-05-03 Thread Tom Ellis
Data.List and Monad became Control.Monad. I'm pretty sure that updating all of these module names will fix the problem. No one has bothered because the package is very old and there are more suitable alternatives these days. Tom ___ Haskell-Cafe mailing

Re: [Haskell-cafe] Backward compatibility

2013-05-03 Thread Tom Murphy
versions of Rails or Ruby come out, developers are generally expected to make the incremental changes to keep up. It's the donkey in a well thing -- you never get buried if you make small changes over time. Tom ___ Haskell-Cafe mailing list Haskell-Cafe

Re: [Haskell-cafe] Backward compatibility

2013-05-02 Thread Tom Ellis
Platform, not whether the latest Platform breaks with GHC 7.4.1. Tom ___ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org/mailman/listinfo/haskell-cafe

Re: [Haskell-cafe] Backward compatibility

2013-05-02 Thread Tom Ellis
On Thu, May 02, 2013 at 10:36:18PM +0800, Adrian May wrote: Please would somebody explain to me what getPackageId did to incriminate itself? What's getPackageId? It does not appear in the WASH source. Tom ___ Haskell-Cafe mailing list Haskell-Cafe

Re: [Haskell-cafe] Backward compatibility

2013-05-02 Thread Tom Ellis
On Thu, May 02, 2013 at 11:10:33PM +0800, Adrian May wrote: What's getPackageId? It does not appear in the WASH source. It's in Setup.lhs, in WashNGo. Which source of WashNGo are you using? It doesn't appear in either of these versions: http://hackage.haskell.org/package/WashNGo-2.12

Re: [Haskell-cafe] Backward compatibility

2013-05-02 Thread Tom Ellis
On Thu, May 02, 2013 at 11:23:12PM +0800, Adrian May wrote: Which source of WashNGo are you using? It doesn't appear in either of these versions: http://hackage.haskell.org/package/WashNGo-2.12 http://hackage.haskell.org/package/WashNGo-2.12.0.1

Re: [Haskell-cafe] Backward compatibility

2013-05-02 Thread Tom Ellis
complaining that you can't build a package, which hasn't been maintained for several years, which you got from a secret source, and whose whose Hackage page specifically says it doesn't build beyond GHC 7.0. I don't think this is indicative of a serious failure of Haskell. Tom

Re: [Haskell-cafe] Monad Transformer Space Leak

2013-04-23 Thread Tom Ellis
On Tue, Apr 23, 2013 at 09:36:04AM +0200, Petr Pudlák wrote: I tested it on GHC 6.12.1, which wasn't affected by the recent ackermann bug, but still it leaks memory. I tested it on GHC 7.4.1 and I don't see any space leak. ___ Haskell-Cafe mailing

Re: [Haskell-cafe] ANN: Groundhog 0.3 - mysql, schemas and enhanced queries

2013-04-19 Thread Tom Ellis
On Fri, Apr 19, 2013 at 11:42:14AM +0300, Boris Lykah wrote: The full description of the configuration options is available at http://hackage.haskell.org/packages/archive/groundhog-th/0.3.0/doc/html/Database-Groundhog-TH.html Hi Boris, the docs for 0.3.0 don't currently seem to exist. Tom

[Haskell-cafe] ANN: rematch, an library for composable assertions with human readable failure messages

2013-04-16 Thread Tom Crayford
test framework reinventing this idea, and not all frameworks having all the matchers I want to use. Let me know if you have any feedback/thoughts Tom ___ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org/mailman/listinfo/haskell

Re: [Haskell-cafe] ANN: rematch, an library for composable assertions with human readable failure messages

2013-04-16 Thread Tom Ellis
On Tue, Apr 16, 2013 at 10:17:48AM +0100, Tom Crayford wrote: I kept on running into this thing where I was calling error in quickcheck to get good error messages about the things I was comparing. In Java land, this stuff is handled by Hamcrest: a library for composable assertions with good

Re: [Haskell-cafe] Monad fold

2013-04-16 Thread Tom Ellis
) in `base`, so presumably the author would also have to write this instance? If so - would that really be any different to using that fold? It doesn't make sense anyway. It would have to be Kleisli m a a which would presumably require a newtype. Tom

Re: [Haskell-cafe] ANN: rematch, an library for composable assertions with human readable failure messages

2013-04-16 Thread Tom Crayford
to change the core API for that to work out). Tom On 16 April 2013 15:09, Roman Cheplyaka r...@ro-che.info wrote: Hi Tom, This is a neat idea! I'd like to use something like this in smallcheck and test-framework-golden. The main obstacle to that is that your package depends on QuickCheck

Re: [Haskell-cafe] unsafeInterleaveST (and IO) is really unsafe [was: meaning of referential transparency]

2013-04-11 Thread Tom Ellis
* if y is forced before x, then writeSTRef r True is run after readSTRef r, thus the latter yields False Tom ___ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org/mailman/listinfo/haskell-cafe

Re: [Haskell-cafe] Numerics and Warnings

2013-04-10 Thread Tom Ellis
not solve your other issues though. Tom ___ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org/mailman/listinfo/haskell-cafe

Re: [Haskell-cafe] Numerics and Warnings

2013-04-10 Thread Tom Ellis
to keep code warning free. Actually it's problem with warnings and I don't think adding some ad-hoc rules for generating warning is necessarily bad idea Like I demonstrated in my reply to Barak, there is a way around this which does not require adding ad-hoc complexity to the compiler. Tom

Re: [Haskell-cafe] Numerics and Warnings

2013-04-10 Thread Tom Ellis
(fromIntegral n) xs genericTake 44 foobar Hi Barak, I don't write a lot of numeric code so I am under-educated in this area. Could you write a more substantial example so I get a clearer idea of what's going on? Thanks, Tom

Re: [Haskell-cafe] Prolog-style patterns

2013-04-08 Thread Tom Murphy
themselves in the foot too often. That said, I'm happy without it. Tom ___ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org/mailman/listinfo/haskell-cafe

Re: [Haskell-cafe] Haskell is a declarative language? Let's see how easy it is to declare types of things.

2013-04-06 Thread Tom Ellis
On Sat, Apr 06, 2013 at 05:14:48PM -0400, Albert Y. C. Lai wrote: On 13-04-05 04:56 AM, Tom Ellis wrote: any is very ambiguous. Doesn't the problem go away if you replace it with all? Yes, that is even better. The world would be simple and elegant if it did things your way, and would

  1   2   3   4   5   6   7   >