On Fri, 6 Jul 2012, Dan Burton wrote:
Following the announcement of lens-family, I'm pleased to announce
lens-family-th 0.1.0.0, a Template Haskell library supplying macros to generate
lens-family lenses for fields of data types declared with record syntax.
Be warned that currently, type
I don't know if it is possible to add haddock to functions whose type
signatures are generated by template haskell.
Could the documentation be an argument of mkLenses?
Does haddock run on the template-haskell expanded code?
--
Russell O'Connor
I'm pleased to announce the first release of lens-family-core and
lens-family.
This package provide first class(†) functional references. In addition to
the usual operations of getting, setting and composition, plus integration
with the state monad, lens families provide some unique features:
In less than 5 minutes I can solve NP-Complete problems in restaurant
orders:
http://www.reddit.com/comments/24p2c/xkcd_does_anyone_else_feel_compelled_to_solve_this/c24pc5
On Mon, 27 Feb 2012, Arnaud Bailly wrote:
Hello Cafe,
I will be (re)presenting Haskell in a Batlle Language event
On Wed, 21 Dec 2011, Erik Hesselink wrote:
How does this relate to the Maybe lenses in fclabels [1]?
Erik
[1]
http://hackage.haskell.org/packages/archive/fclabels/1.0.4/doc/html/Data-Label-Maybe.html
It appears to be somewhere between similar and the same.
*** Comparison of API
Do you miss null references from your old imperative programming days?
Wish that the worlds best imperative language had null references? Now
your wishes have come true with the new partial-lens package!
partial-lens augment edwardk's data-lens package with partial lens.
Partial lenses are
On Tue, 20 Sep 2011, Alexander Solla wrote:
On Tue, Sep 20, 2011 at 1:22 PM, Jake McArthur jake.mcart...@gmail.com wrote:
On Tue, Sep 20, 2011 at 3:48 PM, Chris Smith cdsm...@gmail.com wrote:
But it would be the *wrong* thing to use as a desugaring for list range
notation.
On Sat, 27 Aug 2011, Sönke Hahn wrote:
Hi!
I was reading through the Typeclassopedia ([1]) and I was wondering which
type could be an instance of Pointed, but not of Applicative. But I can't
think of one. Any ideas?
(Identity :+: Store s) is a comonad that is also instance of Pointed, but
On Wed, 31 Aug 2011, rocon...@theorem.ca wrote:
On Sat, 27 Aug 2011, Sönke Hahn wrote:
Hi!
I was reading through the Typeclassopedia ([1]) and I was wondering which
type could be an instance of Pointed, but not of Applicative. But I can't
think of one. Any ideas?
(Identity :+: Store s)
On Thu, 2 Dec 2010, Petr Pudlak wrote:
Hi,
recently, I was studying how cartesian closed categories can be used to
describe typed functional languages. Types are objects and morphisms are
functions from one type to another.
Since I'm also interested in systems with dependent types, I
Multiplate is a lightweight generic library for mutually recursive data
types that won't make Conor lose his lunch.
Multiplate is an alternative extension of the Uniplate/Compos core design
to support mutually recursive datatypes in a way that is as powerful as
Compos, almost as easy to use
On Thu, 11 Nov 2010, Dan Doel wrote:
intensional equality: two values are provably equal if they evaluate to the
same normal form
extensional equality: this incorporates non-computational rules, like the
point-wise equality of functions.
Now, in a type theory where equality is
See http://www.haskell.org/pipermail/haskell/2006-September/018497.html
On Fri, 12 Nov 2010, Petr Pudlak wrote:
On Fri, Nov 12, 2010 at 07:52:53PM +0100, Petr Pudlak wrote:
Hi, I was playing with the following example I found in D.A.Turner's paper
Total Functional Programming:
data Bad a =
On Sat, 6 Nov 2010, Sebastian Fischer wrote:
Hello,
I'm curious and go a bit off topic triggered by your statement:
On Nov 6, 2010, at 12:49 PM, rocon...@theorem.ca wrote:
An applicative functor morphism is a polymorphic function,
eta : forall a. A1 a - A2 a between two applicative functors
An applicative functor morphism is a polymorphic function,
eta : forall a. A1 a - A2 a between two applicative functors A1 and A2
that preserve pure and *:
eta (pure c) = pure c
eta (f * x) = eta f * eta x
What do you guys call such a thing? My leading candidate is idomatic
transformation.
I was one of the people on #haskell discussing this with Anupam.
Note that that when you remove the signature of d, the result complies and
ghci will state the inferred type of d is exactly the signature that you
are not allowed to write.
In my opinion, this is a bug in the Haskell 98 report
On Fri, 14 May 2010, Derek Elkins wrote:
You did it wrong. All you did was Church encode the Either type.
Your bind is still doing a case-analysis. All you have to do is use
ContT r (Either e). The bind implementation for ContT is completely
independent of the underlying monad. It doesn't
On Fri, 16 Apr 2010, jerzy.karczmarc...@info.unicaen.fr wrote:
Somebody finally decided to ridiculise the system. If you want a good laugh,
see the patent 6,368,227. The search site is here:
As I recall some (patent?) laywer was simply teaching his kid how the
patent process worked, so the
On Thu, 15 Apr 2010, Maciej Piechotka wrote:
Are
f 0 = 1
f n = f (n - 1) + f (n - 2)
and
g 0 = 1
g n | n 0 = g (n - 1) + g (n - 2)
| n 0 = g (n + 2) - g (n + 1)
The same (morally) function?
Are:
f x = 2*x
and
f x = undefined
The same function
Try using the (x == y) == (f x = g
On Wed, 14 Apr 2010, Ashley Yakeley wrote:
On 2010-04-14 14:58, Ashley Yakeley wrote:
On 2010-04-14 13:59, rocon...@theorem.ca wrote:
There is some notion of value, let's call it proper value, such that
bottom is not one.
In other words bottom is not a proper value.
Define a proper value
On Wed, 14 Apr 2010, Ashley Yakeley wrote:
Joe Fredette wrote:
this is bounded, enumerable, but infinite.
The question is whether there are types like this. If so, we would need a new
class:
class Finite a where
allValues :: [a]
instance (Finite a,Eq b) = Eq (a - b) where
p == q
On Wed, 14 Apr 2010, Ashley Yakeley wrote:
On 2010-04-14 03:41, rocon...@theorem.ca wrote:
For example (Int - Bool) is a perfectly fine Compact set that isn't
finite
Did you mean Integer - Bool? Int - Bool is finite, but large.
Yes, I meant Integer - Bool.
--
Russell O'Connor
On Wed, 14 Apr 2010, Ashley Yakeley wrote:
On 2010-04-14 13:03, Alexander Solla wrote:
If you're willing to accept that distinct functions can represent the
same moral function, you should be willing to accept that different
bottoms represent the same moral value.
Bottoms should not be
On Thu, 13 Aug 2009, rocon...@theorem.ca wrote:
Actually you need five versions: The pure version, the pre-order traversal,
the post-order traversal, the in-order traversal, and the reverse in-order
traversal. And that is just looking at syntax. If you care about your
semantics you could
On Wed, 12 Aug 2009, Peter Verswyvelen wrote:
I kind of agree with the DDC authors here; in Haskell as soon as a
function has a side effect, and you want to pass that function to a
pure higher order function, you're stuck, you need to pick the monadic
version of the higher order function, if it
On Thu, 6 Aug 2009, Jeff Heard wrote:
I was wondering if Data.Colour supported Double-valued colour
components 1.0 or less than 0. I'm looking to create an HDR image
processing library, and Haskell has one of the most extensive and
correct colour models around, thanks to Russell. With 16bpcc
On Thu, 6 Aug 2009, rocon...@theorem.ca wrote:
On Thu, 6 Aug 2009, Jeff Heard wrote:
I was wondering if Data.Colour supported Double-valued colour
components 1.0 or less than 0. I'm looking to create an HDR image
processing library, and Haskell has one of the most extensive and
correct
Max Rabkin wrote:
On Sat, Jul 4, 2009 at 8:38 PM, Andrew
Coppinandrewcoppin at btinternet.com wrote:
A few reasons:
1. I never knew it existed. ;-)
A good reason. However, it's good to do a quick search over Hackage
before uploading (or before writing) so you know what's out there.
Also,
On Thu, 9 Jul 2009, rocon...@theorem.ca wrote:
You can use by lib without worrying about the CIE. You can use my library
without ever importing or using the word CIE. However, the CIE stuff is
there for those who need it.
Perhaps I (maybe with some help) need to make a tutorial on the
I wanted to pass this idea around the cafe to get some thoughts before
submitting a trac on this topic.
I'd like to see the mtl removed from the Haskell Platform.
The mtl was a tremendous step forward when it was developed. However, we
have learned a few things about monad transformers since
On Wed, 25 Mar 2009, Thomas Hartman wrote:
With the state version, there's a lot of behind-the-scenes magic, and
as we've seen, things can go wrong.
Also, the issue isn't infinite lists, but lists that are longer than
the sum of the partitions provided. The state monad partition version
goes
I also recommend reading
http://www.haskell.org/haskellwiki/IO_Semantics (mostly because I wrote
it). Feel free to improve upon it.
--
Russell O'Connor http://r6.ca/
``All talk about `theft,''' the general counsel of the American Graphophone
Company wrote,
On Fri, 23 Jan 2009, Luke Palmer wrote:
For example, it is possible to prove that foldr mappend mempty (x:xs) =
foldr1 mappend (x:xs). Which means that anywhere in the source where we see
the former, we can clean it up to the latter. However, if monad laws
don't apply to partial values, then
On Sat, 24 Jan 2009, Lennart Augustsson wrote:
You can dream up any semantics you like about bottom, like it has to
be () for the unit type.
But it's simply not true. I suggest you do some cursory study of
denotational semantics and domain theory.
Ordinary programming languages include
On Sat, 24 Jan 2009, Jake McArthur wrote:
What you said makes little sense to me either. ;) But I will try to fit the
pieces together as best I can.
It appears to me that you may be talking about isomorphisms between the
concepts we try to map to data types and the data representations
On Sun, 25 Jan 2009, Lauri Alanko wrote:
On Fri, Jan 23, 2009 at 08:10:38PM -0500, rocon...@theorem.ca wrote:
I'd like to argue that laws, such as monoid laws, do not apply to partial
values. But I haven't thought my position through yet.
Before you do, you may want to read Fast and Loose
On Fri, 23 Jan 2009, Derek Elkins wrote:
mempty `mappend` undefined = undefined (left identity monoid law)
The above definition doesn't meet this, similarly for the right identity
monoid law. That only leaves one definition, () `mappend` () = () which
does indeed satisfy the monoid laws.
So
Thanks for letting me reflect on this.
I assume that my final program (my final value) is always a total value.
Anything else is an error. Therefore, if we required relaxed monoid laws
of the form
x `mappend` mzero = x
then we could safely substitute (x `mappend` mzero) by x without
On Sun, 18 Jan 2009, Ross Paterson wrote:
Anyone can check out the darcs repos for the libraries, and post
suggested improvements to the documentation to librar...@haskell.org
(though you have to subscribe). It doesn't even have to be a patch.
Sure, it could be smoother, but there's hardly a
What I don't understand is why Monoid and Monad are objectionable, while
Hash, Vector, Boolean, and Integer are (presumably) not objectionable.
They all appear equally technical to me.
--
Russell O'Connor http://r6.ca/
``All talk about `theft,''' the
On Fri, 2 Jan 2009, Achim Schneider wrote:
There are no lazy monads. Monads imply explicit sequencing... writing
I think this is an extremely bad thing to say and is a source of
misunderstanding about monads and evaluation. Most monads _are_ lazy, and
it is important to understand that
On Fri, 24 Oct 2008, Sebastian Sylvan wrote:
Another useful predefined space which I didn't see is the YCoCg space, which is
used in lots of
compression schemes (like H.264 IIRC).
YCoCg, like HLS and HSV, seems to not really be a colour space because it
isn't well specified. A
42 matches
Mail list logo