__color__	__group__	ticket	summary	component	version	type	owner	status	created	_changetime	_description	_reporter
3		11	monomorphism and generalization	type system		defect	nobody	new	2006-03-13T09:26:59-0800	2007-04-06T00:39:35-0700	"Hugs gets this wrong, leading to trouble later:
{{{
Hugs> :t let f = const 1 in let g = f in g
let {...} in (let {...} in g) :: Num a => b -> c
}}}
This is related to an erroneous comment on `markAssumList` in `type.c` that there is no need to mark generic variables, but the naive fix breaks `typecheck/should_compile/tc097`."	ross
3	200605	96	redeclaration of function inside a class	winhugs	200605	defect	neil	new	2009-12-13T16:52:01-0800	2009-12-13T16:52:01-0800	"please do apologize if this bug has been reported before

i've been doing my homework assignment on parsers and monads when i hit error ""INTERNAL ERROR: pmcTerm"", when combined these definitions:


{{{
return v xs= [(v, xs)]

class Monad m where
	return	:: a-> m a
}}}

INTERNAL ERROR: pmcTerm

the compiler said that i should report this problem so i'm doing so"	guest
4	200605	28	Cannot make existential type instance of class with fundep	type system	200605	defect	nobody	new	2006-06-06T11:50:47-0700	2007-04-06T00:32:19-0700	"There seems to be a problem when combining !FunDeps and Existential Types.
The code below (works on ghci) causes an error: 

- ''ERROR ""Existential.hs"":8 - Existentially quantified variable escapes from pattern !FooObj a''. 

{{{
class Foo a b | a -> b where foo :: a -> (String,b)

data FooA = A
instance Foo FooA String where foo _  = (""tyA"",""A-specific"")

data FooObj = forall a b. Foo a b => FooObj a 
instance Foo FooObj () where foo (FooObj a) = (fst (foo a),()) -- !!!
}}}


best regards, benedikt"	guest
4	200605	36	Statistics modes does not give wall time elapsed	hugs	200605	enhancement	nobody	new	2006-09-07T06:28:50-0700	2007-04-06T00:30:50-0700	When statistics are turned on, it gives reduction count, memory useage count, and garbage collection time. However, it does not give the amount of time that was actually consumed, which would be nice to have.	neil
2	200609	59	missing and/or erroneous output in deteministic function run from WinHUGS cmd line!	hugs	200609	defect		new	2007-03-04T08:00:53-0800	2007-10-21T06:58:01-0700	"(Output showing the bug is appended below.  It isn't part of the program).

PLEASE run the function called bug.  It will tell you to type a
short expression at the WinHUGS command line.
Retry the expression ten times.  I do not get the same result every time!
Do you find the same problem?  Please, please let me know either way.
See below for printout of my ""impossible"" results.

The functions os and s below will be used to demonstrate the WinHUGS bug:
{{{
os :: Int -> Int -> Double
os i j = -22.0/7.1
s :: [[Int]] -> [[Double]]
s dat = [[      
   sum [ fromIntegral (dat!!i!!j) * os i x * os j y 
                              | i <-[0..7] , j <-[0..7] ]
              | x <- [0..7] ]
              | y <- [0..7] ]
}}}
The following functions produce the bug test data:
{{{
insig :: [Int]
insig = [0 | i <-[0..7]]
signif :: [Int]
signif = [ 1 ] ++ [0 | i <-[1..7]]
i = [insig] ++ [signif | i <- [1..7]]
}}}
Type the following to demonstrate the bug: {{{(take 4.s)i}}}
{{{
Main> (take 4.s)i
[[67.2088871255703,67.2088871255703,67.2088871255703,67.2088871255703,67.2088871255703,67.2088871255703,67.2088871255703,67.2088871255703],[67.2088871255703,67.2088871255703,67.2088871255703,67.2088871255703,67.2088871255703,67.2088871255703,67.2088871255703,67.2088871255703],[67.2088871255703,67.2088871255703,67.2088871255703,67.2088871255703,67.2088871255703,67.2088871255703,67.2088871255703,67.2088871255703],[67.2088871255703,67.2088871255703,67.2088871255703,67.2088871255703,67.2088871255703,67.2088871255703,67.2088871255703,67.2088871255703]]
Main> (take 4.s)i
[[67.2088871255703,67.2088871255703,67.2088871255703,67.2088871255703,67.2088871255703,67.2088871255703,67.2088871255703,67.2088871255703],[67.2088871255703,67.2088871255703,67.2088871255703,67.2088871255703,67.2088871255703,67.2088871255703,67.2088871255703,67.2088871255703],[67.2088871255703,67.2088871255703,67.2088871255703,67.2088871255703,67.2088871255703,67.2088871255703,67.2088871255703,67.2088871255703],[67.2088871255703,67.2088871255703,67.2088871255703,67.2088871255703,67.2088871255703,67.2088871255703,67.2088871255703,67.2088871255703,67.2088871255703]]
Main>
}}}"	ettinger@…
2	200609	102	Easy uninstall	winhugs	200609	defect	neil	new	2011-07-26T11:05:06-0700	2011-07-26T11:05:06-0700	I have tried to uninstall hugs 98. All I get is an error claiming to have met an illegal instruction.	guest
3	200609	43	"WinHugs installer does not provide ""Install for All Users"" option"	winhugs	200609	defect	neil	assigned	2006-10-20T17:50:41-0700	2007-03-21T05:29:24-0700	"The WinHugs installer does not provide an ""Install for All Users"" option. If the user is logged in with a limited account (which is the recommended practice in Windows), they will have to use the ""Run as"" command to run WinHugs as an administrator. But, the installer will then install the shortcuts to WinHugs in the Administrator account's Startup menu, but not any other users'."	briansmith
3	200609	45	parseInput internal error	parsing	200609	defect	nobody	new	2006-10-23T06:04:38-0700	2007-04-06T00:34:23-0700	"The following line in a file Main.hs:
f = 1 where g (Just

On :load Main.hs

gives:
INTERNAL ERROR: parseInput
Please report this Hugs bug to mailto:hugs-bugs@haskell.org

with: WinHugs May 2006 & Sep 2006"	neil
3	200609	48	record patterns fail on newtypes	hugs	200609	defect	nobody	new	2006-11-14T01:03:31-0800	2006-11-14T01:03:31-0800	"Given the declaration
{{{
newtype T = C { f :: String }
}}}
Hugs exhibits the following misbehaviour:
{{{
Newtype> case C ""abc"" of C { f = v } -> v
""bc""
Newtype> case undefined of C {} -> True

Program error: Prelude.undefined
}}}
The non-record versions are fine:
{{{
Newtype> case C ""abc"" of C v -> v
""abc""
Newtype> case undefined of C _ -> True
True
}}}
The internal representation of `newtype`s elides the data constructor, but the record pattern-matching code treats them like `data` types (see also #46)."	ross
3	200609	63	hugs cabal incomplete	hugs	200609	defect	nobody	new	2007-04-12T16:12:34-0700	2007-04-15T09:22:05-0700	"Two things

1) hugs cabal does not take any notice of additional C files specified in the
cabal config

2) hugs cabal passes libraries using mingw conventions and does not support a 
build process using msvc. i.e. libraries passed as -lodbc

