rui yang wrote:
I want to print a function which itself have some functions as it's parameters
and will return some functions as the results, and I want to print out the
result, does anyone knows how to define the instance declaration of show class
to this function type?
I don't know if it
Christian Maeder wrote:
rui yang wrote:
I want to print a function which itself have some functions as it's parameters
and will return some functions as the results, and I want to print out the
result, does anyone knows how to define the instance declaration of show class
to this function
Hello,
I observed the following behavior on GHC-6.0.1 and CVS HEAD.
With -fglasgow-exts the following program
data Functions =
Functions { f1, f2 :: Integral a = a - a }
functions :: Functions
functions =
Functions { f1 = (\x - x),
f2 = f2b
}
f2a, f2b ::
$ uname -a
Linux fly 2.4.19-quiet #10 Tue Jan 12 17:02:50 PST 1904 ppc GNU/Linux
$ cat test.hs
main =
do
putStr hello\n
putStr world\n
$ ghc --make test.hs ./a.out
Chasing modules from: test.hs
Compiling Main ( test.hs, ./test.o )
Linking ...
world
Armin Größlinger writes:
:
| GHC says
|
| Mismatched contexts
| When matching the contexts of the signatures for
| functions :: Functions
| f2a :: forall a. (Integral a) = a - a
| The signature contexts in a mutually recursive group
| should all be identical
Hi all,
i did some postings around the end of october about the comparison of the
three named language.
Well, now (after some forced breaks for other things to do after
overcoming my missing C++ skills) i have
made a new comparison based on further financial calculations. More
precisely about
My original mail might be misleading, but I didn't mean that I want to
rely on the optimization to make the program work.
I just thought If I could expect such an optimization to be performed,
I would not need to rewrite everytime
func (g x) (g x) -- g x = unsafeperformIO $ do {...}
to
let h =