Hi,
I have just released a prototype implementation of a tool
(http://hackage.haskell.org/package/sloth) for checking whether a function is
unnecessarily strict. It is inspired by Olaf Chitils StrictCheck tool
(http://www.cs.kent.ac.uk/people/staff/oc/) but does not propose improvements
that l
Hi,
On Jan 2, 2012, at 2:34 PM, Heinrich Apfelmus wrote:
> Without an explicit guarantee that the function is incremental, we can't do
> anything here. But we can just add another constructor to that effect if we
> turn ListTo into a GADT:
>
>data ListTo a b where
>CaseOf :: b
On Jul 30, 2011, at 12:40 AM, Sebastian Fischer wrote:
> Interesting. However I don't understand why the instance in Section
> 5.5 is not already forbidden by the "purity law"
>
>traverse pure = pure
>
> and a "'no duplication' constraint" would be necessary. For example:
>
>traverse I
Hi,
On Jul 29, 2011, at 10:15 PM, Conal Elliott wrote:
> Is there a collection of laws associated with the Foldable class? Or for
> Traversable? - Conal
if you are not aware of "The essence of the Iterator pattern" by Jeremy Gibbons
and Bruno Oliveira
(http://citeseerx.ist.psu.edu/viewdoc/do
On 12.02.2011, at 21:18, Aaron Gray wrote:
I was wondering if anyone had an idea or estimate as to how large
the Haskell community is ?
All the answers made me wonder what the criterion is to be a member of
the Haskell community. Are you a member if you downloaded ghc, if you
have (at le
Hi,
On 22.01.2011, at 08:12, Sebastian Fischer wrote:
Also, Jan, I don't understand your comment about continuation
monads. Maybe I am a bit numb today.. What property do you mean do
continuation monads have or not?
I was wrong there. If there exist values x and y with x /= y and you
hav
On 21.01.2011, at 11:52, Daryoush Mehrtash wrote:
Do I have to have MonadPlus m or would any other Monad class work
the same way?
Not all monad instances satisfy
undefined >>= return . Just = undefined
if that's what you are asking for. For example, consider the identity
monad.
in
On 20.01.2011, at 22:18, Daryoush Mehrtash wrote:
I am having hard time understanding the following paragraph in
"Purely functional Lazy non-deterministic programing" paper http://www.cs.rutgers.edu/~ccshan/rational/lazy-nondet.pdf
The problem with the naive monadic encoding of non-determi
On 02.10.2010, at 20:35, Henning Thielemann wrote:
On Sat, 2 Oct 2010, Colin Paul Adams wrote:
Prelude> (if then "Haskell" else "Cafe") False
Max> "Cafe"
My reaction is to ask:
Can you write this as:
(if then else) False "Haskell" "Cafe"
?
Sure:
ifThenElse :: Bool -> a -> a ->
Hi,
On 01.10.2010, at 09:57, Wolfgang Jeltsch wrote:
I think this is much more readable, since you can easily see which of
those lines belong together.
I wonder whether there are empirical results which show that a certain
kind of spacing is more readable for a certain kind of programmer (f
On 10.09.2010, at 23:58, Felipe Lessa wrote:
H...
On Fri, Sep 10, 2010 at 6:47 PM, Jan Christiansen
wrote:
instance Applicative Proj where
pure = Proj . const
Proj f <*> Proj x = Proj (\p -> f (False:p) (x (True:p)))
(pure f) <*> Proj x
=== Proj (cons
Dear Applicative experts,
I am seeking advice on Applicative instances and their use in
traverse. Consider the following Applicative instance.
newtype Proj a = Proj { unProj :: [Bool] -> a }
instance Functor Proj where
fmap g (Proj f) = Proj (g . f)
instance Applicative Proj where
On 03.09.2010, at 14:38, Daniel Fischer wrote:
I can't reproduce that. For me, it leaks also with profiling.
Have you used optimizations? It disappears if I compile the program
with -O2.
Without profiling I get the following. Here the maximum residency is
nearly 45MB.
$ ghc --make Tem
Hi,
On 02.09.2010, at 13:41, Daniel Fischer wrote:
takes a little to run and keeps the entire file until the first
occurrence
of pat in memory.
first of all thanks very much for the detailed instructions.
I have rewritten the example slightly using Strings instead of
Bytestrings. Replaci
Hi,
On 02.09.2010, at 01:35, Daniel Fischer wrote:
It's not that it's not as non-strict as possible per se. (Sorry, had
to :)
It's that intersperse's current definition (in GHC at least) can
cause a
space leak. In this case, making the function less strict can cure
it, in
other cases, mor
Hi,
there is a new ticket that Data.List.intersperse is not as non-strict
as possible (http://hackage.haskell.org/trac/ghc/ticket/4282). I have
observed some other functions which are unnecessarily strict and it
might be advantageous to change their definitions as well.
I think it is know
Hi,
i am replying to a thread called "Data.List permutations" on ghc-
users and a thread called "powerSet = filterM (const [True,
False]) ... is this obfuscated haskell?" on haskell cafe.
On 04.08.2009, at 19:48, Slavomir Kaslev wrote:
A friend mine, new to functional programming, was ent
Hi,
On 30.06.2009, at 11:55, Hemanth Kapila wrote:
Can some one please suggest something on simulating some sort of
"object-Ids" in Haskell?
I mean, something like the following relation will hold:
> a1 == a2 = (objectID a1) == (objectID a2)
I am not quite sure but perhaps Stable Names a
Hi,
I have tried to implement a memo function using stable names and weak
pointers like it is presented in the paper "stretching the storage
manager". There is an abstract datatype SNMap a b which implements a
map that maps values of type StableName a to values of type b. The map
is locat
Hi,
this is a very nice example.
On 08.06.2009, at 14:31, Eugene Kirpichov wrote:
Cool! Probably one should start teaching with 'case' instead of
pattern function definitions; that would put an accent on what is
forced and in what order.
I like this idea.
Only after the student understands
Hi,
On 26.05.2009, at 21:24, Lauri Alanko wrote:
Mercury also has type classes and other Haskellisms, so if you're
interested in "doing Prolog the Haskell way", you should definitely
have a look at it.
I have to admit that I am not very familiar with Mercury. But if you
are looking for "doi
Hi,
On 08.05.2009, at 13:14, Miguel Mitrofanov wrote:
I have a question regarding the connection between monads and
comonads. I always thought of the comonad operations as being the
inverse operations of the corresponding monad functions.
That's not true.
I thought there is some kind of
Hi,
I have a question regarding the connection between monads and
comonads. I always thought of the comonad operations as being the
inverse operations of the corresponding monad functions. As I do not
know the underlying theory I thought I simply ask the masters.
Is there a formal verific
Hi,
On 16.04.2009, at 05:08, Matt Morrow wrote:
And i forgot to include the defs of (co)prod:
prod (><) p1 p2 = (\a -> p1 a >< p2 a)
I think this one is liftM2 of the ((->) a) Monad instance.
Cheers, Jan
___
Haskell-Cafe mailing list
Haskell-C
Hi,
On 15.04.2009, at 13:28, Sebastian Fischer wrote:
Actually, there are a number of implementations that implement the
same behaviour as the original version, e.g.,
diag = concat . foldr diags []
where
diags [] ys = ys
diags (x:xs) ys = [x] :
Thomas Davie wrote:
>
> Further to all the playing with unamb to get some very cool behaviors,
> you might want to look at Olaf Chitil's paper here:
>
> http://www.cs.kent.ac.uk/pubs/2006/2477/index.html
>
> It outlines a tool for checking if your programs are as non-strict as
> they can
Am 14.01.2009 um 15:26 schrieb Henning Thielemann:
See the List functions in
http://hackage.haskell.org/cgi-bin/hackage-scripts/package/
utility-ht
Version 0.0.1 was before applying StrictCheck, 0.0.2 after
processing its suggestions. I have stopped when I saw that it
repeatedly shows
Hi,
Am 12.01.2009 um 14:37 schrieb Henning Thielemann:
On Mon, 12 Jan 2009, Jan Christiansen wrote:
I am not sure whether this would be a good idea. The original
version makes a lot of suggestions which are not satisfiable but
it is not at all trivial to decide which are satisfiable and
Hi,
Although it seems to be overkill for a single module - How about a
cabalized version on Hackage and a darcs repository? It would
simplify using and updating it.
I am not sure whether this would be a good idea. The original version
makes a lot of suggestions which are not satisfiable b
This is great. I am working on the very same topic for quite a while
now. My aim is to develop a tool that tells you whether a function is
least strict. My work is based on an idea by Olaf Chitil:
http://www.cs.kent.ac.uk/people/staff/oc/
I think he was the first who introduced the idea of l
On Wednesday 25 May 2005 17:20, Chung-chieh Shan wrote:
Jan Christiansen <[EMAIL PROTECTED]> wrote in article <[EMAIL PROTECTED]> in
gmane.comp.lang.haskell.cafe:
The problem is that I don't know how to express the composition of
type constructors like the function (.) for o
Hi!
I would like to define a type class for a data structure that supports
a lookup and an update function like the following one.
class Mapping map key where
lookup :: key -> map v -> v
update :: key -> (v -> v) -> map v -> map v
Now I want to lift this to a class instance for tuples of k
32 matches
Mail list logo