3) I used to be able to generate the C stub for seporate compilation with the following command
ffihugs -98 +G -Pbuild: +L""-D_WIN32_"" +L""-Dmingw32_HOST_OS""  +L""-I./HSQL"" +L""./ODBC/Database/HSQL/HsODBC.o"" +L""odbc32.lib"" +L""-I./ODBC/Database/HSQL"" $<

this worked fine and achieved what was desired:- generating a C file compiling and specifying additional link libraries and include path.
this can be done with the new hugs like so

ffihugs -98 $< -D_WIN32_ -Dmingw32_HOST_OS  -I./HSQL ./ODBC/Database/HSQL/HsODBC.o odbc32.lib -I./ODBC/Database/HSQL

The current cabal setup for hugs does not support the generation/specification of such a command, so I am left with no option but to use a hybrid of cabal and make files ... very unsatisfactory.

4) you should really think about linking hugs against the multithreaded library /MD by default many external gnu etc libraries (actually all that I have come accross) link against msvcrt.lib. Having two different rtl being called can cause problems."	jvlask@…
3	200609	64	hugs crashes upon module reload	winhugs	200609	defect	neil	new	2007-04-12T16:42:28-0700	2007-04-18T16:00:34-0700	"A common occurence is the following failure when loading dll modules.
with the latest release of hugs.

This only occurs upon a reload. i.e. the initial load is fine. a reload from the hugs command line will cause the error.

Database.HSQL> :load Database.HSQL
../../gcc/gcc/config/i386/w32-shared-ptr.c:234: failed assertion `w32_sharedptr-
>size == sizeof(W32_EH_SHARED)'"	guest
3	200609	69	Pattern match error can be arbitrarily long	hugs	200609	defect	nobody	new	2007-05-11T12:21:34-0700	2007-05-11T12:23:14-0700	"Given the program:

{{{
test n = length val `seq` f val
    where val = replicate n (toEnum 12)

f """" = """"

> test 3
Program error: pattern match failure: f [toEnum 12,toEnum 12,toEnum 12]
}}}

Unfortunately, as you bump up n (try 10,000) Hugs spits and more and more information - when the most important bit of this message is ""f"" - which you end up loosing.

I suggest truncating pattern match errors at (say) 500 characters, or perhaps 500 characters per argument."	neil
3	200609	74	Data.Word64: arithmetic overflow when evaluating maxBound + 1	hugs	200609	defect	nobody	new	2007-06-11T05:11:28-0700	2007-06-11T05:11:28-0700	"The function (fromInteger x) in Num(Data.Word.Word64) causes a program error, if x is greater or equal 2^64^. This is particularly annoying when two valid Word64 variables are to be multiplied.

Take for instance
{{{
Data.Word> maxbound :: Word64
18446744073709551615
Data.Word> 2*(2^63) :: Word64

Program error: arithmetic overflow

Data.Word> (2^64) :: Word64

Program error: arithmetic overflow
}}}

GHC and GHCi return values mod 2^64^, as Hugs does also for Word32 and 2^32^."	guest
3	200609	86	some record updates reported as ambiguous	hugs	200609	defect	nobody	new	2008-10-07T15:28:57-0700	2008-10-07T15:28:57-0700	"Given
{{{
data Foo = Bar { fld :: IO [String] }

g _ = id undefined { fld = e }
  where e = return []
}}}
Hugs reports that {{{g}}} has the ambiguous type {{{Monad a => b -> Foo}}}."	ross
3	200609	89	type inference failure in ghc/hugs extensions	hugs	200609	defect	nobody	reopened	2009-02-01T18:50:25-0800	2009-02-03T10:09:02-0800	"Oleg recently posted on the mailing list
haskell@haskell.org a magic coercion that makes pairs
of numbers (x,y) behave as complex numbers.  Aside from
context, the type should be (a,a).  The trick works with
option -fglasgow-exts in ghc releases at least since 6.8.3.  However in hugs Sept 2006 under option -98, it fails type inference.  As I understand the documentation, option -98 is supposed to support the necessary extensions in common with ghc.

Is the inconsistent handling of the attached fragment a bug,
a feature, or perhaps an undefined corner of the semantics?

Doug McIlroy 
doug@cs.dartmouth.edu
"	guest
3	200609	92	Strict record fields aren't demanded	hugs	200609	defect	nobody	new	2009-05-18T09:13:35-0700	2009-05-18T09:13:35-0700	"Given

{{{
data S = S { a :: Int, b :: ! Int }
}}}

In GHCi:

{{{
*Main> a (S { a = 0, b = 1 })
0
*Main> a (S { a = 0, b = undefined })
*** Exception: Prelude.undefined
}}}

In Hugs:

{{{
Main> a (S { a = 0, b = 1 })
0
Main> a (S { a = 0, b = undefined })
0
}}}

Bug reported by Geraint Jones"	guest
3	200609	93	"I get ""INTERNAL ERROR : parse input"" and a request to report the bug."	hugs	200609	defect	nobody	new	2009-07-02T02:57:13-0700	2009-07-02T02:57:13-0700	"I use Huggs 98 version Sep 2006.  For a class assignment I edited the file Practicum2 by :e and then closing the file without having changed it.  I then get the Internal Error.  The last change to Practicum2 before the error is this line: ""separatorParser xs           |  let (f == ""\n"") in token1 f xs = [(Error, drop (length f) xs)]
""
With this line edited out I do not get the error."	guest
3	200609	95	local fixity declarations cause static errors	hugs	200609	defect	nobody	new	2009-09-19T23:35:12-0700	2009-09-19T23:35:12-0700	"Declarations such as
{{{
newExp (*) a c n
  = let
      infixl 7 *
    in
    a ^ n * c
}}}
work well with GHC but Hugs complains that ""*"" is not defined.

The Report is not explicit about this, at least I couldn't find 
such case discussed there. But as a fixity change for an operator 
introduced as a formal parameter is perfectly reasonable and safe, 
I think that this should be legal.

Härmel Nestra (harmel.nestra@ut.ee)
"	guest
3	200609	100	overflow bug with Integers on platforms with sizeof(int) != sizeof(long)	hugs	200609	defect	nobody	new	2010-07-14T07:31:38-0700	2010-07-14T07:31:38-0700	"Hugs gives wrong results for minBound for some integers.  On NetBSD/amd64 I get

Data.Int> toInteger (minBound :: Int32)
-18446744071562067968

and it should be

Data.Int> toInteger (minBound :: Int32)
-2147483648


Changing line 120 in src/bignums.c from

    no = (unsigned long)(-n);

to

    no = (unsigned long)(-(long)n);

fixes this."	guest
3	200609	101	WinHugs reverts input language setting without prompting	winhugs	200609	defect	neil	new	2011-02-02T22:23:14-0800	2011-02-02T22:23:14-0800	"Hi,

I am on WinXP and WinHugs has this nasty bug of changing the keyboard setting from English to Arabic. I have a two language setting but I want it to use the one I chose (English).

It's very simple to duplicate. Add language ""Arabic"" to your supported languages (Control Panel -> Regional Settings -> Languages -> Details) now that you have Arabic, choose English as default and type anything into any other application. Shows as English, language setting doesn't change. Good.

Now fire up WinHugs, and try to type. Yes, it's Arabic. No matter how hard you click on ""English"" in the language bar, it doesn't stick. WinHugs JUST wants its input in Arabic.

As is, I can't have Arabic enabled on my machine and use WinHugs, I have to disable Arabic altogether before I launch WinHugs.

This doesn't happen with other languages; I tried Amharic, Armenian, Bosnian, an Danish. (thinking it sorts by language name, or perhaps it prefers non-Latin scripts by default, or both)

If you have further questions I can be reached at 'bigthingist' on the google mail service.

Regards.

- mahmud
"	guest
3	200609	103	Syntax error in standard file	module system	200609	defect	nobody	new	2011-12-08T12:36:01-0800	2012-08-17T11:24:43-0700	"ERROR file:{Hugs}\packages\parsec\Text\ParserCombinators\Parsec\Token.hs:64 - Syntax error in data type declaration (unexpected `.').

