Great package!
One question: Do you remove/inline type synonyms? I ask because I just ran into
this with some TH code. I'm looking for types that end with -> a, but that
fails when type synonyms are involved.
Sjoerd
On Aug 30, 2013, at 2:08 AM, Richard Eisenberg wrote:
> I've just uploaded m
On May 9, 2013, at 10:36 PM, Conal Elliott wrote:
> BTW, have you see the new paper The constrained-monad problem? I want to
> investigate whether its techniques can apply to Category & friends for linear
> maps and for circuits. Perhaps you’d like to give it a try as well. I got to
> linear m
Hi Conal,
> I’ve cloned your gist and tried out an idea to simplify verifying the
> required constraints on linear map values.
>
Lovely use of view patterns! It looks like it is not necessary to store the LM
value, all that is needed is to store that VS2 s a b is satisfied.
> Am I right in think
There's a flag to turn it off, does that work? Try cabal install
transformers-base -f-OrphanInstances
Sjoerd
On May 9, 2013, at 2:47 PM, jean-christophe mincke
wrote:
> Hello Café
>
> I am running into problems when installing transformers-base-0.4.1.
>
> Has anyone an idea about what is g
Hi Conal,
I have a package data-category that should be able to do this.
http://hackage.haskell.org/package/data-category
I tried implementing your linear map, and this is the result:
https://gist.github.com/sjoerdvisscher/5547235
I had to make some changes to your linear map data type, because
age/algebraic-classes
And if you have suggestions, issues (the Template Haskell code is far from
perfect at the moment) or pull-request, it is also on Github:
https://github.com/sjoerdvisscher/algebraic-classes
greetings,
Sjoerd Visscher
___
Haskell-Cafe
Maybe the vault package works for you?
http://hackage.haskell.org/package/vault
Sjoerd Visscher
On Oct 26, 2012, at 5:17 PM, Jon Fairbairn wrote:
> Twan van Laarhoven writes:
>
>> On 24/10/12 12:08, Jon Fairbairn wrote:
>>>
>>> Is there a convenient way of
So, in order not to have to rely on rewrite rules, would it be a good idea to
add unpackCString to the IsString class?
import GHC.Base (unpackCString#, Addr#)
class IsString a where
fromString :: String -> a
unpackCString :: Addr# -> a
unpackCString addr = fromString (unpackCString#
o learn more, you can find an introductory blog post here:
https://github.com/sjoerdvisscher/blog/blob/master/2012/2012-09-06%20constraint-based%20generics.md
Some complete examples are here:
https://github.com/sjoerdvisscher/one-liner/tree/master/examples
Some more generic functions, including generic
e?
>
>> library :: forall t. NetworkDescription t (Behavior t String) -> IO ()
>
> Regards,
> Alexander Foremny
>
> 2012/6/27 Sjoerd Visscher :
>> This should work:
>>
>>library :: (forall t. NetworkDescription t (Behavior t [Char])) -> IO ()
>&
f this kind of program is possible with Reactive.Banana at
> all.
>
> [1] https://gist.github.com/3004430
>
> ___
> Haskell-Cafe mailing list
> Haskell-Cafe@haskell.org
> http://www.haskel
s
>
> So try "-f-UseExtensions" if you really want that?
>
> Cheers,
> Andres
>
>
> --
> Andres Löh, Haskell Consultant
> Well-Typed LLP, http://www.well-typed.com
>
--
Sjoerd Visscher
https://github.com/sjoerdvisscher/blog
___
Haskell-Cafe mailing list
Haskell-Cafe@haskell.org
http://www.haskell.org/mailman/listinfo/haskell-cafe
dependency of
reactive-banana-0.6.0.0! How can I let cabal forget this dependency?
Thanks,
--
Sjoerd Visscher
https://github.com/sjoerdvisscher/blog
___
Haskell-Cafe mailing list
Haskell-Cafe@haskell.org
http://www.haskell.org/mailman/listinfo/haskell-cafe
th (+) x x])
gives [[1,1,2,3,5,8…], [1,2,4,8,16,32,64…]], and mfix (\x -> [f x, g x, h x]) =
[fix f, fix g, fix h]. For a list monad instance I would expect results with a
mixture of f, g and h (but that would not be productive).
Btw, you've asked this before and you got an interesting re
x27; (pure (return a))
> Q' fs <*> Q' as = Q' $ \r -> do
> rec
> f <- fs (contramap ($ a) r)
> a <- as (contramap (f $) r)
> return $ f a
[1] http://hackage.haskell.org/package/contravariant
--
Sjoerd Visscher
https://github.com/sjo
ething ? Is there a way to force ghc to ignore this ??
>
> Thanks
> ___
> Haskell-Cafe mailing list
> Haskell-Cafe@haskell.org
> http://www.haskell.org/mailman/listinfo/haskell-cafe
--
Sjoerd Visscher
https://github.com/sjoerdvisscher/blog
__
On Apr 28, 2012, at 2:40 AM, wren ng thornton wrote:
> On 4/26/12 3:52 PM, Roman Cheplyaka wrote:
>> * Tillmann Rendel [2012-04-26
>> 21:34:21+0200]
>>> Hi,
>>>
>>> Sjoerd Visscher wrote:
>>>> Just as there's a Foldable class, t
checkers could use the same API, but there's a
lot more to checking than that.
By the way, I uploaded 0.5.0 a few hours ago, which contains a generic
arbitrary implementation.
greetings,
--
Sjoerd Visscher
https://github.com/sjoerdvisscher/blog
___
Haskell-Cafe mailing list
Haskell-Cafe@haskell.org
http://www.haskell.org/mailman/listinfo/haskell-cafe
On Apr 26, 2012, at 12:54 AM, Stefan Holdermans wrote:
> Sjoerd,
>
> I am sorry, as I already wrote, I decided to deprecate the package.
That's too bad, I really love these kind of data structures. (That's why I keep
ranting about it, sorry about that.)
>
>> [3] defines the union as h(u) = m
I am pleased to announce the 5th version of the unfoldable package. (This is
the first announcement, you didn't miss anything.)
http://hackage.haskell.org/package/unfoldable-0.4.0
Just as there's a Foldable class, there should also be an Unfoldable class.
This package provides one:
class Unfo
On Apr 25, 2012, at 11:39 AM, Stefan Holdermans wrote:
> The union of two sets is typically defined as the smallest set that is a
> superset of both the operands; this definition extends nicely for multisets
> and hybrid sets [1,2,3].
[3] differs from [1] and [2] (and your implementation). [3]
On Apr 23, 2012, at 7:04 PM, Stefan Holdermans wrote:
> if this is what people have agreed on to be a sensible semantics for hybrid
> sets, I am fine implementing it like this.
I have a hard time believing you have implemented the semantics that people
have agreed on to be a sensible semantics
On Apr 23, 2012, at 4:34 PM, Stefan Holdermans wrote:
> Sjoerd,
>
This is not just about map, but it also a problem for the Monoid instance.
You are basically adding an extra identity element, 0, to the max monoid,
which works but is weird.
>
>>> Still that's how union is typic
On Apr 23, 2012, at 3:18 PM, Stefan Holdermans wrote:
> Sjoerd,
>
>> This is not just about map, but it also a problem for the Monoid instance.
>> You are basically adding an extra identity element, 0, to the max monoid,
>> which works but is weird.
>
> Still that's how union is typically def
This is not just about map, but it also a problem for the Monoid instance. You
are basically adding an extra identity element, 0, to the max monoid, which
works but is weird. You'll have to call norm everywhere to make it work, f.e.
you would expect this to work:
empty' = insert () $ delete ()
;
> Any groupoid on the multiplicities would do, I guess.
>
> As I wrote in my answer to Richard, max seems a better choise, as it nicely
> generalises mapping on sets.
>
> Cheers,
>
> Stefan
> ___
> Ha
issing something.
>>
>> ___
>> Haskell-Cafe mailing list
>> Haskell-Cafe@haskell.org
>> http://www.haskell.org/mailman/listinfo/haskell-cafe
>
> ___
> Haskell-Cafe mailing list
> Haskell-Cafe@haskell.org
> http://www.haskell.org/mailman/listinfo/haskell-cafe
>
--
Sjoerd Visscher
https://github.com/sjoerdvisscher/blog
___
Haskell-Cafe mailing list
Haskell-Cafe@haskell.org
http://www.haskell.org/mailman/listinfo/haskell-cafe
afe mailing list
> Haskell-Cafe@haskell.org
> http://www.haskell.org/mailman/listinfo/haskell-cafe
--
Sjoerd Visscher
https://github.com/sjoerdvisscher/blog
___
Haskell-Cafe mailing list
Haskell-Cafe@haskell.org
http://www.haskell.org/mailman/listinfo/haskell-cafe
a
complicated subject! (Have you tried multirec?)
Sjoerd
On Feb 26, 2012, at 12:21 AM, Thomas Schilling wrote:
> No that's correct. I have to say the multiplate code is incredibly
> hard to decipher.
>
> On 25 February 2012 19:47, Sjoerd Visscher wrote:
>
. Is that not correct?
Sjoerd
On Feb 25, 2012, at 7:15 PM, Thomas Schilling wrote:
> That will give you the wrong answer for an expression like:
>
> (let x = 1 in x + y) + x
>
> Unless you do a renaming pass first, you will end up both with a bound
> "x" and a free &
) . foldFor expr freeVariablesPlate
>>> freeVars $ Let ("x" := Con 42) (Add (EVar "x") (EVar "y"))
["y"]
--
Sjoerd Visscher
https://github.com/sjoerdvisscher/blog
___
Haskell-Cafe mailing list
Haskell-Cafe@haskell.org
http://www.haskell.org/mailman/listinfo/haskell-cafe
What a nice idea! Here's a list:
http://www.biblestudytools.com/genesis/1-24-compare.html
The German word is indeed Art, the French word is espèce.
Sjoerd
On Nov 13, 2011, at 9:31 PM, Paul Johnson wrote:
> An odd suggestion I know, but take a look at some bibles. The King James
> Bible uses
; _______
> Haskell-Cafe mailing list
> Haskell-Cafe@haskell.org
> http://www.haskell.org/mailman/listinfo/haskell-cafe
>
--
Sjoerd Visscher
http://w3future.com
___
Haskell-Cafe mailing list
Haskell-Cafe@haskell.org
http://www.haskell.org/mailman/listinfo/haskell-cafe
This way these laws hold for non-empty lists:
maximumBy f xs = last (sortBy f xs)
minimumBy f xs = head (sortBy f xs)
Sjoerd Visscher
On Sep 5, 2011, at 6:44 AM, Mario Blažević wrote:
>I was recently surprised to discover that the maximum and maximumBy
> functions always return the
t;= f) `mappend` lb) (rb `mappend` (r >>= f))
Let's see if this indeed behaves like the list monad.
fromList :: [a] -> Tree a
fromList [] = Empty
fromList xs = Node a (fromList l) (fromList r) where
(l, a:r) = splitAt (length xs `div` 2) xs
> toList $ fromList [10,20
? Now you can no longer comment out the
first line.
--
Sjoerd Visscher
___
Haskell-Cafe mailing list
Haskell-Cafe@haskell.org
http://www.haskell.org/mailman/listinfo/haskell-cafe
= x?
--
Sjoerd Visscher
___
Haskell-Cafe mailing list
Haskell-Cafe@haskell.org
http://www.haskell.org/mailman/listinfo/haskell-cafe
do that. Being able to serialize functions is just as dangerous as
having unsafePerformIO. If you don't use it, you don't have problems.
--
Sjoerd Visscher
http://w3future.com
___
Haskell-Cafe mailing list
Haskell-Cafe@haskell.org
http://www.haskell.org/mailman/listinfo/haskell-cafe
On Nov 11, 2010, at 3:36 PM, Dan Doel wrote:
> On Thursday 11 November 2010 6:22:06 am Sjoerd Visscher wrote:
>
>> The reasoning above is used regularly to shoot down some really useful
>> functionality. So what would go wrong if we chose to take the practical
>> p
tationally equal if the
type is (Float -> Float), or the speed or memory use might be different. Could
it not be that requiring them to be equal could just as well break things?
greetings,
Sjoerd Visscher
___
Haskell-Cafe mailing list
Haskell-Cafe@haskell.org
http://www.haskell.org/mailman/listinfo/haskell-cafe
s
> -- -- -- Other cases yet to come...
>
>
>
> Well, there is no way I can get it type-check. I think I must be misusing the
> type families (I tried with multi-param typeclasses and functional
> dependencies, but it ends up to be the same kind of nightmare...).
> _
Oct 23, 2010, at 6:07 PM, Max Bolingbroke wrote:
> On 23 October 2010 15:32, Sjoerd Visscher wrote:
>> A little prettier (the cata detour wasn't needed after all):
>>
>> data IdThunk a
>> type instance Force (IdThunk a) = a
>
> Yes, this IdThunk is key -
Alg (ListF Int) Int
sumAlg Nil = 0
sumAlg (Cons a r) = a + r
sumList :: List Int -> Int
sumList = fold sumAlg
It all works out very well, so this trick seems to be really useful!
Sjoerd
On Oct 23, 2010, at 4:05 PM, Sjoerd Visscher wrote:
>
> On Oct 23, 2010, at 1:2
ely the IdThunk does not get in the way when defining algebras:
sumAlg :: ListF Int (IdThunk Int) -> Int
sumAlg Nil = 0
sumAlg (Cons a r) = a + r
greetings,
Sjoerd Visscher
___
Haskell-Cafe mailing list
Haskell-Cafe@haskell.org
http://www.haskell.org/mailman/listinfo/haskell-cafe
oc/html/Language-ImProve-Tree.html
> ___
> Haskell-Cafe mailing list
> Haskell-Cafe@haskell.org
> http://www.haskell.org/mailman/listinfo/haskell-cafe
>
--
Sjoerd Visscher
http://w3future.com
___
Haskell-Cafe mailing list
Haskell-Cafe@haskell.org
http://www.haskell.org/mailman/listinfo/haskell-cafe
On Sep 17, 2010, at 10:39 PM, Ben Franksen wrote:
> What I actually wanted was a mathematical definition, though.
Here's a definition of pointed objects:
http://ncatlab.org/nlab/show/pointed+object
--
Sjoerd Visscher
sjo...@w3future.com
___
tHask f) = f
And indeed we have StrictIncl % (f . g) = StrictIncl % f . StrictIncl % g
But StrictIncl can't be a pointed functor, only endofunctors can be pointed.
--
Sjoerd Visscher
http://w3future.com
___
Haskell-Cafe mailing list
Haskell-Cafe@haskell.org
http://www.haskell.org/mailman/listinfo/haskell-cafe
. And is there any way to fix it?
>
>
> _______
> Haskell-Cafe mailing list
> Haskell-Cafe@haskell.org
> http://www.haskell.org/mailman/listinfo/haskell-cafe
>
--
Sjoerd Visscher
http://w3future.com
___
Haskell-Cafe mailing list
Haskell-Cafe@haskell.org
http://www.haskell.org/mailman/listinfo/haskell-cafe
On Jul 27, 2010, at 7:09 AM, Sebastian Fischer wrote:
> I'll add
>
>noMatch :: RegExp c
>noMatch = psym "[]" (const False)
Oh, by the way, with noMatch, eps, alt and seq_ RegExp is itself a Semiring,
but I'm not sure what that would do.
--
Sjo
ne all alternatives that start with the same regexp.
Yes, this was what I had at first too, but trying to match this on 8 items
takes 2 seconds and 9 items already takes one minute.
--
Sjoerd Visscher
http://w3future.com
___
Haskell-Cafe mailing list
Hi Sebastian,
I enjoyed this paper very much. Writing papers in the style of a play seems to
work very well! (although I think you should spice it up more if your want to
get it on Broadway)
It seems that only shift needs the reg field of the RegW datatype. So you can
also replace the reg fiel
to perform some automatic lifting so that app will work
> for any combination of ApplicativeF? Can I use Functor class
> or should I define my own type-class for this purpose? Is it
> possible at all?
Yes, it is possible, see the section "automating injections" in t
> * -> * where
BS :: BSFunctor Word8 Word8
instance RFunctor BSFunctor where
type F BSFunctor Word8 = B.ByteString
BS % f = B.map f
--
Sjoerd Visscher
___
Haskell-Cafe mailing list
Haskell-Cafe@haskell.org
http://www.haskell.org/mailman/listinfo/haskell-cafe
lightening names.
As functors map both types and functions, the following may be more readable,
with TMap mapping types, and fmap mapping functions:
> type family TMap f a :: *
> class RFunctor f where
> fmap :: f a b -> (a -> b) -> f
sition requires UndecidableInstances, because of the nested type
family application. Perhaps one day GHC will be able to tell that this is
structural recursion, and therefore not undecidable.
This is a variation on what I'm doing in data-category 0.2, which is not done
yet, but you can take a look here:
http://github.com/sjoerdvisscher/data-category/
greetings,
Sjoerd Visscher
___
Haskell-Cafe mailing list
Haskell-Cafe@haskell.org
http://www.haskell.org/mailman/listinfo/haskell-cafe
Applicative (Thingy i) where
pure x = Thingy $ fmap ($ x)
mf <*> mx = Thingy $ runThingy mx . runThingy mf . fmap (.)
Not allowing Functor i and adding Yoneda also works.
On Jun 27, 2010, at 1:43 PM, Sjoerd Visscher wrote:
> Hi Max,
>
> This is really interesting!
>
>
class constraints at all
is a good requirement. It only makes things more complicated, without providing
more insights.
I'd say that if class X requires a superclass constraint Y, then the instance
of X (D d) is allowed to have the constraint Y d. The above code then stays the
same, only with Yoneda removed and constraints added.
greetings,
--
Sjoerd Visscher
http://w3future.com
___
Haskell-Cafe mailing list
Haskell-Cafe@haskell.org
http://www.haskell.org/mailman/listinfo/haskell-cafe
;
> ___
> Haskell-Cafe mailing list
> Haskell-Cafe@haskell.org
> http://www.haskell.org/mailman/listinfo/haskell-cafe
>
>
> _______
> Haskell-C
tegory-extras?
>
> Regards
>
> ___
> Haskell-Cafe mailing list
> Haskell-Cafe@haskell.org
> http://www.haskell.org/mailman/listinfo/haskell-cafe
--
Sjoerd Visscher
http://w3future.com
___
b.com/sjoerdvisscher/data-category
greetings,
Sjoerd Visscher
___
Haskell-Cafe mailing list
Haskell-Cafe@haskell.org
http://www.haskell.org/mailman/listinfo/haskell-cafe
Ok, I've got product categories working:
> {-# LANGUAGE TypeOperators, TypeFamilies, MultiParamTypeClasses,
> ScopedTypeVariables, FlexibleContexts, FlexibleInstances, GADTs, RankNTypes,
> UndecidableInstances #-}
> import Prelude hiding ((.), id, fst, snd)
> import qualified Prelude
Suitable2
Hi all,
I want restricted categories, just like the rmonad package provides restricted
monads. The ultimate goal is to have a product category:
http://en.wikipedia.org/wiki/Product_category
> {-# LANGUAGE TypeOperators, TypeFamilies, MultiParamTypeClasses,
> FlexibleInstances, FlexibleContexts
pile out of the box. Maybe we could
> extend this 4th step also with an introduction to Cabal?
>
>
> Mitar
> ___
> Haskell-Cafe mailing list
> Haskell-Cafe@haskell.org
> http://www.haskell.org/mailman/listinfo/haskell-cafe
--
Sj
l-m32 ${1+"$@"} "$Iflag"
greetings,
Sjoerd Visscher
On Dec 20, 2009, at 1:31 AM, Duncan Coutts wrote:
> On Sat, 2009-12-19 at 09:39 +, Ozgur Akgun wrote:
>
>> I guess the following part is the problematic part: (But I've no idea
>> how to resolv
pping even).
Sjoerd
On Dec 3, 2009, at 11:47 AM, Holger Siegel wrote:
> Am Donnerstag, den 03.12.2009, 01:40 +0100 schrieb Sjoerd Visscher:
>> The idea is that there's just enough unwrapping such that you don't
>> need to use getDual and appEndo.
>
> Yes, but what
achim-breitner.de | http://www.joachim-breitner.de/
> Debian Developer: nome...@debian.org
> ___
> Haskell-Cafe mailing list
> Haskell-Cafe@haskell.org
> http://www.haskell.org/mailman/listinfo/haskell-cafe
--
Sjoerd Visscher
sjo...@w3future.com
___
Haskell-Cafe mailing list
Haskell-Cafe@haskell.org
http://www.haskell.org/mailman/listinfo/haskell-cafe
;
> 2)
> instance Monoid (Endo a)
> instance Monoid b => Monoid (a -> b)
>
>
> ___
> Haskell-Cafe mailing list
> Haskell-Cafe@haskell.org
> http://www.haskell.org/mailman/listinfo/haskell-cafe
--
Sjoerd Visscher
sjo...@w3future.com
ink that would clean things up a bit.
Keep on going, there's lots of fun ahead!
greetings,
Sjoerd
--
Sjoerd Visscher
sjo...@w3future.com
___
Haskell-Cafe mailing list
Haskell-Cafe@haskell.org
http://www.haskell.org/mailman/listinfo/haskell-cafe
and c.
There are also symmetrically-typed examples of these operators, but
the Set operations are easy and familiar.
Thanks,
Neil.
___
Haskell-Cafe mailing list
Haskell-Cafe@haskell.org
http://www.haskell.org/mailman/listinfo/haskell-c
erge xs [] = xs
merge (x:xs) (y:ys) = (x++y) : merge xs ys
But my feeling is that this can still be simplified further. Or at
least refactored so it is clear what actually is going on!
--
Sjoerd Visscher
sjo...@w3future.com
___
Haskell-Cafe mail
mport Control.Monad.Levels
import Data.FMList (fromList)
diagN = bfs . mapM fromList
--
Sjoerd Visscher
sjo...@w3future.com
___
Haskell-Cafe mailing list
Haskell-Cafe@haskell.org
http://www.haskell.org/mailman/listinfo/haskell-cafe
is).
* The implementation shows regularity and elegance.
Many thanks,
Martijn.
[1] http://hpaste.org/fastcgi/hpaste.fcgi/view?id=11515
___
Haskell-Cafe mailing list
Haskell-Cafe@haskell.org
http://w
On Nov 2, 2009, at 5:11 PM, Will Ness wrote:
Sjoerd Visscher w3future.com> writes:
Excuse me, 2 doesn't have to be in the list of smaller primes, as
we're only generating odd numbers:
primes = 2 : 3 : 5 : 7 : sieve [3] (drop 2 primes)
sieve qs@(q:_) (p:ps)
= [x | x<
On Nov 2, 2009, at 2:07 PM, Sjoerd Visscher wrote:
You can remove the "take k" step by passing along the list of primes
smaller than p instead of k:
primes = 2 : 3 : 5 : 7 : sieve [3, 2] (drop 2 primes)
sieve qs@(q:_) (p:ps)
= [x | x<-[q*q+2,q*q+4..p*p-2], and [(x`rem`p)/=
f.
So I take it to disprove the central premise of the article, and to
show
that simple lazy functional FAST primes code does in fact exist, and
that the PQ optimization - which value of course no-one can dispute
- is
a far-end optimization.
____
ntations.
Bob
--
The University of Edinburgh is a charitable body, registered in
Scotland, with registration number SC005336.
___
Haskell-Cafe mailing list
Haskell-Cafe@haskell.org
http://www.haskell.org/mailman/listinfo/haskell-cafe
-
guarantee with `seq` is that x
`seq` y will be _|_ if x is.
-Brent
_______
Haskell-Cafe mailing list
Haskell-Cafe@haskell.org
http://www.haskell.org/mailman/listinfo/haskell-cafe
--
Sjoerd Visscher
sjo...@w3future.com
___
Haskell-Cafe mailing list
Haskell-Cafe@haskell.org
http://www.haskell.org/mailman/listinfo/haskell-cafe
know?
I was looking for this page this morning and couldn't find it. Google
does have it in its cache either.
-- Johan
___
Haskell-Cafe mailing list
Haskell-Cafe@haskell.org
http://www.haskell.org/mailman/listinfo/haskell-cafe
--
Sjoe
"Cabal-Version: >= 1.2" or equivalent.
What is the "Cabal-Version" in the latter? Why I am getting this
warning?
Thanks, Vasili
___
Haskell-Cafe mailing list
Haskell-Cafe@haskell.org
http://www.haskell.org/mailman/listinfo/hask
_
Haskell-Cafe mailing list
Haskell-Cafe@haskell.org
http://www.haskell.org/mailman/listinfo/haskell-cafe
--
Sjoerd Visscher
sjo...@w3future.com
___
Haskell-Cafe mailing list
Haskell-Cafe@haskell.org
http://www.haskell.org/mailman/listinfo/haskell-cafe
de with GHC 6.10, and I
get two
firings of transform/transform.
Does that not happen for you?
Simon
--
Sjoerd Visscher
sjo...@w3future.com
___
Haskell-Cafe mailing list
Haskell-Cafe@haskell.org
http://www.haskell.org/mailman/listinfo/haskell-cafe
ings of transform/transform.
Does that not happen for you?
Simon
--
Sjoerd Visscher
sjo...@w3future.com
___
Haskell-Cafe mailing list
Haskell-Cafe@haskell.org
http://www.haskell.org/mailman/listinfo/haskell-cafe
ore the core output becomes manageable.
Sjoerd
-- ryan
On Mon, Jun 22, 2009 at 2:41 AM, Sjoerd
Visscher wrote:
Hi all,
I have a rewrite rule as follows:
{-# RULES
"transform/transform" forall (f::forall m. Monoid m => (a -> m) ->
(b -> m))
rm f (transform g
l) = transform (g.f) l
#-}
It fires on this code:
print $ transform (. (*2)) (transform (. (+1)) (upto 10))
But it doesn't fire on this code:
print $ map (*2) (map (+1) (upto 10)))
with
map g x = transform (. g) x
and with or without {-# INLINE map #-}.
Wha
f.e. the ChoiceT type from MonadLib, where bfs and idfsBy are
variations on runChoiceT. The ChoiceEff part might complicate things a
bit though. But I might be missing some essential detail.
greetings,
--
Sjoerd Visscher
sjo...@w3future.com
___
On Jun 19, 2009, at 3:35 PM, Sjoerd Visscher wrote:
> transform t l = FM $ \f -> unFM l (t f)
Unfortunately I couldn't get this code to type-check, so the library
doesn't use transform.
With some help from Martijn van Steenbergen the type turned out to be:
transform :: (
e library
doesn't use transform.
Sjoerd
On Jun 18, 2009, at 11:28 AM, Sebastian Fischer wrote:
On Jun 18, 2009, at 9:57 AM, Sjoerd Visscher wrote:
I am pleased to announce the first release of Data.FMList, lists
represented by their foldMap function: [...]
http://hackage.haskell
Jake
___
Haskell-Cafe mailing list
Haskell-Cafe@haskell.org
http://www.haskell.org/mailman/listinfo/haskell-cafe
--
Sjoerd Visscher
sjo...@w3future.com
___
Haskell-Cafe mailing list
Haskell-Cafe@haskell.org
http://www.haskell.org/mailman/listinfo/haskell-cafe
s my first package on Hackage, so any comments are welcome!
greetings,
Sjoerd Visscher
PS. What happened to the traverse encoded containers (see below)? It
turns out that it is a bit too generic, and functions like filter were
impossible to implement. FMLists still have a Traversable
structure.
newtype ShowContainer a = ShowContainer { doShowContainer :: String }
instance Functor ShowContainer where
fmap _ (ShowContainer x) = ShowContainer $ "(" ++ x ++ ")"
instance Applicative ShowContainer where
pure _ = ShowContainer "()"
ShowContainer l <*&g
This is one with functional lists:
diag = foldr1 (zipWith (.) $. id ~> (id:) ~> id)
$. map (++ repeat id) ~> takeWhile (not.null.($[]))
$. (map.map) (:) ~> ($[]) . mconcat
On Apr 20, 2009, at 1:48 PM, Sebastian Fischer wrote:
On Apr 18, 2009, at 2:48 AM, Sjoerd Vi
e grouped.
greetings,
--
Sjoerd Visscher
sjo...@w3future.com
___
Haskell-Cafe mailing list
Haskell-Cafe@haskell.org
http://www.haskell.org/mailman/listinfo/haskell-cafe
; m a -> m [a]
Am I missing something or should this have been called mreplicate?
greetings,
--
Sjoerd Visscher
sjo...@w3future.com___
Haskell-Cafe mailing list
Haskell-Cafe@haskell.org
http://www.haskell.org/mailman/listinfo/haskell-cafe
beautiful relations found in the rest of the
paper.
greetings,
Sjoerd Visscher
On Feb 19, 2009, at 4:21 AM, Conal Elliott wrote:
I have a draft paper some of you might enjoy, called "Denotational
design with type class morphisms".
Abstract:
Type classes provide a mechanism for va
I can't figure out what is going on or how I should fix this.
--
Sjoerd Visscher
sjo...@w3future.com
___
Haskell-Cafe mailing list
Haskell-Cafe@haskell.org
http://www.haskell.org/mailman/listinfo/haskell-cafe
sing would be:
instance (Monad m, U.UTF8Bytes string index) => Stream (U.UTF8
string)
m Char where
uncons = return . U.uncons
I did not do any performance measuring yet, I was glad I got it
working. Any comments on the code is appreciated!
greetings,
Sjoerd Visscher
{-# LANGUAGE Flex
g to write
to get UTF8 JSON parsing would be:
instance (Monad m, U.UTF8Bytes string index) => Stream (U.UTF8 string)
m Char where
uncons = return . U.uncons
I did not do any performance measuring yet, I was glad I got it
working. Any comments on the code is appreciated!
gree
42 AM, Luke Palmer wrote:
On Tue, Jan 13, 2009 at 4:39 PM, Sjoerd Visscher
wrote:
JSON is a UNICODE format, like any modern format is today.
ByteStrings are not going to work.
I don't understand this statement. Why can one not make a parser
from ByteStrings that can decode UTF-8?
_
Haskell-Cafe mailing list
Haskell-Cafe@haskell.org
http://www.haskell.org/mailman/listinfo/haskell-cafe
--
Sjoerd Visscher
sjo...@w3future.com
___
Haskell-Cafe mailing list
Haskell-Cafe@haskell.org
http://www.haskell.org/mailman/listinfo/haskell-cafe
99 matches
Mail list logo