Hi! Can anyone tell me why this code does not work? I cannot seem to
figure why it is broken...
{-# LANGUAGE MultiParamTypeClasses, FunctionalDependencies, FlexibleInstances,
UndecidableInstances, FlexibleContexts, EmptyDataDecls, ScopedTypeVariables,
TypeOperators, TypeSynonymInstances #-}
Giuseppe Maggiore giuseppe...@gmail.com writes:
Hi! Can anyone tell me why this code does not work? I cannot seem to
figure why it is broken...
The error message (and how you got it) would help...
{-# LANGUAGE MultiParamTypeClasses, FunctionalDependencies, FlexibleInstances,
The error message (obtained by loading the file with ghci) is:
GHCi, version 6.10.4: http://www.haskell.org/ghc/ :? for help
Loading package ghc-prim ... linking ... done.
Loading package integer ... linking ... done.
Loading package base ... linking ... done.
[1 of 1] Compiling Main
What about this?
{-# LANGUAGE MultiParamTypeClasses, FunctionalDependencies, FlexibleInstances,
UndecidableInstances, FlexibleContexts, EmptyDataDecls, ScopedTypeVariables,
TypeOperators, TypeSynonymInstances #-}
data Data k = Pair Integer (() - k)
data RecData = RecData (Data RecData)
Well, first of all thanks!
Second, why the need for explicit quantification?
On Tue, Mar 16, 2010 at 2:39 AM, Chris Eidhof ch...@eidhof.nl wrote:
What about this?
{-# LANGUAGE MultiParamTypeClasses, FunctionalDependencies,
FlexibleInstances,
UndecidableInstances, FlexibleContexts,
On 16 mrt 2010, at 10:58, Giuseppe Maggiore wrote:
Well, first of all thanks!
Second, why the need for explicit quantification?
I'm not sure, but I think it has to do with ambiguity. I think it's similar to
the problem:
readShow :: (Read a, Show a) - String - String
readShow = show . read