I have looked at the file and cannot determine the way to solve it."	guest
3	200609	44	Hugs does not provide version numbers for installed packages	hugs	200609	enhancement	nobody	new	2006-10-20T17:54:07-0700	2008-01-10T13:37:39-0800	"After installing WinHugs, we can inspect the ""packages"" subdirectory to see what packages are installed. But, there is no way to tell what version of each package is installed. I know that Hugs does not provide a versioning mechanism for packages like GHC does, but it would be very helpful it it at least included a ""version"" file in each directory that contained the version number from the Cabal file."	briansmith
3	200609	52	[PATCHES] port hugs98-Sep2006 to AIX 4.3.3, AIX 5.2, HPUX 11.0, SUNOS 5.9	hugs	200609	enhancement	nobody	new	2007-01-16T11:27:17-0800	2007-03-21T05:25:53-0700	"Sorry if this is a duplicate.  I sent it to hugs-bugs@haskell.org but it just
seems to have disappeared into the ether.

Here is a shell script that I used to build the Sep 2006 release for:

AIX 4.3.3 (IBM 5.0.2.0 compiler)
AIX 5.2 (IBM 6.0.0.7 compiler)
HPUX 11.0 (A.11.00.13 compiler)
Redhat 9 x86
Redhat AS 4 x86 (CentOS actually)
Solaris 9 (6.0u2 compiler)

There are some source patches in the script as well as some settings
that are required for proper
compilation.  I have a framework that runs the script in the unpacked
source tree to do the build
and install.

Some autoconf work needs to be done for proper configuration of inline
functions and shared library
creation.  As far as the latter goes you might consider using libtool,
which is designed for that
sort of thing.  The current approach of using the compiler for shared
library creation is not supported
by HPUX 11.0 -- the link needs to be done by the linker directly.  So at
the very least the compiles
and links need to be split into two separate commands.

Some documentation for the OPTFLAGS and PTHREAD_CC variables would be nice.

There is still an issue in the SUNOS build related to a couple of
symbols in System/Posix/Internals.so.
Hugs runs properly for what I am doing so I haven't spent time on this yet:

    runhugs: Error occurred
    ERROR ""libraries/bootlib/System/Posix/Internals.hs"" - Error while
importing DLL ""libraries/bootlib/System/Posix/Internals.so"":
    ld.so.1: ffihugs: fatal: relocation error: file
libraries/bootlib/System/Posix/Internals.so: symbol __hscore_readdir:
referenced symbol not found

There is also a question about the make_bootlib script -- what is ""cat
-s"" intended to do?  It is not clear
to me that it is portable -- the AIX man page states that -S does what
-s used to do, for example.

Here is a summary of what I had to do for the various platforms to get
hugs to compile and install:

- AIX

The AIX preprocessor fails when it sees invalid # directives.  (Note
that it also allows #
directives to have white space or comments before the # -- it looked
like some of the Haskell
code in Hugs thinks spaces will prevent interference from the preprocessor.)

The proper inline keyword is __inline.

The _LARGE_FILES symbol collides with _LARGE_FILES_API, which latter is
turned
on automatically when long long is enabled (in at least one failed
compilation, anyway).

The hugs code has // comments in it -- this is not valid for older C
compilers.

Increase -qmaxmem so optimization completes without warnings.

Turn on alloca support.

Use -G compiler option for proper shared library support.

- HPUX

Added +Z to generate position independent code for shared library use.

Added +DAportable so the resulting binaries can run on older PARISC
version processors.

Pass -b option to linker when building shared libraries.

