Hi,
I am running "hugs -98" on Solaris, version February 2000.
I get the following strange error message:
>>>
Main> generalZipWith (+) [1,2,3] [3,4,5] :: [Int]
ERROR: Cannot justify constraints in type annotation
*** Expression : generalZipWith (+) [1,2,3] [3,4,5]
*** Type : [Int]
*** Given context : ()
*** Constraints : (Num Int, Num Int, Num Int, Num Int, Num Int, Num Int, Num Int)
<<<
Apart from looking at the program that generates this
message, isn't it a bit strange that it complains about
unjustified constraints of the form "Num Int"? How can this
constraint be unjustified??
When I write all the types explicitly I get the correct
answer:
>>>
Main> generalZipWith (+) ([1,2,3]::[Int]) ([3,4,5]::[Int]) :: [Int]
[4,6,8]
<<<
The program generating this is attached.
Regards,
Koen.
--
Koen Claessen http://www.cs.chalmers.se/~koen
phone:+46-31-772 5424 mailto:koen@cs.chalmers.se
-----------------------------------------------------
Chalmers University of Technology, Gothenburg, Sweden
Hello
I've been trying to download the Feb2000 versions for Win32 of Hugs - which is OK.
When I unzip and run, the Hugs window opens with a fatal error warning saying "could
not load prelude", and subsequently crashes. Any ideas on how I can overcome this
and get Hugs to run properly.
I'd welcome any assistance/comments.
Thanks
Riaz Ahmad
I want a web page that has some decent information because I may expand on
my trivial implementation to support additional functions. Thus I want to
start with a good design that can be generalized (which is why I am asking).
Sorry for any confusion.
I'd like to make a simple infix expression evaluator.
It should be able to support simple functions, such as *, +, -,/ as well as
simple recursion.
That is, if I define
G <- 19
H <- G + 6
evaluate G should return 25
Anyone know a good webpage for some info?
cheers,
Micha
__________________________________________
Micha Pringle
Systems Development
TISCOM Systems
Albisriederstrasse 365
CH-8047 Zurich
Switzerland
Tel: +41 (0)1 405 60 80
Fax: +41 (0)1 405 60 99
e-mail: micha.pringle(a)tiscom.com
__________________________________________
_______________________________________________
Hugs-Bugs mailing list
Hugs-Bugs(a)haskell.org
http://www.haskell.org/mailman/listinfo/hugs-bugs
As I was getting "Control stack overflow" while
attempting to generate large (>1MB) data files using Hugs,
I recompiled Hugs with 10-fold increased value of the corresponding
parameter (was 16K). Then I was able to do the necessary computations.
However, I wonder if it was safe to so, i.e. that this change
didn't break functionality of the Hugs system.
Hugs documentation sounds as if one gets "Control stack overflow" then
it surely must be an infinite recursion; while in my case it's just
concatenation of long (>20K) strings. I guess it would've been nice if
documentation said something more about that, and explained ways of
increasing stack size.
IMHO, some internal Hugs part uses the stack (thus, something that is
not controllable by the command line options) for data that ought to
be held in the heap (whose size is controllable by command line
options)...
Best regards,
Dmitrii Pasechnik
http://ssor.twi.tudelft.nl/~dima/
Dear sirs,
I can't get hugs98 to work under my linuxplatform. I have the Red
Hat distirbution 7.0.
The problem is that hugs requires a file called "readline.so.3" and
I have "readline.so.4" on my system. Is there a way to come around
this problem??
Best regards,
David Landell
I'm using some Multi-parameter Type Classes with the November 1999 version
of Hugs98 on Windows command-line version and getting the following internal
type error:
WinHugs simply chokes and dies.
At one point, the hugs command-line version was accepting the code if I
commented out the function definitions but left the constant data
definition, but after restarting hugs, it seems to always get a internal
type-check error.
__ __ __ __ ____ ___ _________________________________________
|| || || || || || ||__ Hugs 98: Based on the Haskell 98 standard
||___|| ||__|| ||__|| __|| Copyright (c) 1994-1999
||---|| ___|| World Wide Web: http://haskell.org/hugs
|| || Report bugs to: hugs-bugs(a)haskell.org
|| || Version: November 1999 _________________________________________
Hugs mode: Restart with command line option +98 for Haskell 98 mode
Reading file "C:\LANG\HUGS98\lib\Prelude.hs":
Hugs session for:
C:\LANG\HUGS98\lib\Prelude.hs
Type :? for help
Prelude> :l scripts/error.hs
Reading file "scripts/error.hs":
Type checking
INTERNAL ERROR: findBtyvsInt
Prelude>
best,
leon
I found a minor mistake in the example code, but the same problem remains.
The "real" code is a 2-3-4 Tree which I'd like to use to implement a couple
different things, such as Finite Maps and Sets. It works fine without type
classes.
best,
leon