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 wrote: > Status update for my haskell synth csound-expression. The

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 > > wrote: > > > I introduce a very simple extension to the Lens datatype from Control.Lens > >

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 > wrote: > > I introduce a very simple extension to the Lens datatype from Control.Lens > > that allows it to work with Arrows: > > > > https://gist.g

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

2013-10-07 Thread Tom Ellis
applicative, 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-cafe] Lenses that work with Arrows

2013-10-07 Thread Tom Ellis
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] 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

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

2013-10-02 Thread Tom Ellis
ps. I had a quick skim of http://www.haskell.org/ghc/docs/latest/html/libraries/containers/Data-Map-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 "equa

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 &

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

2013-10-01 Thread Tom Ellis
ation between IO and f. I don't know whether there are simpler sufficient conditions that allow one to determine that such an instance is also an applicative 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
IO a -> t a and require that liftIO (pure x) = pure x liftIO (f <*> x) = liftIO f <*> liftIO x Seems like ApplicativeIO makes more sense than MonadIO, which is unnecessarily restrictive. With planned Functor/Applicative/Monad shuffle, the former could completely replace t

[Haskell-cafe] Product Profunctor and Contravariant

2013-09-29 Thread Tom Ellis
data from a database into Haskell, and both of them come 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 h

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

2013-09-20 Thread Tom Ellis
22776601683795 == 3.1622776601683796 True Prelude> 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 ___

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] Bytestring map/zipWith rationale

2013-09-12 Thread Tom Ellis
-> ByteString -> ByteString -> [a] Well, what if you 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] 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

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

2013-09-06 Thread Tom Ellis
>Prelude> (`id` 1) (\y -> show y ++ ".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

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

2013-09-04 Thread Tom Ellis
d a file and store 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-

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

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

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

2013-08-27 Thread Tom Ellis
list `seq` return () "return ()" is not excessiely lazy, is it? Could you explain further? Tom ___ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org/mailman/listinfo/haskell-cafe

Re: [Haskell-cafe] Lifting strictness to types

2013-08-22 Thread Tom Ellis
xplicit thunk datatype. NB OCaml essentially 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 ___

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

2013-08-19 Thread Tom Ellis
their possibly-exception-throwing values in a newtype ThisMightThrowAnException a = ThisMightThrowAnException 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] Errors in non-monadic code

2013-08-19 Thread Tom Ellis
ns, you can easily > forget to handle the exception if you're 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-Ca

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

2013-08-19 Thread Tom Ellis
t; short name 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.ha

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

2013-08-18 Thread Tom Ellis
l-simple dealt 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] Database.postgreSQL.Simple - ambigious type

2013-08-17 Thread Tom Ellis
Info > query_ conn "select 2 + 2" Either 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] inv f g = f . g . f

2013-08-17 Thread Tom Ellis
(dropWhile isSpace) . 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] Applicative is like an Arrow

2013-08-16 Thread Tom Ellis
to know more about 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
> haskell-indentation (part 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

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 > 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 w

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 > > > &g

Re: [Haskell-cafe] Identity of indiscernibles

2013-08-08 Thread Tom Ellis
le -> IO Double csin x = liftF (Foreign "math.h sin" x id) 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. >

Re: [Haskell-cafe] Identity of indiscernibles

2013-08-08 Thread Tom Ellis
no claims about 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 (Was: Alternative name for return)

2013-08-08 Thread Tom Ellis
good characterisation. I do not, however, have a good candidate 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 (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 co

Re: [Haskell-cafe] Alternative name for return

2013-08-08 Thread Tom Ellis
;>>x is only evaluated once, but/executed/ twice. For IO, that means > >>>magic. For other types, it means different things. For Identity, twice = > >>>id! > >>> > >Your point being? x is the same thing regardless of how many times you > >run it. > > W

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 thi

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] 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 http://www.haskell.org

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

2013-07-31 Thread Tom Ellis
e that the *number* 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] ANNOUNCE: hdbi-1.0.0 and hdbi-postgresql-1.0.0

2013-07-31 Thread Tom Ellis
hould use 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.or

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

2013-07-31 Thread Tom Ellis
e access libraries in other 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 nec

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

2013-07-25 Thread Tom Ellis
rgument to 'write_period' is only used in the Nothing branch of the massive case 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
c.org/full+laziness 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-cafe

Re: [Haskell-cafe] memoization

2013-07-22 Thread Tom Ellis
full laziness transformation http://foldoc.org/full+laziness and indeed 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

Re: [Haskell-cafe] memoization

2013-07-22 Thread Tom Ellis
t think they are truly eta-expasions because of the desugaring 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 __

Re: [Haskell-cafe] memoization

2013-07-22 Thread Tom Ellis
x + 1 In what sense is the former 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
nd if not I hope someone will chime in with a correction. I spent some 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-Caf

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

2013-07-16 Thread Tom Ellis
e > with Cfg's fields 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 Identit

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 Haskell-

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

2013-07-09 Thread Tom Nielsen
e bugs you find! Links: BayesHive, including 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.

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

2013-07-09 Thread Tom Ellis
Google Groups > 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

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