Added wrapper around ld for proper shared library linking.  HPUX 11, at
least the version I have,
does not support linking a shared library via the compiler -- you are
supposed to use the linker
directly.  I made a wrapper that throws away the crt0.o argument that
the compiler passes to
the linker and that seems to fix the problem (that particular file is
not used for dynamic
links and is not position-independent anyway so will cause a link failure).

The HPUX compiler I have does not appear to support the inline keyword.

- LINUX

no changes necessary

- SUNOS

The SUNOS compiler I have (6.0u2) has some sort of problem with inline
functions as used by
Hugs in shared libraries.  I converted them to ""static"" to work around
whatever was going on.
Perhaps ""extern inline"" is needed or some such.

Set the -G option for linking shared libraries.

-- Joe Buehler
jbuehler@spirentcom.com

{{{
#!/bin/ksh

HOST=""$1""
OS=""$2""
OS_VERSION=""$3""
OS_VERSION_MINOR=""$4""

patch_aix()
{
/usr/local/bin/patch -p0 -N -b -Vnumbered <<\EOF
--- libraries/tools/make_bootlib.~1~	2006-05-19 17:36:17.000000000 -0400
+++ libraries/tools/make_bootlib	2007-01-09 12:50:58.000000000 -0500
@@ -62,10 +62,19 @@
 	# portability we run the preprocessor on a .c file.
 	cpp_input=$tmpdir/cppinput.c
 
-	cp ""$1"" $cpp_input
+	# AIX C/C++ compiler version 6.0 fails on illegal preprocessor directives
+	sed '
+		s/^\([	 ]*#[	 ]*[-!]\)/ELIMINATE THIS STRING PLEASE\1/
+		s/^\([	 ][	 ]*#[	 ]*[A-Z]\)/ELIMINATE THIS STRING PLEASE\1/
+		s/^\([	 ][	 ]*#[	 ]*osthreads\)/ELIMINATE THIS STRING PLEASE\1/
+	' ""$1"" >$cpp_input
 
 	# gcc-3.3 on MacOS X 10.3 is reported to add #pragma
-	$cpp $cpp_flags $cpp_input | grep -v '^#' | cat -s
+	$cpp $cpp_flags $cpp_input |
+	sed '
+		/^#/d
+		s/^ELIMINATE THIS STRING PLEASE//
+	' | cat -s
 }
 
 # internal Hugs modules
--- packages/base/include/HsBase.h.~1~	2006-09-20 18:01:52.000000000 -0400
+++ packages/base/include/HsBase.h	2007-01-09 13:10:35.000000000 -0500
@@ -220,6 +220,8 @@
 #ifndef INLINE
 # if defined(_MSC_VER)
 #  define INLINE extern __inline
+# elif defined(__xlC__)
+#  define INLINE __inline
 # elif defined(__GNUC__)
 #  define INLINE extern inline
 # else
EOF
}

patch_hpux()
{
/usr/local/bin/patch -p0 -N -b -Vnumbered <<\EOF
--- packages/base/include/HsBase.h.~1~	2006-09-20 18:01:52.000000000 -0400
+++ packages/base/include/HsBase.h	2007-01-09 13:10:35.000000000 -0500
@@ -220,6 +220,8 @@
 #ifndef INLINE
 # if defined(_MSC_VER)
 #  define INLINE extern __inline
+# elif defined(__hpux)
+#  define INLINE static
 # elif defined(__GNUC__)
 #  define INLINE extern inline
 # else
EOF
}

patch_sunos()
{
/usr/local/bin/patch -p0 -N -b -Vnumbered <<\EOF
--- packages/base/include/HsBase.h.~1~	2006-09-20 18:01:52.000000000 -0400
+++ packages/base/include/HsBase.h	2007-01-09 13:10:35.000000000 -0500
@@ -220,6 +220,8 @@
 #ifndef INLINE
 # if defined(_MSC_VER)
 #  define INLINE extern __inline
+# elif defined(__sun)
+#  define INLINE static
 # elif defined(__GNUC__)
 #  define INLINE extern inline
 # else
EOF
}

export CC=cc
export PTHREAD_CC=cc
export CFLAGS=-O
export OPTFLAGS=-O

case ""$OS"" in
aix)
	# This is the compiler I like to use under AIX.
	CC=/usr/vacpp/bin/xlC_r
	PTHREAD_CC=/usr/vacpp/bin/xlC_r
	# Enable large files -- this is implied by ""long long"" so we turn it on globally.
	CFLAGS=""$CFLAGS -D_LARGE_FILE_API""
	# Some of the C code actually has C++ commments in it!
	CFLAGS=""$CFLAGS -qcpluscmt""
	# Increase memory available for optimization.
	CFLAGS=""$CFLAGS -qmaxmem=32768""
	# For alloca support
	CFLAGS=""$CFLAGS -ma""
	# This version of HUGS does not know how to make AIX shared objects.
	export ac_cv_dll_flags=-G
	# The _LARGE_FILES and _LARGE_FILE_API symbols are incompatible --
	# defining both causes system header file conflicts (AIX 5.2.0.0)
	export ac_cv_sys_large_files=no
	patch_aix
	;;
hpux)
	# This version of HUGS does not know how to make HPUX shared objects.
	CFLAGS=""$CFLAGS +Z +DAportable -tl,$PWD/myld""
	export ac_cv_dll_flags=""-Wl,-b""
	cat >myld <<-\EOF && chmod 755 myld
		#!/bin/ksh
		I=0
		J=0
		SHARED=
		#echo ""LINK: $0 $*"" >&2
		for ARG; do
		case ""$ARG"" in
		*/crt0.o)
			ARGV[$I]=""$ARG""
			I=$(expr $I + 1)
			;;
		-b)
			SHARED=1
			ARGV[$I]=""$ARG""
			ARGV_SHARED[$J]=""$ARG""
			I=$(expr $I + 1)
			J=$(expr $J + 1)
			;;
		*)
			ARGV[$I]=""$ARG""
			ARGV_SHARED[$J]=""$ARG""
			I=$(expr $I + 1)
			J=$(expr $J + 1)
			;;
		esac
		done
		if [ ""$SHARED"" != """" ]; then
			set -x
			ld ""${ARGV_SHARED[@]}""
		else
			set -x
			ld ""${ARGV[@]}""
		fi
	EOF
	patch_hpux
	;;
linux)
	;;
sunos)
	# This version of HUGS does not know how to make SUNOS shared objects.
	export ac_cv_dll_flags=-G
	patch_sunos
	;;
esac &&

./configure \
	CC=""$CC"" \
	PTHREAD_CC=""$CC"" \
	CFLAGS=""$CFLAGS"" \
	OPTFLAGS=""$OPTFLAGS"" \
	--disable-large-banner \
	--with-pthreads \
	&&
gmake &&
( gmake verbosecheck || true ) &&
gmake install &&
true
}}}"	guest
4	200609	49	LDFLAGS and hugs packages on OS X 10.4	build system	200609	defect	nobody	new	2006-11-24T02:30:15-0800	2007-04-06T00:32:05-0700	"The value of the environnment variable LDFLAGS is not used to compile hug's packages. Consequently, make fails to build X11 package (on OS X 10.4.8) ; here is the make output :

Preprocessing library X11-1.2...
../../libraries/tools/hsc2hs -D__HUGS__ -Iinclude -I/usr/X11R6/include --lflag=-lX11 -o Graphics/X11/Types.hs Graphics/X11/Types.hsc
/usr/bin/ld: can't locate file for: -lX11
collect2: ld returned 1 exit status
linking Graphics/X11/Types_hsc_make.o failed
command was: /usr/bin/gcc -lX11 Graphics/X11/Types_hsc_make.o -o Graphics/X11/Types_hsc_make
../../packages/Cabal/examples/hapax.hs: got error code while preprocessing: Graphics.X11.Types
Skipping X11 package

My LDFLAGS variable whose value is ""-L/usr/X11R6/lib -L/Users/julien/local/lib"" has not been used. Simply add -L/usr/X11R6/lib to the gcc command and it compile fine.

Another work around is to create a symbolic link :

sudo ln -s /usr/X11R6/lib/libX11.a /usr/lib/libX11.a"	guest
4	200609	73	"Sieve of Eratosthenes crashes if using ""Integer"" while not if using ""Int"""	hugs	200609	defect	nobody	new	2007-05-31T07:17:15-0700	2007-10-21T06:55:34-0700	"The following program crashes near the 5000th prime nr. 
{{{
sieveGH :: ([Integer], Integer) -> Integer
sieveGH ([], y) = 0
sieveGH ((p:xs), 0) = p
sieveGH ((p:xs), y) = sieveGH ([x| x <- xs, x `mod` p /= 0], y-1)
}}}
While the following does not crash, and i was taught that Integer was designed for near infinite/large calculations(?) :
{{{
sieveGH :: ([Int], Int) -> Int
sieveGH ([], y) = 0
sieveGH ((p:xs), 0) = p
sieveGH ((p:xs), y) = sieveGH ([x| x <- xs, x `mod` p /= 0], y-1)

Main> sieveGH ([2..], 10000)
104743
(505275796 reductions, 696417680 cells, 787 garbage collections)
}}}"	guest
4	200609	81	support --version flag	hugs	200609	defect	nobody	new	2008-01-10T13:27:43-0800	2008-01-10T13:27:43-0800	"Discovering hugs's version number is almost impossible and certainly impractical. The result is that Cabal does not know the hugs version number.

As far as I can see, the only way to find the version number is to start hugs, grep the banner and translate textual months into a sensible version number, then :q to exit hugs again. Note also that hugs considers itself to be unversioned:

{{{
$ hugs -98 System.Info
__   __ __  __  ____   ___      _________________________________________
||   || ||  || ||  || ||__      Hugs 98: Based on the Haskell 98 standard
||___|| ||__|| ||__||  __||     Copyright (c) 1994-2005
||---||         ___||           World Wide Web: http://haskell.org/hugs
||   ||                         Report bugs to: hugs-bugs@haskell.org
||   || Version: March 2005     _________________________________________

Hugs mode: Restart with command line option +98 for Haskell 98 mode

Type :? for help
System.Info> compilerVersion
Version {versionBranch = [0,0], versionTags = []}
System.Info> 
}}}

Version 0.0 eh?

Most programs support a --version command line flag that spits out the version number (and sometimes some other (un)helpful information) and then terminates.

As for the format, I'd suggest:

{{{
hugs --version
Hugs version 2006.9
}}}

That is, a version number that can fit into the Data.Version format.

The reason this is important for Cabal support is that it'd allow Cabal itself or packages (via configurations) to conditionally enable/disable support for features depending on the version of hugs."	guest
4	200609	83	INTERNAL ERROR: findBtyvsInt	hugs	200609	defect	nobody	new	2008-03-30T16:06:31-0700	2008-03-30T16:06:31-0700	"{{{
% hugs -98
__   __ __  __  ____   ___      _________________________________________
||   || ||  || ||  || ||__      Hugs 98: Based on the Haskell 98 standard
||___|| ||__|| ||__||  __||     Copyright (c) 1994-2005
||---||         ___||           World Wide Web: http://haskell.org/hugs
||   ||                         Bugs: http://hackage.haskell.org/trac/hugs
||   || Version: September 2006 _________________________________________

Hugs mode: Restart with command line option +98 for Haskell 98 mode

Type :? for help
Hugs> case 0 of (_ :: d) -> case 0 of (_ :: e) -> undefined :: d
INTERNAL ERROR: findBtyvsInt
Please report this Hugs bug to http://hackage.haskell.org/trac/hugs
Hugs> 
}}}
{{{
% uname -a
FreeBSD glider 7.0-STABLE FreeBSD 7.0-STABLE #1: Sun Mar 16 05:28:34 PDT 2008     root@:/usr/obj/usr/src/sys/GENERIC  i386
}}}

