: it is desugared as described elsewhere in the
thread and in the Report.
HTH, Jochem
--
Jochem Berndsen | joc...@functor.nl
___
Haskell-Cafe mailing list
Haskell-Cafe@haskell.org
http://www.haskell.org/mailman/listinfo/haskell-cafe
On 05/29/2010 08:05 PM, Gregory Collins wrote:
Matt Parkermoonmaster9...@gmail.com writes:
Q3: Which HTML version would you preferably use?
HTML 5. google summer of code should be about pushing the new and exciting.
Yes, definitely, this should be the default IMO.
+1
--
Jochem
but a type class), they need not be of the
same type (e.g., 3 could be of type Integer, and 4 of type Double).
Jochem
--
Jochem Berndsen | joc...@functor.nl
___
Haskell-Cafe mailing list
Haskell-Cafe@haskell.org
http://www.haskell.org/mailman/listinfo
.
Cheers, Jochem
--
Jochem Berndsen | joc...@functor.nl
___
Haskell-Cafe mailing list
Haskell-Cafe@haskell.org
http://www.haskell.org/mailman/listinfo/haskell-cafe
:: forall a. Eq a = a - a - Bool
z = y
g :: (Bool, Bool)
g = (f x, f z) -- note the use of z here instead of y
Jochem
--
Jochem Berndsen | joc...@functor.nl
___
Haskell-Cafe mailing list
Haskell-Cafe@haskell.org
http://www.haskell.org/mailman
that. My
other hobby is evolution and evolutionary psichology. I really
recommend to learn about it.
Could you point us to any evidence that supports your assumption that
there are sexual differences in mathematical abilities?
Thanks, Jochem
--
Jochem Berndsen | joc...@functor.nl
the same thing as a sequence of Unicode
bytes when you use UTF8.
What is a Unicode byte?
Cheers, Jochem
--
Jochem Berndsen | joc...@functor.nl
___
Haskell-Cafe mailing list
Haskell-Cafe@haskell.org
http://www.haskell.org/mailman/listinfo/haskell
, Jochem
--
Jochem Berndsen | joc...@functor.nl
___
Haskell-Cafe mailing list
Haskell-Cafe@haskell.org
http://www.haskell.org/mailman/listinfo/haskell-cafe
multiplication is not a group. (The
only invertible elements of this monoid are 1 and -1.)
Now, here's the question: Is is correct to say that [3, 5, 8] is a
monad?
In what sense would this be a monad? I don't quite get your question.
Cheers, Jochem
--
Jochem Berndsen | joc...@functor.nl
Luke Palmer wrote:
On Wed, Jan 27, 2010 at 11:39 AM, Jochem Berndsen joc...@functor.nl wrote:
Now, here's the question: Is is correct to say that [3, 5, 8] is a
monad?
In what sense would this be a monad? I don't quite get your question.
I think the question is this: if m is a monad
access control
provided by the OS on multi-user machines (i.e., other users working on
the same machine can connect to localhost:8080 too). This might or might
not be a concern for you.
Regards, Jochem
--
Jochem Berndsen | joc...@functor.nl | joc...@牛在田里.com
Data.List.
HTH, regards, Jochem
--
Jochem Berndsen | joc...@functor.nl | joc...@牛在田里.com
___
Haskell-Cafe mailing list
Haskell-Cafe@haskell.org
http://www.haskell.org/mailman/listinfo/haskell-cafe
Steffen Schuldenzucker wrote:
data Foo a = Foo a
instance Functor Foo where
fmap f (Foo x) = Foo . f . f $ x
I think this doesn't typecheck.
Cheers, Jochem
--
Jochem Berndsen | joc...@functor.nl | joc...@牛在田里.com
___
Haskell-Cafe mailing
literal wherever your program expects
a Double, Int, Integer, and so on. This includes your own type. You have
probably defined fromInteger = Scalar for your type.
Cheers, Jochem
--
Jochem Berndsen | joc...@functor.nl | joc...@牛在田里.com
___
Haskell-Cafe
'good guy' who think he's
robin hood if he can 'hack' the server )
is an every day reality.
You should validate your data in any case. You may even turn a DoS
attack into a real security problem with your solution.
Cheers, Jochem
--
Jochem Berndsen | joc...@functor.nl | joc...@牛在田里.com
nerds
___
Haskell-Cafe mailing list
Haskell-Cafe@haskell.org
http://www.haskell.org/mailman/listinfo/haskell-cafe
Jochem Berndsen wrote:
nerds
This was a friend of mine trying to be funny.
Apologies, Jochem
--
Jochem Berndsen | joc...@functor.nl | joc...@牛在田里.com
___
Haskell-Cafe mailing list
Haskell-Cafe@haskell.org
http://www.haskell.org/mailman/listinfo
result in output f.
You might want to use the functions ord and chr from Data.Char, and the
mod function from the Prelude.
Regards, Jochem
--
Jochem Berndsen | joc...@functor.nl | joc...@牛在田里.com
___
Haskell-Cafe mailing list
Haskell-Cafe@haskell.org
http
)) ([],[])
This works but can't find (~) operator anywhere. Please explain or site a
reference.
This is called a lazy pattern.
See:
http://www.haskell.org/tutorial/patterns.html
section 4.4
Cheers, Jochem
--
Jochem Berndsen | joc...@functor.nl | joc...@牛在田里.com
to compromise the system.
Cheers, Jochem
--
Jochem Berndsen | joc...@functor.nl | joc...@.com
___
Haskell-Cafe mailing list
Haskell-Cafe@haskell.org
http://www.haskell.org/mailman/listinfo/haskell-cafe
On Sun, Nov 01, 2009 at 07:58:00AM -0600, Thomas Hartman wrote:
http://hackage.haskell.org
Hackage is down currently, I am seeding the torrent by mauke from IRC on
http://mauke.ath.cx/tmp/2009-10-19-hackage-archive.torrent
Cheers, Jochem
--
Jochem Berndsen | joc...@functor.nl | joc...@牛在田里
.
Cheers, Jochem
--
Jochem Berndsen | joc...@functor.nl | joc...@牛在田里.com
___
Haskell-Cafe mailing list
Haskell-Cafe@haskell.org
http://www.haskell.org/mailman/listinfo/haskell-cafe
) is
equivalent to looping, except that calling error is pragmatically
speaking better: it is nicer to the caller of your function (they/you
get to see a somewhat more descriptive error message instead of 100% CPU
without any results).
Regards, Jochem
--
Jochem Berndsen | joc...@functor.nl | joc...@牛在田里.com
= (\ (f :: forall a. a - a) - f f True) id
Cheers, Jochem
--
Jochem Berndsen | joc...@functor.nl | joc...@牛在田里.com
___
Haskell-Cafe mailing list
Haskell-Cafe@haskell.org
http://www.haskell.org/mailman/listinfo/haskell-cafe
that's what he is used to.
This may or may not be true. It would be interesting to see some
research on this. Without that, I think we cannot decide either way.
Cheers, Jochem
--
Jochem Berndsen | joc...@functor.nl | joc...@牛在田里.com
___
Haskell-Cafe
. zipWith (*) (map (2^) [0..])
I'd turn this into
sum . zipWith (*) (iterate (2*) 1)
, but it's probably not very important.
Regards, Jochem
--
Jochem Berndsen | joc...@functor.nl | joc...@牛在田里.com
___
Haskell-Cafe mailing list
Haskell-Cafe@haskell.org
http
seminar (if any) and even if they are in
Spanish (nothing is impossible for man with a dictionary)
And what if they're in Portuguese? ;)
Cheers, Jochem
--
Jochem Berndsen | joc...@functor.nl | joc...@牛在田里.com
___
Haskell-Cafe mailing list
Haskell-Cafe
.
This means that you either have to downgrade data-accessor, or trash out the
Category instance in Yi/Prelude.hs line 182.
FYI: I had the same problem this morning. Using data-accessor 0.2.0.2
worked.
Regards, Jochem
--
Jochem Berndsen | joc...@functor.nl | joc...@牛在田里.com
the ExistentialTypes
extension. This declares a so-called existential type, see the wiki for
details, http://www.haskell.org/haskellwiki/Existential_types .
Note that the second occurrence of GridWidget defines a data
constructor, not a type constructor.
Cheers, Jochem
--
Jochem Berndsen | joc
, in the way described above?
To parse HTML documents, I've had success with TagSoup in the past. You
can take a look at the HTTP package to download the HTML from the
server. Both packages are available from Hackage.
HTH, Jochem
--
Jochem Berndsen | joc...@functor.nl
with the maximum number of
menu items you should use. There is of course a limit, but there is no
reason to limit it to 7+-2.
Cheers,
--
Jochem Berndsen | joc...@functor.nl
GPG: 0xE6FABFAB
___
Haskell-Cafe mailing list
Haskell-Cafe@haskell.org
http
, there has been a lot of activity on the debian-haskell
mailing list lately (debian-hask...@lists.debian.org) so there will
probably some progress quite soon! (Not sure if it will be in time for
Ubuntu 9.10 though).
Cheers,
--
Jochem Berndsen | joc...@functor.nl
GPG: 0xE6FABFAB
, this is undefined?
I have done something similar as you, except that I filled the related
field with an unsafePerformIO fetching the related data from the database.
Regards,
--
Jochem Berndsen | joc...@functor.nl
GPG: 0xE6FABFAB
___
Haskell-Cafe mailing
operator.
I totally agree. (+) is too asymmetric for my taste, like (=) and
(*) it suggests asymmetry between the arguments. (++) is symmetric and
suggests an associative operator to me.
--
Jochem Berndsen | joc...@functor.nl
GPG: 0xE6FABFAB
___
Haskell-Cafe
'unsafePerformIO' will work, but a better idea might be to
understand why your solver has IO in its type signature. Is this because
of FFI calls? You can remove IO in FFI calls if they are free from side
effects as well.
Regards,
--
Jochem Berndsen | joc...@functor.nl
GPG: 0xE6FABFAB
of clean, pure code, and impure code in the IO monad (your
main function, which can be pretty small in your case). To avoid
boilerplate, you can use the Writer monad, for example, but others may
have better suggestions.
Kind regards,
--
Jochem Berndsen | joc...@functor.nl
GPG: 0xE6FABFAB
to somebody
who reads your code (including yourself) that this omission was intentional.
The same holds for other warnings (although I sometimes am annoyed by
the shadowing warnings, I agree :).
My default is to start developing, then adding -Wall -Werror and make it
compile again.
Regards,
--
Jochem
the same about exceptions, but they are a
necessary evil ;-).
Regards,
--
Jochem Berndsen | joc...@functor.nl
GPG: 0xE6FABFAB
___
Haskell-Cafe mailing list
Haskell-Cafe@haskell.org
http://www.haskell.org/mailman/listinfo/haskell-cafe
,
--
Jochem Berndsen | joc...@functor.nl
GPG: 0xE6FABFAB
___
Haskell-Cafe mailing list
Haskell-Cafe@haskell.org
http://www.haskell.org/mailman/listinfo/haskell-cafe
of it :)
Regards,
--
Jochem Berndsen | joc...@functor.nl
GPG: 0xE6FABFAB
___
Haskell-Cafe mailing list
Haskell-Cafe@haskell.org
http://www.haskell.org/mailman/listinfo/haskell-cafe
,
--
Jochem Berndsen | joc...@functor.nl
GPG: 0xE6FABFAB
___
Haskell-Cafe mailing list
Haskell-Cafe@haskell.org
http://www.haskell.org/mailman/listinfo/haskell-cafe
Deniz Dogan wrote:
2009/6/14 Jochem Berndsen joc...@functor.nl:
Toby Miller wrote:
caps1 s = all (\x - isUpper (head x)) (words s)
This seems fine, but you need to check that words never returns a list
containing the empty string (otherwise `head' will fail).
Is there any such case? I
string all words
start with an uppercase letter, don't they? (If it's True, you can even
remove this clause, and let the other one take care of the rest.)
Regards,
--
Jochem Berndsen | joc...@functor.nl
GPG: 0xE6FABFAB
___
Haskell-Cafe mailing list
Haskell
]
5050
so the garbage collector do the job in freeing the consumed part of the
list
This is correct; the function you defined is equivalent to foldl' in
Data.List, if I'm not mistaken.
Regards,
--
Jochem Berndsen | joc...@functor.nl
GPG: 0xE6FABFAB
be nonstrict.
Regards,
--
Jochem Berndsen | joc...@functor.nl
GPG: 0xE6FABFAB
___
Haskell-Cafe mailing list
Haskell-Cafe@haskell.org
http://www.haskell.org/mailman/listinfo/haskell-cafe
Deniz Dogan wrote:
2009/6/13 Jochem Berndsen joc...@functor.nl:
Keith Sheppard wrote:
Is there any reason that sum isn't strict? I can't think of any case
where that is a good thing.
Prelude sum [0 .. 100]
*** Exception: stack overflow
It is useful if the (+) is nonstrict; although I
Daniel Fischer wrote:
Am Samstag 13 Juni 2009 17:00:36 schrieb Jochem Berndsen:
Deniz Dogan wrote:
2009/6/13 Jochem Berndsen joc...@functor.nl:
Keith Sheppard wrote:
Is there any reason that sum isn't strict? I can't think of any case
where that is a good thing.
Prelude sum [0 .. 100
If I replace ByteString with the ordinary String, the above programs can be
compiled and linked.
Can someone tell me what I did wrong here?
Add -package bytestring to the ghc command line options. I believe that
adding --make also may work.
Regards,
--
Jochem Berndsen | joc...@functor.nl
separately.
GHC 6.10.1 ships with base-4.0.0.0, later versions in the 6.10.x series
may have a somewhat later version.
Regards,
--
Jochem Berndsen | joc...@functor.nl
GPG: 0xE6FABFAB
___
Haskell-Cafe mailing list
Haskell-Cafe@haskell.org
http
,
--
Jochem Berndsen | joc...@functor.nl
GPG: 0xE6FABFAB
___
Haskell-Cafe mailing list
Haskell-Cafe@haskell.org
http://www.haskell.org/mailman/listinfo/haskell-cafe
as Map to shorten the notation.
HTH,
--
Jochem Berndsen | joc...@functor.nl
GPG: 0xE6FABFAB
___
Haskell-Cafe mailing list
Haskell-Cafe@haskell.org
http://www.haskell.org/mailman/listinfo/haskell-cafe
you to write Data.Map.Map everywhere instead of just 'Map'.
Regards,
--
Jochem Berndsen | joc...@functor.nl
GPG: 0xE6FABFAB
___
Haskell-Cafe mailing list
Haskell-Cafe@haskell.org
http://www.haskell.org/mailman/listinfo/haskell-cafe
michael rice wrote:
I don't understand your response. I copied the imports from Hoogles Data.Map
page. What should the imports be?
Michael
The imports are fine, but instead of 'fromList' you should use
'Map.fromList' or 'Data.Map.fromList'.
Regards,
--
Jochem Berndsen | joc...@functor.nl
.
Seems pretty cool :) Will this graph be interactive during the run of
the program?
(I tried to comment on the web page -- however, it didn't let me.
Firefox 3.0 on Debian)
Cheers,
--
Jochem Berndsen | joc...@functor.nl
GPG: 0xE6FABFAB
___
Haskell-Cafe
profiling.
Regards,
--
Jochem Berndsen | joc...@functor.nl
GPG: 0xE6FABFAB
___
Haskell-Cafe mailing list
Haskell-Cafe@haskell.org
http://www.haskell.org/mailman/listinfo/haskell-cafe
.
Please someone point me in the right direction. Thanks.
Just
rationals :: Integer - String
suffices. (Without the argument 'n'.)
This makes sense, since rationals has type Integer. rationals n has
type String. (But you still cannot declare that in toplevel that way.)
Regards,
--
Jochem Berndsen
Jochem Berndsen wrote:
This makes sense, since rationals has type Integer
I meant Integer - String obviously.
Regards,
--
Jochem Berndsen | joc...@functor.nl
GPG: 0xE6FABFAB
___
Haskell-Cafe mailing list
Haskell-Cafe@haskell.org
http
already cabalized the code, so it
should suffice to upload it.
Cheers
--
Jochem Berndsen | joc...@functor.nl
GPG: 0xE6FABFAB
___
Haskell-Cafe mailing list
Haskell-Cafe@haskell.org
http://www.haskell.org/mailman/listinfo/haskell-cafe
patterns, but they
are a bit more advanced.) I'm not sure what you are trying to
accomplish, could you elaborate?
Cheers,
--
Jochem Berndsen | joc...@functor.nl
GPG: 0xE6FABFAB
___
Haskell-Cafe mailing list
Haskell-Cafe@haskell.org
http://www.haskell.org
applebiz89 wrote:
main :: IO ()
main = do
doFilmsInGivenYear films
main
You pass as argument to 'doFilmsInGivenYear' the value 'films', which is
not defined. Instead, I think you meant 'testDatabase'.
All the best,
--
Jochem Berndsen | joc...@functor.nl
GPG: 0xE6FABFAB
that this yields
False
the 101st Fibonacci number
True
but this violates referential transparency.
Cheers,
--
Jochem Berndsen | joc...@functor.nl
GPG: 0xE6FABFAB
___
Haskell-Cafe mailing list
Haskell-Cafe@haskell.org
http://www.haskell.org/mailman
with a capital or a : (colon).
So changing your definition into
data Graph a b = Empty | Context a b : Graph a b
will work.
If you want you can define
() = (:)
and use the symbol for constructing graphs (not in pattern matches
though).
HTH,
--
Jochem Berndsen | joc...@functor.nl
GPG: 0xE6FABFAB
Haskell is bringing the message Not in scope: data constructor `:'
Why is that so?
This works for me. Are the definitions in the same file? Otherwise, you
will need to import your definition.
All the best,
--
Jochem Berndsen | joc...@functor.nl
GPG: 0xE6FABFAB
://www.haskell.org/ghc
Regards,
--
Jochem Berndsen | joc...@functor.nl
GPG: 0xE6FABFAB
___
Haskell-Cafe mailing list
Haskell-Cafe@haskell.org
http://www.haskell.org/mailman/listinfo/haskell-cafe
ideas on how to fix this? I am using GHC version 6.10.1 on Windows XP.
Did you use --make ?
Regards,
--
Jochem Berndsen | joc...@functor.nl
GPG: 0xE6FABFAB
___
Haskell-Cafe mailing list
Haskell-Cafe@haskell.org
http://www.haskell.org/mailman/listinfo
be the type of firstCoord?
Typically, you'd use
data Pair a b = P { firstCoord :: a
, secondCoord :: b
}
or
firstCoord (P x _) = x
secondCoord (P _ y) = y
Regards,
--
Jochem Berndsen | joc...@functor.nl
GPG: 0xE6FABFAB
having to install zlib1g-dev using the package manager,
aptitude install zlib1g-dev
should suffice. If this was not the problem, please post the exact error
message so we can figure out what's going wrong.
Regards,
--
Jochem Berndsen | joc...@functor.nl
GPG: 0xE6FABFAB
://www.cis.upenn.edu/~byorgey/papers/typeclassopedia-draft-090216.pdf
Also see my blog post for a bit more info:
http://byorgey.wordpress.com/2009/02/16/the-typeclassopedia-request-for-feedback/
This is really great! Thanks for doing this.
Regards,
--
Jochem Berndsen | joc...@functor.nl
GPG
? For efficiency reasons?
It's a pity because a parallel-outermost strategy would be complete.
(*) is strict in both arguments for Int. If you want to avoid this, you
could do
newtype X = X Int
and write your own implementation of (*) that is nonstrict.
--
Jochem Berndsen | joc...@functor.nl
GPG
/HAppS/msg/d128331e213c1031 .
The Happstack project is intended to continue development. For more
details, see http://happstack.com/faq.html .
--
Jochem Berndsen | joc...@functor.nl
GPG: 0xE6FABFAB
___
Haskell-Cafe mailing list
Haskell-Cafe@haskell.org
http
.
Regards,
--
Jochem Berndsen | [EMAIL PROTECTED]
GPG: 0xE6FABFAB
signature.asc
Description: This is a digitally signed message part
___
Haskell-Cafe mailing list
Haskell-Cafe@haskell.org
http://www.haskell.org/mailman/listinfo/haskell-cafe
71 matches
Mail list logo