
This looks like a GHCi bug. Load data Test = Test instance Show Test where (The instance statement has no body.) Then enter Test at the prompt
Test
This bombs GHCi. It can't even be interrupted. It must be shut down
and restarted.
*
-- Russ*
On Mon, Nov 15, 2010 at 9:00 AM,
Send Beginners mailing list submissions to beginners@haskell.org
To subscribe or unsubscribe via the World Wide Web, visit http://www.haskell.org/mailman/listinfo/beginners or, via email, send a message with subject or body 'help' to beginners-request@haskell.org
You can reach the person managing the list at beginners-owner@haskell.org
When replying, please edit your Subject line so it is more specific than "Re: Contents of Beginners digest..."
Today's Topics:
1. Re: Why the length function I wrote has such a type signature? (Tom Murphy) 2. Re: Why the length function I wrote has such a type signature? (Daniel Fischer) 3. Rewriting using State and/or Reader? (Paul Sargent) 4. Re: Rewriting using State and/or Reader? (Brent Yorgey) 5. (no subject) (David Schonberger) 6. Ralf Laemmel's riddle on surviving without the monad transformation library (C K Kashyap)
----------------------------------------------------------------------
Message: 1 Date: Fri, 12 Nov 2010 14:14:25 -0500 From: Tom Murphy
Subject: Re: [Haskell-beginners] Why the length function I wrote has such a type signature? Cc: beginners@haskell.org Message-ID: Content-Type: text/plain; charset="iso-8859-1" And the type signature given by ghci is
myLength :: (Num t1) => [t] -> t1
But why is the signature not written as: myLength :: [t] -> (Num t1) => t1 or something similar?
I thought that the Num typeclass being first implied that it was the function's first argument.