I ran into this at random, so it's not a problem for me, but I thought I'd report it anyway.

James Cook
http://www.falsifian.org/
james.cook@utoronto.ca"	guest
4	200609	88	WinHugs doesn't implement bell and clear screen escape characters	winhugs	200609	defect	neil	new	2008-12-23T05:22:12-0800	2008-12-23T05:22:12-0800	"The following problems occurred in WinHugs (version: Sep 2006, on Windows XP):

Printing the BELL character does not result in a beep:
Hugs> putStr ""\BEL""


Trying to clear the screen:
Hugs> putStr ""\ESC[2J""
[2J

In Hugs (version: 20051031), the BELL character results in a beep, but the CLS escape code had the same effect as in WinHugs.

-- Neil, originally reported by Henk-Jan"	guest
4	200609	91	Parser error	parsing	200609	defect	nobody	new	2009-04-20T02:06:19-0700	2009-04-20T02:06:19-0700	"Neil Turton says:

I wrote the following haskell program and hugs reported an internal
compiler error when I tried to load it.  The syntax is invalid but I
would expect a sensible error message rather than the internal error
which I got.

falcon:tmp$ cat foo.hs
class Foo x where
   foo :: x

instance Foo () where
   foo ?
falcon:tmp$ hugs foo.hs
__   __ __  __  ____   ___      _________________________________________
||   || ||  || ||  || ||__      Hugs 98: Based on the Haskell 98 standard
||___|| ||__|| ||__||  __||     Copyright (c) 1994-2005
||---||         ___||           World Wide Web: http://haskell.org/hugs
||   ||                         Bugs: http://hackage.haskell.org/trac/hugs
||   || Version: September 2006 _________________________________________

Haskell 98 mode: Restart with command line option -98 to enable extensions

INTERNAL ERROR: parseInput
Please report this Hugs bug to http://hackage.haskell.org/trac/hugs
Hugs>
_______________________________________________
"	guest
4	200609	97	INTERNAL ERROR: discrArity	hugs	200609	defect	nobody	new	2009-12-23T11:47:42-0800	2009-12-23T11:47:42-0800	"When loading nhc98's compiler sources in hugs. Specifically:
{{{
nhc98/src/compiler98 $ hugs -98 MainNhc98.hs
[banner]
INTERNAL ERROR: discrArity
}}}
Using hugs version September 2006."	guest
4	200609	98	hugs accepts instance decls with methods that aren't in scope	hugs	200609	defect	nobody	new	2010-02-01T09:27:55-0800	2010-02-01T09:27:55-0800	"hugs (September 2006) accepts these modules:
{{{
module Q (Class) where

class Class a where
    method :: a
}}}

{{{
module W where

import Q

instance Class Int where
    method = 6
}}}

but the report says:
{{{
4.3.2  Instance Declarations
[...]
It is illegal to give a binding for a class method that is not in scope
}}}

Ian Lynagh
"	guest
4	200609	57	"Display ""Files loaded do not match those on disk"" message if this is true"	winhugs	200609	enhancement	neil	new	2007-02-20T12:33:22-0800	2007-05-04T06:16:04-0700	"Display a warning that the files on disk have changed, if this is readily possible.

Claus would like this."	neil
4	200609	58	WinHugs can't paste into an interact session	winhugs	200609	enhancement	neil	new	2007-02-27T09:59:50-0800	2007-02-27T09:59:50-0800	"> interact id
{hit ctrl+v, or paste}

Nothing happens, would be nice if it sent the characters in the paste buffer to the getChar function.

Reported by Tom Shackell"	neil
4	200609	76	Add pattern guards	hugs	200609	enhancement	nobody	new	2007-06-27T06:43:18-0700	2007-06-27T06:43:18-0700	"Yhc, nhc and GHC all support pattern guards. It would be lovely if Hugs did as well, since they are incredibly handy. The absence of pattern guards means that Hugs cannot compile the central StackSet module in XMonad, amongst other things.

http://research.microsoft.com/Users/simonpj/Haskell/guards.html"	neil
1	current	37	Equal Ints are not equal	hugs	current	defect	ross	assigned	2006-09-22T04:05:18-0700	2007-04-06T00:23:16-0700	"Hi,

a few days ago I wrote a program which handles my own integers. Then I check my own implementation against the normal Int implementation in Hugs. 
Thereby I wonder about inequality of Ints which are definitely equal.

This is a test program I wrote after I recognized that hugs has probably a bug in the inequality check of Ints.
{{{
data MInt = Zero | Succ MInt | Pred MInt deriving Show

tn :: Int -> MInt
tn x | x<0 = Pred (tn (x+1))
tn 0     =  Zero
tn (n+1) = Succ (tn n)

ti :: MInt -> Int
ti Zero = 0
ti (Succ x) = 1+(ti x)
ti (Pred x) = (ti x) -1

testi :: (MInt -> MInt -> MInt) -> (Int -> Int -> Int) -> Int -> Int -> Bool
testi f g x y = (ti (f (tn x) (tn y))) /= (g x y)

myMul x y = tn ((ti x) * (ti y))

test = [(x,y,ti (myMul (tn x) (tn y)),x * y)|
          x<-[-100..100],
          y<-([-100..(-1)]++[1..100]),(testi myMul (*)  x y) ]
}}}
The list ""test"" should be empty in any case but unfortunately hugs returns this (copy of the console): 
{{{
__   __ __  __  ____   ___      _________________________________________
||   || ||  || ||  || ||__      Hugs 98: Based on the Haskell 98 standard
||___|| ||__|| ||__||  __||     Copyright (c) 1994-2003
||---||         ___||           World Wide Web: http://haskell.org/hugs
||   ||                         Report bugs to: hugs-bugs@haskell.org
||   || Version: November 2003  _________________________________________

Haskell 98 mode: Restart with command line option -98 to enable extensions

Type :? for help
Main> test
[(-100,80,-8000,-8000),(-100,99,-9900,-9900),
(-99,58,-5742,-5742),(-99,83,-8217,-8217),
(-98,71,-6958,-6958),(-98,86,-8428,-8428),
(-97,46,-4462,-4462),(-97,87,-8439,-8439),
(-96,76,-7296,-7296),(-95,88,-8360,-8360),(-94,73,-6862,-6862)
ERROR - Control stack overflow
Main> 
}}}
I have checked this program with Hugs on different plattforms:  Gentoo Linux x86 64-Bit and Suse Linux 32-Bit. On both platforms  the same bug occurs with different Ints for each run (i.e. the list  contains different tuples). I have also checked my program with 
other Haskell implementations and there it returns an empty list 
as expected. 

Best regards,
Stephan Swiderski (swiderski@informatik.rwth-aachen.de)

P.S.: We have tested Sep2006 with similar results:
{{{
__   __ __  __  ____   ___      _________________________________________
||   || ||  || ||  || ||__      Hugs 98: Based on the Haskell 98 standard
||___|| ||__|| ||__||  __||     Copyright (c) 1994-2005
||---||         ___||           World Wide Web: http://haskell.org/hugs
||   ||                         Bugs: http://hackage.haskell.org/trac/hugs
||   || Version: September 2006 _________________________________________

Haskell 98 mode: Restart with command line option -98 to enable extensions

Type :? for help
Main> :e
Main> test
[(-100,90,-9000,-9000),(-98,40,-3920,-3920),(-97,63,-6111,-6111),(-97,69,-6693,-6693)
ERROR - Control stack overflow
}}}"	guest
2	current	51	The WinHugs uninstaller.exe doesn't work!	winhugs	current	defect	neil	assigned	2006-11-29T18:18:58-0800	2007-11-01T12:18:50-0700	"Hi guys!

I was trying to uninstall WinHugs in order to install a newer version, and I found that the uninstaller.exe program doesn't work.

I opened the uninstaller.exe with a hex editor, and I found that it's not a valid executable file. It's some weird combination of HTML and executable code. These are the first 15 lines of the uninstaller.exe file:


{{{
<html>
<head>
<META HTTP-EQUIV=""Content-Type"" content=""text/html; charset=Windows-1252"">
</head>
<body>
<pre>
<table width=100% bgcolor=#CFCFE5><tr> <td> <font face=arial size=+3>
Build Log
</font></table><table width=* cellspacing=0 cellpadding=0><tr><td width=0 bgcolor=#EDEDF5>&nbsp;</td><td width=0 bgcolor=#FFFFFF>&nbsp;</td><td width=*><pre>
<h3>------- Build started: Project: Uninstaller, Configuration: Release|Win32 -------
</h3>
</pre></table><table width=100% bgcolor=#DFDFE5><tr><td><font face=arial size=+2>
Command Lines
</font></table><table width=* cellspacing=0 cellpadding=0><tr><td width=0 bgcolor=#EDEDF5>&nbsp;</td><td width=0 bgcolor=#FFFFFF>&nbsp;</td><td width=*><pre>Uninstaller - up-to-date.</pre></table><table   width=100% height=20 bgcolor=#CFCFE5><tr><td><font face=arial size=+2>
</font></table></body></html>
}}}

I hope this is not difficult to fix.

Greetings,
-- L e a n d r o   < c a f e s o l o [at] g m a i l  [dot] c o m >"	guest
3	current	6	WinHugs: Spawning terminals	winhugs	current	defect	neil	new	2006-03-13T09:23:43-0800	2006-03-13T09:23:43-0800	"Inline system calls, i.e. ""system dir"" returns the results to the terminal, not the WinHugs window."	neil
3	current	8	WinHugs: Editor spawning with DDE	winhugs	current	defect	neil	new	2006-03-13T09:25:15-0800	2007-04-06T00:39:24-0700	When WinHugs tries to open TextPad there is sometimes a pause (20 seconds or so) because some window on the system is being a bad DDE citizen. This would be very handy to fix.	neil
3	current	15	semicolons in nested layout	parsing	current	defect	nobody	new	2006-03-13T09:39:04-0800	2007-04-06T00:39:46-0700	"{{{
Hugs> do let x=1; (return x); return x
INTERNAL ERROR: parseInput
}}}"	ross
3	current	16	hiding T(..) doesn't hide the fields	module system	current	defect	nobody	new	2006-03-13T09:46:17-0800	2007-04-06T00:40:02-0700	"Given
{{{
module A where
data T = C { get :: Int }

module B(get) where
import A hiding (T(..))
get = 'a'
}}}
importing `B` yields an ambiguous export of `get`."	ross
3	current	17	module re-export does not pass on isolated fields and members	module system	current	defect	nobody	new	2006-03-13T09:49:00-0800	2006-03-13T09:49:00-0800	"Bug reported by Bulat Ziganshin: load of `C` fails incorrectly in
{{{
module A (f) where
class A a where f :: a

module B (module A) where
import A

module C where
import B (f)
}}}
Same if `A` is
{{{
module A (f) where
data R = R { f :: Int }
}}}"	ross
3	current	18	record update syntax cannot currently be used for polymorphic components	type system	current	defect	nobody	new	2006-03-15T01:27:48-0800	2006-03-15T01:27:48-0800	"For example:
{{{
data N = N { f :: forall a. a -> a }

g n = n { f = id }
}}}
See revisions [http://cvs.haskell.org/cgi-bin/cvsweb.cgi/hugs98/src/type.c#rev1.46 1.46] and [http://cvs.haskell.org/cgi-bin/cvsweb.cgi/hugs98/src/type.c#rev1.66 1.66] of `type.c` for problems with previous attempts to fix this."	anonymous
3	current	54	INTERNAL ERROR: build	hugs	current	defect	nobody	new	2007-02-13T04:02:17-0800	2007-07-24T05:44:38-0700	"{{{
Main> fvsp 450
INTERNAL ERROR: build
Please report this Hugs bug to http://hackage.haskell.org/trac/hugs
}}}
code: 
{{{
pots :: Num a => a -> [a]
pots x = scanl (*) 1 (repeat x)

factoriales :: [Integer]
factoriales = scanl (*) 1 [1..]

fvsp :: Integer -> Int
fvsp n = length (takeWhile not (zipWith (<) (pots n) factoriales))
}}}"	guest
3	current	72	mishandling of ambiguous record field names	static analysis	current	defect	nobody	new	2007-05-29T16:43:21-0700	2007-05-29T16:43:21-0700	"Simon PJ writes:
{{{
module A where
  data A = A { foo :: Int }

module B where
  import A
  data B = B { foo :: Bool }
  a = A {foo=3}
}}}
yields:
{{{
ERROR ""B.hs"":8 - Constructor ""A"" does not have selected fields in A{foo += 3}
}}}
Commenting out the declaration of `data B` makes the definition of `a` work."	ross
3	current	94	pattern match failure on Chars with Unicode codepoint >0x4ff	hugs	current	defect	nobody	new	2009-09-03T19:58:15-0700	2009-09-03T20:03:18-0700	"hi,

