You might be able to write some Template Haskell to derive the Show instance.
It's a bit tricky, because there are some types which can't have Show
derived, such as:
data Foo where
Broken :: a -> Foo
What should
show (Broken id)
do?
-- ryan
On Mon, Apr 13, 2009 at 9:28 PM, Norman Ram
I, for one, welcome our new Koala overlords.
Thank you, Mr. Peyton-Koala, for this wonderful contribution to our community.
-- ryan
2009/4/1 Simon Peyton-Jones :
>
> Dear Haskell enthusiasts,
>
> Now that the logo issue finally has been settled, it is time to select
> the proper Haskell mascot
I was surprised to find there was no simple zipper for [] on hackage,
so I made one:
http://hackage.haskell.org/cgi-bin/hackage-scripts/package/ListZipper-1.1.0.0
(1.0.0.0 had a dumb bug where I switched right and left!)
Example in ghci:
Prelude Data.List.Zipper> let z = fromList [1,2,3]
Pre
I am pretty sure that this doesn't exist, but it's quite interesting.
I've submitted a feature request here:
http://hackage.haskell.org/trac/ghc/ticket/2101
On 2/15/08, Louis-Julien Guillemette <[EMAIL PROTECTED]> wrote:
> Hi all,
>
> I've been using GHC's type families somewhat extensively in my
This is really interesting. I love how the typechecker can resolve
1:0:1 (representing (1+x^2))
1 : 0 : 1
=> 1 : 0 : (fromInteger 1 :: [Integer])
=> 1 : 0 : (series (fromInteger 1 :: Integer))
=> 1 : 0 : (series 1)
=> 1 : 0 : 1 : repeat 0
(I'm going to go on a bit of a soapbox here...)
I feel
I doubt this is a problem with the compiler as you state;
It's not immediately obvious by looking at your code what the problem is;
the code is really dense and it's not immediately obvious what you are
trying to accomplish. I suspect that either you have a bug, or you are
pattern-matching again
Here's a test case for the problem I'm having; I'm using runhaskell from ghc
v6.6.
Problem #1) Without -fallow-undecidable-instances, I get the following
error:
Constraint is no smaller than the instance head
in the constraint: ConvertToInt a
(Use -fallow-undecidable-instances to permi
Hi everyone... it's my newbie post!
I am trying to create a monad which allows computations to output data to a
stream. (Probably such a thing already exists, but it's a good problem for
my current skill level in Haskell)
For example:
streamDemo = do
output 1
output 2
output 5
makelist