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 e...@cis.upenn.edu wrote:
I'd use GADT syntax for this:
{-# LANGUAGE GADTs #-}
data Pair a where Pair :: Eq a = {x::a, y::a} - Pair a
Sjoerd
On Jul 18, 2013, at 1:05 PM, Christopher Done chrisd...@gmail.com wrote:
Hm, also, with equality constraints you can make the type parametrized, too:
data Pair a' = forall a.
What I always do is to write it like this:
equal pair@Pair{} = foo pair == bar pair
The {} syntax ensures that it doesn't matter how complex the Pair constructor
is.
Sjoerd
On Jul 18, 2013, at 1:52 PM, harry volderm...@hotmail.com wrote:
All of the proposed solutions seem to rely on pattern
On Jul 18, 2013, at 2:35 PM, harry volderm...@hotmail.com wrote:
Sjoerd Visscher-2 wrote
equal pair@Pair{} = foo pair == bar pair
Interesting solution, I didn't know you could do that. (Do all those who
suggested GADTs - you can add a type context to the constructor of a regular
data type
On May 9, 2013, at 10:36 PM, Conal Elliott co...@conal.net 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
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,
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
jeanchristophe.min...@gmail.com wrote:
Hello Café
I am running into problems when installing transformers-base-0.4.1.
Has
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 thinking
, 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 mailing list
Haskell-Cafe@haskell.org
http
You can avoid the error by replacing
eval :: Exp - (-) Memory Integer
with
eval :: Exp - Memory - Integer
which should be the same, but apparently isn't internally in GHC. This is
definitely a bug.
Sjoerd
On Oct 28, 2012, at 4:55 AM, José Romildo Malaquias j.romi...@gmail.com wrote:
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 jon.fairba...@cl.cam.ac.uk wrote:
Twan van Laarhoven twa...@gmail.com writes:
On 24/10/12 12:08, Jon Fairbairn wrote:
Is there a convenient way
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#
complete examples are here:
https://github.com/sjoerdvisscher/one-liner/tree/master/examples
Some more generic functions, including generic Show and Read:
https://github.com/sjoerdvisscher/one-liner/blob/master/src/Generics/OneLiner/Functions.hs
--
Sjoerd Visscher
https://github.com/sjoerdvisscher
Hi,
Note that nobody was suggesting two pragmas with incompatible behaviors, only
to have just one symbol reserved to still be able to have type operator
variables.
I do like your suggestion, although --c-- is quite a bit longer than ~.
Sjoerd
On Sep 17, 2012, at 6:28 PM, Iavor Diatchki
list
Glasgow-haskell-users@haskell.org
http://www.haskell.org/mailman/listinfo/glasgow-haskell-users
___
Glasgow-haskell-users mailing list
Glasgow-haskell-users@haskell.org
http://www.haskell.org/mailman/listinfo/glasgow-haskell-users
--
Sjoerd
a 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
://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
/3004430
___
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
. NetworkDescription t (Behavior t String) - IO ()
Regards,
Alexander Foremny
2012/6/27 Sjoerd Visscher sjo...@w3future.com:
This should work:
library :: (forall t. NetworkDescription t (Behavior t [Char])) - IO ()
greetings,
Sjoerd
On Jun 27, 2012, at 4:39 PM, Alexander Foremny wrote:
Hello
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 response:
http://haskell.1045720.n5.nabble.com/recursive-programming-in-applicative-functors-td3171239.html
--
Sjoerd Visscher
https
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/sjoerdvisscher/blog
___
Haskell-Cafe mailing list
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
On Apr 28, 2012, at 2:40 AM, wren ng thornton wrote:
On 4/26/12 3:52 PM, Roman Cheplyaka wrote:
* Tillmann Rendelren...@informatik.uni-marburg.de [2012-04-26
21:34:21+0200]
Hi,
Sjoerd Visscher wrote:
Just as there's a Foldable class, there should also be an Unfoldable
class
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 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]
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
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) =
mapping on sets.
Cheers,
Stefan
___
Haskell-Cafe mailing list
Haskell-Cafe@haskell.org
http://www.haskell.org/mailman/listinfo/haskell-cafe
--
Sjoerd Visscher
sjo...@w3future.com
___
Haskell
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 ()
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 defined for
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 typically defined for
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
-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
--
Sjoerd Visscher
https://github.com/sjoerdvisscher/blog
___
Haskell-Cafe mailing list
Haskell-Cafe@haskell.org
http://www.haskell.org/mailman/listinfo/haskell-cafe
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 sjo...@w3future.com wrote:
I don't understand what you mean
) (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
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 x.
On 25 February 2012 16:29, Sjoerd Visscher sjo...@w3future.com wrote:
On Feb 24, 2012, at 10:09 PM, Stephen Tetley wrote:
I'm
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
rights there.
That could also be an obvious place to look, for newcomers, to get involved.
--
Vincent
___
Haskell-Cafe mailing list
Haskell-Cafe@haskell.org
http://www.haskell.org/mailman/listinfo/haskell-cafe
--
Sjoerd Visscher
http
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 *last
.
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,30] = (\x - fromList [x - 1, x, x + 1])
[9,10,11,19,20,21,29,30,31]
It works!
--
Sjoerd Visscher
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
be necessary.
I'm looking forward to a more active and exciting collection of potential
language changes for 2012, but it will only happen if you get involved.
Did anybody ever do a count on Hackage which language extensions are used the
most?
--
Sjoerd Visscher
?
--
Sjoerd Visscher
___
Haskell-Cafe mailing list
Haskell-Cafe@haskell.org
http://www.haskell.org/mailman/listinfo/haskell-cafe
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
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
path, and leave aside the theoretical
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
://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
greetings,
Sjoerd Visscher
___
Haskell-Cafe mailing list
Haskell-Cafe@haskell.org
http://www.haskell.org/mailman/listinfo/haskell-cafe
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:27 PM, Sebastian Fischer wrote:
I think
On Oct 23, 2010, at 6:07 PM, Max Bolingbroke wrote:
On 23 October 2010 15:32, Sjoerd Visscher sjo...@w3future.com 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 - in my own implementation I
-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
___
Haskell
, 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
://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
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
Haskell-Cafe@haskell.org
http
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.
--
Sjoerd Visscher
http://w3future.com
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
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 the Data Types
A La Carte paper.
greetings,
Sjoerd Visscher
With as example the list functor:
data List a b = List
type instance List `TMap` a = [a]
instance RFunctor List where
List `fmap` f = map f
I hope this helps.
greetings,
Sjoerd Visscher
___
Haskell-Cafe mailing list
Haskell-Cafe@haskell.org
http
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
://github.com/sjoerdvisscher/data-category/
greetings,
Sjoerd Visscher
___
Haskell-Cafe mailing list
Haskell-Cafe@haskell.org
http://www.haskell.org/mailman/listinfo/haskell-cafe
added.
greetings,
--
Sjoerd Visscher
http://w3future.com
___
Haskell-Cafe mailing list
Haskell-Cafe@haskell.org
http://www.haskell.org/mailman/listinfo/haskell-cafe
(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!
1. There exist total functions:
lift :: X
://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
http://w3future.com
___
Haskell-Cafe
-category
greetings,
Sjoerd Visscher
___
Haskell-Cafe mailing list
Haskell-Cafe@haskell.org
http://www.haskell.org/mailman/listinfo/haskell-cafe
?
Regards
___
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
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,
to Cabal?
Mitar
___
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
___
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
://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
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 does
Dual [1] `mappend Dual [2]
mean
)
___
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
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
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-cafe
--
Sjoerd Visscher
sjo...@w3future.com
://hpaste.org/fastcgi/hpaste.fcgi/view?id=11515
___
Haskell-Cafe mailing list
Haskell-Cafe@haskell.org
http://www.haskell.org/mailman/listinfo/haskell-cafe
--
Sjoerd Visscher
sjo...@w3future.com
___
Haskell-Cafe
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
) (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 mailing list
Haskell-Cafe
of course no-one can dispute
- is
a far-end optimization.
___
Haskell-Cafe mailing list
Haskell-Cafe@haskell.org
http://www.haskell.org/mailman/listinfo/haskell-cafe
--
Sjoerd Visscher
sjo...@w3future.com
On Nov 2, 2009, at 5:11 PM, Will Ness wrote:
Sjoerd Visscher sjoerd at 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-[q*q+2,q
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
--
Sjoerd Visscher
sjo...@w3future.com
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
where it is 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
--
Sjoerd
.
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/haskell-cafe
--
Sjoerd Visscher
sjo...@w3future.com
by decoupling tree creation from processing
and pruning.
___
Haskell mailing list
Haskell@haskell.org
http://www.haskell.org/mailman/listinfo/haskell
--
Sjoerd Visscher
sjo...@w3future.com
___
Haskell mailing list
://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
for you?
Simon
Rules.hs
--
Sjoerd Visscher
sjo...@w3future.com
___
Haskell-Cafe mailing list
Haskell-Cafe@haskell.org
http://www.haskell.org/mailman/listinfo/haskell-cafe
Rules.hs
--
Sjoerd Visscher
sjo...@w3future.com
___
Haskell-Cafe mailing list
Haskell-Cafe@haskell.org
http://www.haskell.org/mailman/listinfo/haskell-cafe
--
Sjoerd Visscher
sjo...@w3future.com
#-}
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 #-}.
What am I doing wrong?
--
Sjoerd Visscher
sjo
?
--
Sjoerd Visscher
sjo...@w3future.com
___
Haskell-Cafe mailing list
Haskell-Cafe@haskell.org
http://www.haskell.org/mailman/listinfo/haskell-cafe
--
Sjoerd Visscher
sjo...@w3future.com
___
Haskell
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 :: (forall b. Monoid b
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
___
Haskell-Cafe mailing list
Haskell
,
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 instance,
but only because the tree structure is (almost) undetectable, so
-cafe
--
Sjoerd Visscher
sjo...@w3future.com
___
Haskell-Cafe mailing list
Haskell-Cafe@haskell.org
http://www.haskell.org/mailman/listinfo/haskell-cafe
a) where
show = doShowContainer . traverse (ShowContainer . show)
greetings,
--
Sjoerd Visscher
sjo...@w3future.com
___
Haskell-Cafe mailing list
Haskell-Cafe@haskell.org
http://www.haskell.org/mailman/listinfo/haskell-cafe
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 Visscher wrote:
using
,
--
Sjoerd Visscher
sjo...@w3future.com
___
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
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 varied implementations
1 - 100 of 105 matches
Mail list logo