i tested the following code in Hugs:
{{{
patternMatchingWorks1 = case '\x4ff' of '\x4ff' -> True
patternMatchingWorks2 = case '\x500' of '\x500' -> True
patternMatchingWorks3 = f '\x4ff' where f '\x4ff' = True
patternMatchingWorks4 = f '\x500' where f '\x500' = True
patternMatchingWorks5 = (\'\x4ff'->True) '\x4ff'
patternMatchingWorks6 = (\'\x500'->True) '\x500'
}}}
and got the following output:
{{{
Main> :load ""M:\\haskell\\sources\\WinHugsPatternMatchingBug.hs""
Main> patternMatchingWorks1
True
Main> patternMatchingWorks2

Program error: pattern match failure: patternMatchingWorks2_v1621 '\1280'

Main> patternMatchingWorks3
True
Main> patternMatchingWorks4

Program error: pattern match failure: patternMatchingWorks4_v1623 '\1280'

Main> patternMatchingWorks5
True
Main> patternMatchingWorks6

Program error: pattern match failure: patternMatchingWorks6_v1627 '\1280'
}}}
i tested it with hugs.exe and winhugs.exe (September 2006 version, i.e. the
most recent according to the download page) on Windows XP Professional, both
give the same result, while ghc gives the correct result.[[BR]] Pattern matching
seems to fail for all Chars with codepoint >0x4ff. i understand that Hugs
doesn't fully support Unicode, but is this intended behaviour? If so, please
mention it on the ""Hugs Bugs & Features"" page."	guest
3	current	99	Strange numeric behavior	hugs	current	defect	nobody	new	2010-06-08T00:00:35-0700	2010-06-08T00:00:35-0700	"Given the following piece of code to calculate the first m factorials, the first few results are correct but then strange numbers begin to appear.
/The indentation is ruined by the bug report ticket./

