On 10 Mar, Steve Frampton wrote:
My function looks sort of like this:
foo :: Int - [a]
foo 0 = []
foo x = ['1'] ++ foo(x - 1)
Since Haskell can infer types most of the time, try
foo 0 = []
foo x = ['1'] ++ foo(x - 1)
with this loaded into hugs you can then try
Main
Steve Frampton wrote:
Steve --
Try this:
foo :: Int - [Char]
leaving the rest as it is. On my copy of Hugs, (Hugs98 on Linux running with
the -98 option), it works fine.
Good luck!
-- Seth
Hello:
Okay, I'm [damn] confused regarding type-casting in Haskell. I'm trying
to write a
Steve Frampton wrote:
I'm having a lot of problems with "Declared type too general", "Type error
in application", etc. depending on what I try.
Well, it *is* too general. :)
My function looks sort of like this:
foo :: Int - [a]
foo 0 = []
foo x = ['1'] ++ foo(x - 1)
According to
Simon Peyton-Jones proposes:
A Haskell 98 addendum
[ ... ]
Well, the bits are frozen, but I propose to regard this as a gross
"typo" and add it to the typos page.
[ ... ]
So the "typo" fix I propose is
[ ... ]
Any objections?
Call it Haskell 1.6 ;-)
Best,
Steve Frampton wrote:
Okay, I'm [damn] confused regarding type-casting in Haskell.
Because there isn't any?
I'm trying
to write a function that accepts an integer and then returns a set (in
this case, a set of characters).
I'm having a lot of problems with "Declared type too general", "Type
Sven Panne [mailto:[EMAIL PROTECTED]] writes:
The types of the mutable array operations are a little bit messy, e.g.
writeCharArray :: Ix ix = MutableByteArray s ix - ix -
Char - ST s ()
but
writeWord8Array :: MutableByteArray RealWorld Int - Int
- Word8 - IO ()
Hi Folks,
I've put up a binary dist for sparc-sun-solaris2 at
http://research.microsoft.com/users/t-simonm/ghc/dist/working/ghc-pre-4.03-s
parc-sun-solaris2.tar.gz
This is built from our current sources (i.e. 4.02 + patches). Have fun!
Simon