Martin Huschenbett wrote:
readValue :: Field - (forall s. SqlBind s = s) - Value
readValue _ = ...
That works just fine. But now I want a version of readValue that has a
Maybe wrapped around the second parameter and that shall call readValue
in the case of a Just and emptyValue in the
Hello Martin,
Friday, March 23, 2007, 11:37:16 PM, you wrote:
readValue' :: Field - Maybe (forall s. SqlBind s = s) - Value
Thank you very much, that's exactly what I wanted. After reading in the
GHC users guide about rank 2 polymorphism I thought that this is not
possible. Chapter 7.4.8.
On 3/24/07, Chris Eidhof [EMAIL PROTECTED] wrote:
Given all these issues, I consider the only reasonable option is to
discard the Prelude entirely. There will be no magic modules.
Everything will be an ordinary library. HOFs like (.) are available
from Control.Function. List ops come from
apfelmus schrieb:
For me, the fourth trial works, at least on
f :: (forall s . Num s = Maybe s) - Int
f y = case y of
Just x - x
Nothing - 0
This works, because the compiler knows that x has to have type Int. But
if you want to apply a function g :: (forall a. Num a
Martin Huschenbett schrieb:
My thoughts were that for any class C the types
Maybe (forall a. C a = a) (I will call it T1 for short)
and
(forall a. C a = Maybe a) (I will call it T2 for short)
are isomorphic. Defining the isomorphism from T1 to T2 is quite simple:
iso1 :: Maybe (forall
Hi
Reducing to just haskell-cafe - since this isn't yet a concrete
proposal - more just a discussion.
1. Namespace pollution
Do you want to overload (.) ? I think its good that some names mean
standard things. Maybe not as many as the prelude, but some standard
things are good.
This is a
Hi,
I'm experimenting using OpenGL and GLUT in Haskell using GHC. There
are modules Graphics.Rendering.OpenGL and Graphics.UI.GLUT. I am
using these.
I've encountered a strange bug which I'm having trouble with. If I
render a sphere and a plane, then the plane is facing the wrong way
On Friday 16 March 2007 21:24, Ian Lynagh wrote:
On Sun, Mar 11, 2007 at 08:18:44PM +, Dominic Steinitz wrote:
I have re-written the sha1 code so that it is (hopefully) easy to see
that it faithfully implements the algorithm (see
http://www.itl.nist.gov/fipspubs/fip180-1.htm). Having
On Sat, Mar 24, 2007 at 01:46:33PM +, Dominic Steinitz wrote:
Thanks. I'm trying to build just SHA1 but I am getting the following linker
errors. Do you know what option I should be adding?
[EMAIL PROTECTED]:~/sha11 ghc -o perfTest
perfTest.hs -iIgloo/darcs-unstable/src --make -lz
[ Small note: Library-related questions should better be directed to
[EMAIL PROTECTED], and for mails regardind the OpenGL/GLUT packages there
is the [EMAIL PROTECTED] mailing list. ]
On Saturday 24 March 2007 13:37, Ruben Zilibowitz wrote:
[...] I've encountered a strange bug which I'm having
On Friday 23 March 2007 18:55, Benjamin Franksen wrote:
[sorry for the somewhat longer rant, you may want to skip to the more
technical questions at the end of the post]
Twan van Laarhoven wrote:
I would like to announce version 0.3 of my Data.CompactString library.
Data.CompactString is a
On Saturday 24 March 2007 03:48, Stefan O'Rear wrote:
1. Namespace pollution
The Prelude uses many simple and obvious names. Most programs don't
use the whole Prelude, so names that aren't needed take up namespace
with no benefit. [...]
Even though I think that the current Prelude is far
On 24/03/07, Stefan O'Rear [EMAIL PROTECTED] wrote:
This is a ranty request for comments, and the more replies the better.
Without responding to any particular comment, my opinion is that we
should have a minimal Prelude with functions like (.) that couldn't be
reasonably redefined in any
Hi
I'm new here and this is my first mail to the list, so be gentle :)
I have some functions that build big strings by calling other functions and
appending the result, like
buildStuff =
func1 ++ func2 ++ func3 ++ func4
My idea is to have a monad with a concatenating , so that I can:
Leandro Penz wrote:
My idea is to have a monad with a concatenating , so that I can:
bulidStuff = do
func1
func2
func3
func4
You could do this, but it's easier to take advantage of the fact that []
is an instance of MonadPlus, and just use `mplus`.
b
My idea is to have a monad with a concatenating , so that I can:
bulidStuff = do
func1
func2
func3
func4
Leandro Penz
I actually did this recently for a project I have been working on.
First, an example:
output label a@(I.Add a1 a2 a3) = do
comment (show a)
mov' label eax a1
Leandro Penz wrote:
I have some functions that build big strings by calling other
functions and appending the result, like
buildStuff =
func1 ++ func2 ++ func3 ++ func4
The usual idiom is something like
buildStuff = concat [func1, func2, func3, func4]
Put the list elements on separate
On Sat, Mar 24, 2007 at 08:05:25PM +, Paul Johnson wrote:
strings, are instances of the Monoid class (i.e. they implement mplus in
the way you would expect). You just have to wrap a function around
Actually they don't.
[EMAIL PROTECTED]:/tmp$ ghc-6.4.2 -v0 -e 'main' X.hs
ABend
[EMAIL
Leandro Penz wrote:
buildStuff =
func1 ++ func2 ++ func3 ++ func4
My idea is to have a monad with a concatenating , so that I can:
bulidStuff = do
func1
func2
func3
func4
buildStuff = concat [
func1,
func2,
func3,
func4 ]
Remember, functional
hi!
i've just discovered this strange behaviour of existential quantifiers with
runST:
---
Prelude Control.Monad.ST :t runST (return ())
runST (return ()) :: ()
Prelude Control.Monad.ST :t runST $ (return ())
interactive:1:9:
Couldn't match expected type `forall s. ST s a'
On Sun, Mar 25, 2007 at 01:28:53AM +0100, Marc A. Ziegert wrote:
hi!
i've just discovered this strange behaviour of existential quantifiers with
runST:
---
Prelude Control.Monad.ST :t runST (return ())
runST (return ()) :: ()
Prelude Control.Monad.ST :t runST $ (return ())
On Sat, Mar 24, 2007 at 05:33:55PM -0700, Stefan O'Rear wrote:
types. Therefore the application (runST id) is illegal. (Sadly GHC
This should have been (id runST), oops.
Stefan
___
Haskell-Cafe mailing list
Haskell-Cafe@haskell.org
On Mar 24, 2007, at 2:36 AM, Sebastian Sylvan wrote:
On 3/24/07, Chris Eidhof [EMAIL PROTECTED] wrote:
Given all these issues, I consider the only reasonable option is to
discard the Prelude entirely. There will be no magic modules.
Everything will be an ordinary library. HOFs like (.)
G'day all.
Quoting Sven Panne [EMAIL PROTECTED]:
Even though I think that the current Prelude is far from perfect, one should
not forget that is a very solid foundation of a common language: If one
sees e.g. '(.)' or 'map', it is immediately clear to everybody what this
means, [...]
Unless
I agree with Sven, but...
What I want to push is a 'mathematically sound' numeric prelude. A proper
numerical prelude should have bona fide mathematical obects like groups,
rings, and fields underlying common numerical classes. It would be edifying
to the student who discovered that the
G'day all.
Quoting Henning Thielemann [EMAIL PROTECTED]:
http://darcs.haskell.org/htam/src/Numerics/ZeroFinder/Newton.hs
with
inverse t (\x-(x^2,2*x)) t
The problem with all such solutions was touched on by Longesh:
20 iterations is a bit arbitrary.
This isn't a one-liner, but
Hi, I installed OpenAL and ALUT bindings downloaded from
http://hackage.haskell.org/packages/archive/pkg-list.html and tried
compilation of HelloWorld.hs example which I got from
http://darcs.haskell.org/packages/ALUT/
But it returns errors as follow and I can not get an '.exe' file.
Though
On Sun, Mar 25, 2007 at 11:38:56AM +0900, Nobuhito Mori wrote:
Hi, I installed OpenAL and ALUT bindings downloaded from
http://hackage.haskell.org/packages/archive/pkg-list.html and tried
compilation of HelloWorld.hs example which I got from
http://darcs.haskell.org/packages/ALUT/
But
Chris Eidhof writes:
On Mar 24, 2007, at 2:36 AM, Sebastian Sylvan wrote:
The solution is simple:
* If there is a module M where clause in the beginning of the
file, then it's a proper module and shouldn't import the Prelude.
* If there is no module declaration then it's a
Thanks for reply. I'll report a bug if there is no new reply in two days.
Nobuhito
From: Stefan O'Rear [EMAIL PROTECTED]
To: Nobuhito Mori [EMAIL PROTECTED]
CC: haskell-cafe@haskell.org
Subject: Re: [Haskell-cafe] Link error in ALUT Hello, World
Date: Sat, 24 Mar 2007 19:43:18
On Sun, Mar 25, 2007 at 11:56:28AM +0900, Nobuhito Mori wrote:
Thanks for reply. I'll report a bug if there is no new reply in two days.
Why do you want to wait?
Reporting a bug is no more disruptive than posting on the ML .. and
it's obviously not your fault, since the code isn't yours.
Also,
I thought bug report is more official than ML. So I wanted to make this
problem more clear if possible (in other words, I'm a beginner of Haskell
and I was not convinced that this problem is suited to bug report).
Now O.K. I'll report a bug.
On Sun, Mar 25, 2007 at 11:56:28AM +0900, Nobuhito
On Sun, Mar 25, 2007 at 12:24:52PM +0900, Nobuhito Mori wrote:
I thought bug report is more official than ML. So I wanted to make this
problem more clear if possible (in other words, I'm a beginner of Haskell
and I was not convinced that this problem is suited to bug report).
Now O.K. I'll
On Sat, 2007-03-24 at 11:53 +, Neil Mitchell wrote:
This is a highly non-academic concern. Many widely used libraries,
such as Parsec, operate only on lists and not the newer and more
efficient sequence types, such as bytestrings.
Lists in Haskell are the nicest data structure, they
Upon more reflection...
From the Preface to the Haskell 98 Language and Libraries Report:
Haskell 98 was conceived as a relatively minor tidy-up of Haskell
1.4, making some simplifications, and removing some pitfalls for the
unwary. It is intended to be a stable language in sense the
G'day all.
Quoting Jason Creighton [EMAIL PROTECTED]:
Wouldn't this be a non-issue if the map in Prelude was fmap?
It would be a non-issue if a number of things were different, such
as if Data.Map were a Functor and map was the Functor map instead
of the list map.
Either way, it highlights at
On Sun, 2007-03-25 at 14:14 +1200, Vivian McPhail wrote:
[Conjecture 1 (2007). Haskell Mathematical Prelude and Mathematicians] If
Haskell had a mathematically sound prelude then more mathematicians would
use Haskell.
I agree, even though I've only been using Haskell for a few months.
37 matches
Mail list logo