buildList genFnc baseLst baseLstLen n
    | baseLstLen >= n = take n
    | otherwise       = buildList genFnc (baseLst ++ [genFnc baseLst baseLstLen]) (baseLstLen + 1) n

factorialAux lst n = (last lst) * n

factorial m = buildList factorialAux [1] 1 m

E.g. factorial 20
[1,1,2,6,24,120,720,5040,40320,362880,3628800,39916800,479001600,1932053504,1278945280,2004310016,2004189184,-288522240,-898433024,109641728]

479001600 is correct but then 1932053504 is incorrect"	guest
3	current	12	WinHugs: cpphs support	winhugs	current	enhancement	neil	new	2006-03-13T09:27:29-0800	2007-04-06T00:33:52-0700	Allow it to compile files with preprocessor directives, by automatically running cpphs on them first.	neil
3	current	20	qualifed names at the prompt	static analysis	current	enhancement	nobody	new	2006-04-30T16:04:39-0700	2006-04-30T16:04:39-0700	"Currently, the names in scope at the prompt are those in scope inside the current module.  Proposal: also behave as if there is an implicit `import qualified` declaration for every module currently loaded, as GHCi does.  (GHCi also does this for all exported modules in registered packages, but that would be too hard for Hugs).

This is non-trivial, as Hugs does not retain resolved module export lists, to save space."	ross
3	current	77	Binding variables on the prompt	hugs	current	enhancement	nobody	new	2007-09-16T23:50:47-0700	2007-09-16T23:50:47-0700	"In GHCi, it's possible to bind variables at the interactive prompt, like

