What a great error message:
qcgadt.hs:115:7:
My brain just exploded.
I can't handle pattern bindings for existentially-quantified constructors.
In the binding group
(Rep x) = uncompressRep s
In the definition of `uncompressRep':
uncompressRep (0 : 1 : 0 : s) = let
I'm making available the current state of my 2D charting library for
haskell. It's still at quite an early stage, but may prove useful. At
present it has:
- line charts, points charts, fills, and combinations.
- Automatic layout sizing and adjustment.
- Auto scaling of axis
Am Dienstag, 9. Mai 2006 14:44 schrieb Maurizio Monge:
[...]
Since this was a real pain, i think that something like this (maybe a more
polished version) should go into GLUT (as, for instance, ALUT do have some
audio file loading facilities).
The design rationale for the
The design rationale for the OpenGL/GLUT/OpenAL/ALUT packages is that they
should exactly mirror the standardize native API behind them in a
Haskell-friendly way. GLUT is only a simple, portable GUI for OpenGL-based
program (handling windows, menus, callbacks, etc.) and it has no support for
On 2006-05-13, Manuel M T Chakravarty [EMAIL PROTECTED] wrote:
Stephanie Weirich:
Simon Peyton-Jones wrote:
My suggestion is this:
* Specify MPTCs in the main language
* Specify FDs in an Appendix (with some reasonably conservative
interpretation of FDs).
* A Haskell'
I am new to Haskell and found myself in a bind concerning the use of
the C types, CDouble in particular. I extract a CDouble via it's pointer
from a StorableArray. Since the array must interface with C the elements of
the array must be CDouble. Now I'd like to use Text.Printf to format print
Udo Stenzel wrote:
Eugene Crosser wrote:
This is my program:
module Main where
import Data.Map
main = printMax . (foldr processLine empty) . lines = getContents
processLine line map = insertWith (\new old - new + old) line 1 map
printMax map = putStrLn $ show $ foldWithKey
Eugene Crosser wrote:
Having read Yet another Haskell tutorial (note on p.20), doesn't foldl
have to read the complete list before it can start processing it
(beginning from the last element)? As opposed to foldr that can fetch
elements one by one as they are needed?
They're complementary.
Eugene Crosser wrote:
Having read Yet another Haskell tutorial (note on p.20), doesn't foldl
have to read the complete list before it can start processing it
(beginning from the last element)? As opposed to foldr that can fetch
elements one by one as they are needed?
Both foldl and foldr
Hi, I know the question is raised often but i cannot find the answer.
In a previous mail, I was said to use foldl' instead of foldl and it
worked really well :
acc1 values = foldl1' (+) values
How is foldl' defined ?
I have two other related questions :
What if I want to write something
Udo Stenzel wrote:
Eugene Crosser wrote:
Having read Yet another Haskell tutorial (note on p.20), doesn't foldl
have to read the complete list before it can start processing it
(beginning from the last element)? As opposed to foldr that can fetch
elements one by one as they are needed?
Eugene Crosser wrote:
Anyway, I understand that you used 'seq' in your example as a way to
strictify the function that updates accumulator. Could you (or
anyone) explain (in plain English, preferably:) the reason why 'seq' is
the way it is. In the first place, why does it have the first
Eugene Crosser wrote:
Anyway, I understand that you used 'seq' in your example as a way to
strictify the function that updates accumulator. Could you (or
anyone) explain (in plain English, preferably:) the reason why 'seq' is
the way it is. In the first place, why does it have the first
Am Sonntag, 14. Mai 2006 09:30 schrieb SevenThunders:
I am new to Haskell and found myself in a bind concerning the use of
the C types, CDouble in particular. I extract a CDouble via it's pointer
from a StorableArray. Since the array must interface with C the elements
of the array must be
Thanks that helps a bit. The realToFrac type coercion works, but ultimately
it seems
that printf won't play nice. Consider this simple haskell code
module Test
where
import IO
-- import Data.Array.Storable
import Text.Printf
import Foreign.C.Types (CInt, CDouble )
y :: CDouble
y =
On Sunday 14 May 2006 03:00 pm, SevenThunders wrote:
Thanks that helps a bit. The realToFrac type coercion works, but
ultimately it seems
that printf won't play nice. Consider this simple haskell code
module Test
where
import IO
-- import Data.Array.Storable
import Text.Printf
On 2006-05-12, Jeremy Shaw [EMAIL PROTECTED] wrote:
At Thu, 11 May 2006 23:05:14 +0100,
Brian Hulley wrote:
Of course the above could no doubt be improved but surely it is already far
easier to understand and much more powerful than the idiosyncratic text
based approach used in UNIX shells
On 2006-05-12, Max Vasin [EMAIL PROTECTED] wrote:
Brian == Brian Hulley [EMAIL PROTECTED] writes:
Brian Some other possibilities are:
Brian 1) Every command returns a pair consisting of result and return
Brian code
IMHO the distinction between command's output (to stdout and stderr)
and its
The rabbit hole goes a bit deeper I'm afraid
y :: CDouble
y = 5.2
u :: Double
u = realToFrac(y)
test = do printf %14.7g u
gives
Compiling Test ( test.hs, interpreted )
test.hs:14:11:
No instance for (PrintfType (t t1))
arising from use of `printf' at test.hs:14:11-16
SevenThunders wrote:
test.hs:14:11:
No instance for (PrintfType (t t1))
arising from use of `printf' at test.hs:14:11-16
Probable fix: add an instance declaration for (PrintfType (t t1))
In the result of a 'do' expression: printf %14.7g u
In the definition of `test':
I've been reading Phil Wadler's monad papers from the early '90s, and it's been
interesting to see how the monad concept evolved over the course of those years.
But I haven't been able to track down the first use of the do notation for
monads. Can anyone tell me where that came from? I'd
mvanier:
I've been reading Phil Wadler's monad papers from the early '90s, and it's
been interesting to see how the monad concept evolved over the course of
those years. But I haven't been able to track down the first use of the
do notation for monads. Can anyone tell me where that came
22 matches
Mail list logo