2013-07-02 Thread Tom Ellis
> getA :: String, > getB :: String, > getC :: IOS > } deriving (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 -&g

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] "Casting" newtype to base type?

2013-07-01 Thread Tom Ellis
_ = True An Eq instance for something containing IO is bound to lead to puzzlement somewhere down the line. I think you're better off defining something like data P_lesser = P_lesser { a_lesser :: String, b_lesser :: String } deriving (Show, Eq) t

Re: [Haskell-cafe] question about indentation conventions

2013-07-01 Thread Tom Ellis
expression (even if > the expression is not the leftmost element of the line). > > This means for example that > f (g x > y > z) > is OK but > f (g x > y z) > is not. It se

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 ht

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 wrote: > > > Are there any best-practices I should be aware of with Arrows? Or is > >

[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.

Re: [Haskell-cafe] data constructor names

2013-06-22 Thread Tom Ellis
x27;s fine as far as the compiler is concerned 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.or

Re: [Haskell-cafe] opengl type confusion

2013-06-17 Thread Tom Ellis
d that > > (0.0::GLdouble) (0.0::GLdouble) (0.0::GLdouble) > > is not required. I 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 expli

Re: [Haskell-cafe] opengl type confusion

2013-06-16 Thread Tom Ellis
:: GLdouble) is still requried on the first to fix the type there. How else could 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
e 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] 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 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 by use, feedback,

Re: [Haskell-cafe] (no subject)

2013-06-10 Thread Tom Ellis
will >always spiritually remain 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-Caf

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

2013-06-07 Thread Tom Ellis
en you want 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

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

2013-06-07 Thread Tom Ellis
pposite" in the sense of inverse, since as Roman points out "op Constructor :: n -> o" is the inverse of "Constructor :: o -> n". But I admit I do not see how this provides value over "unpack" itself. Tom ___ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org/mailman/listinfo/haskell-cafe

[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
n something like your implementing "the exact same data type from scratch". By "duplication of functionality", on the other hand, I mean providing two libraries with similar APIs which essentially serve the same purpose. I believe you are sug

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

2013-06-04 Thread Tom Ellis
Just to clarify for those on the sidelines, the issue is duplication of implementation details, rather than duplication of functionality? 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
required to commute with all member functions of A. Perhaps 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] 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 => P

Re: [Haskell-cafe] Type classes

2013-05-28 Thread Tom Ellis
e started with. Given an ArrowApply "_ ~> _", 2) shows that "() ~> _" is a Monad. Thus by 1) "_ -> (() ~> _)" is an ArrowApply. I believe this should 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
eader monad. Check out the instance implementations for "Monad (Reader r)" and "Monad (CoKleisli w 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 ht

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 http://www.haskell.org/mailman/listinfo/has

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

2013-05-21 Thread Tom Ellis
t some people 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
, 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 ___ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org/mailman/listinfo/haskell-cafe

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 / (fromIn

Re: [Haskell-cafe] fromIntegral not enough?

2013-05-13 Thread Tom Ellis
efined -- To be coded... Your 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] 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 of

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 differen

Re: [Haskell-cafe] Backward compatibility

2013-05-03 Thread Tom Murphy
of 2011. When new major 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 ___

Re: [Haskell-cafe] Backward compatibility

2013-05-03 Thread Tom Ellis
example, IO became System.IO, List became 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

Re: [Haskell-cafe] Backward compatibility

2013-05-02 Thread Tom Ellis
ain the string "getPackageId". You're 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

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 > > http://www.infor

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.1

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 l

Re: [Haskell-cafe] Backward compatibility

2013-05-02 Thread Tom Ellis
ode breaks with the latest 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] 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

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

2013-04-16 Thread Tom Crayford
ative`/`Functor` instances is beyond me right now (I guess I'd have to change the core API for that to work out). Tom On 16 April 2013 15:09, Roman Cheplyaka wrote: > Hi Tom, > > This is a neat idea! I'd like to use something like this in smallcheck > and test-framework-golde

Re: [Haskell-cafe] Monad fold

2013-04-16 Thread Tom Ellis
work for you? > I can't find an instance for Monoid (Kleisli m a b) 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 hav

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 assert

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

2013-04-16 Thread Tom Crayford
;ve seen in other languages (cough ruby cough) with every 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@

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

2013-04-11 Thread Tom Ellis
InterleaveST defers the computation of x, so * if x is forced before y, then "writeSTRef r True" is run before "readSTRef r", thus the latter yields "True" * if y is forced before x, then "writeSTRef r True" is run after "readSTRef r&qu

Re: [Haskell-cafe] Numerics and Warnings

2013-04-10 Thread Tom Ellis
ng you > get is not the *right* warning. Example: > > genericTake n xs = take (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 s

Re: [Haskell-cafe] Numerics and Warnings

2013-04-10 Thread Tom Ellis
fully) and one > wants 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

Re: [Haskell-cafe] Numerics and Warnings

2013-04-10 Thread Tom Ellis
) energy mass = mass * c^2 This does 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] Prolog-style patterns

2013-04-08 Thread Tom Murphy
hemselves 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 w

  1   2   3   4   5   6   7   8   >