{{{
 > let x = 1
 > x + 1
 2
 > y <- readFile ""Foo.bar""
 ""Hello World""
 > length y
 11
}}}

The rule is that the bindings are legal in the do-notation for the IO-monad. For details, see [http://www.haskell.org/ghc/docs/latest/html/users_guide/ch03s04.html Interactive evaluation at the prompt] in the GHC user's guide. I'm dearly missing this feature in Hugs!"	apfelmus
4	current	5	WinHugs: Screen Clearing	winhugs	current	defect	neil	new	2006-03-13T09:22:40-0800	2007-04-06T00:33:11-0700	"Once the screen has filled up over 100Kb it should start to clear the old stuff to make way for the new stuff.

It does this, but too often, which slows down WinHugs and looks unsightly."	neil
4	current	10	WinHugs: Package build	winhugs	current	defect	neil	new	2006-03-13T09:26:43-0800	2007-04-06T00:32:59-0700	Currently WinHugs has to be built by hand, including libraries. This makes it time consuming and error prone. An automated build is required.	neil
4	current	13	WinHugs: Less verbose file listing	winhugs	current	defect	neil	new	2006-03-13T09:28:17-0800	2007-04-06T00:32:46-0700	Should be an option to list all files not in the Hugs directory loaded	neil
4	current	50	Hugs's implementation of defaulting does not conform to Haskell 98	type system	current	defect	nobody	new	2006-11-28T23:12:38-0800	2007-03-21T05:28:41-0700	"Possibly Hugs bug, or possible GHCi feature?

{{{
showln  = (++ ""\n"") . show
main    = interact (showln . length)
}}}

In GHCi:
{{{
$ ghci Z.hs
*Main> :t showln
showln :: Int -> [Char]
}}}

In Hugs (Version: March 2005):
{{{
ERROR ""Z.hs"":1 - Unresolved top-level overloading
*** Binding             : showln
*** Outstanding context : Show b
}}}

I'm not sure which is right.

-- Don"	guest
4	current	14	WinHugs: Command history	winhugs	current	enhancement	neil	new	2006-03-13T09:28:40-0800	2007-05-03T12:27:11-0700	"also i want to suggest saving history of commands in the registry (or disk file) - this proved to be very useful in other shells. and about window with list of all commands - my shell (FAR manager) saves all the commands i use (now this list contains ~5000 ones!) and when i open this list and start to type some word, it just filers whole list and show only commands which contains this sequence of letters. that is damn useful. just for example i open this window and typed ""hugs"" - FAR filters out 146 commands which includes this word:"	neil
4	current	23	Build FFI on Windows using Visual Studio	winhugs	current	enhancement	neil	new	2006-05-15T07:37:30-0700	2007-04-06T00:31:06-0700	"I have found that by recompiling the ffi .dll's
with Visual Studio instead of GCC, the size drops from around 500Kb to
26Kb in most cases. This would obviously need makefile/script support,
so is too ambitious for the moment, but its probably worth doing for
the future at some stage."	neil
5	current	4	WinHugs: Copy/Paste gives formatted text	winhugs	current	defect	neil	new	2006-03-13T09:21:48-0800	2007-05-03T11:52:47-0700	Should give plain text, but gives coloured text, esp annoying for pasting in emails etc.	neil
5	current	9	WinHugs: :edit	winhugs	current	defect	neil	new	2006-03-13T09:25:51-0800	2007-04-06T00:30:29-0700	(colon)edit starts editing a weird file. Should create a new file in my documents and open that.	neil
