Re: ghci balkiness on OS X?

2014-10-24 Thread Thomas Hallgren
I have noticed sluggish behaviour in ghci (ghc-7.8.3, OS X 10.9.5). In my case at least, it seems to be caused by the idle time full garbage collection that happens after 0.3s of idle time by default. When you have say 300MB of live data in the heap, a major GC can take 0.5s or so, and this is

Re: Problem with the object file name of the Main module.

2014-01-13 Thread Thomas Hallgren
The main module doesn't have to be called Main. You can specify a different name with the -main-is option. That seems like the easiest way to avoid the object file name clash. By the way, this problem only seems to arise when the -odir flag is used. If my Main module is in A.hs and I compile it

[Haskell-cafe] Hackage upload problem

2013-08-07 Thread Thomas Hallgren
Hi, I get the following error when I try to upload gf-3.5.tar.gz [1] to Hackage. 400 Error in upload could not extract gf-3.5 directory from gf-3.5.tar.gz I get the same error when I try to Check the previous version, gf-3.4.tar.gz [2], which was uploaded without problems 6

Re: [Haskell-cafe] Hackage upload problem

2013-08-07 Thread Thomas Hallgren
On 2013-08-07 17:06 , Duncan Coutts wrote: On Wed, 2013-08-07 at 14:32 +0200, Thomas Hallgren wrote: Hi, I get the following error when I try to upload gf-3.5.tar.gz [1] to Hackage. 400 Error in upload could not extract gf-3.5 directory from gf-3.5.tar.gz I get the same

Re: [Haskell-cafe] Rewrite this imperative in FP way

2012-02-06 Thread Thomas Hallgren
How about this: import Array a = [1,1,1,1] b = [0,1,2,3] c = [0,2] d = elems $ accumArray (+) 0 (0,3) [(i+j,a!!i) | i-b, j-c, i+j3] -- Thomas H On 2012-02-06 12:01 , Haisheng Wu wrote: *d = [sum $ map (a !!) [i | i - b, j - c, i + j 3, i + j == dIndex] | dIndex - [0..3]] *

[Haskell-cafe] Re: Haskell not ready for Foo [was: Re: Hypothetical Haskell job in New York]

2009-01-08 Thread Thomas Hallgren
it useful on the web of today... http://www.cs.chalmers.se/~hallgren/wwwbrowser.html Thomas Hallgren ___ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org/mailman/listinfo/haskell-cafe

[Haskell] Re: Getting a function dependency graph from source

2006-10-12 Thread Thomas Hallgren
Durward McDonell wrote: Yes, this is exactly what I wanted! Thanks, and thanks for writing it all in the first place. :-) However, I haven't quite been able to get it to work fully. ... What am I doing wrong? If you use pfesetup to create the project, prelude and library modules will be

[Haskell] Re: Getting a function dependency graph from source

2006-10-11 Thread Thomas Hallgren
Hi, The pfe command line tool from the Programatica Project has functionality that seems to fit fairly well with what you are asking for: pfe deps -- lists function level dependencies pfe needed -- lists everything needed by a definition pfe dead -- lists unused

[Haskell-cafe] Re: Editors for Haskell

2006-06-01 Thread Thomas Hallgren
Brian Hulley wrote: Another thing which causes difficulty is the use of qualified operators, and the fact that the qualification syntax is in the context free grammar instead of being kept in the lexical syntax (where I think it belongs). You are in luck, because according to the Haskell

Re: Memory leak in Fudgets

2006-03-09 Thread Thomas Hallgren
Hi, I found and fixed this space leak in the Fudget library (it was a malloc without free). Thomas H Simon Marlow wrote: Dimitry Golubovsky wrote: I wrote a very simple Fudgets program (just copies stdin to stdout, no graphics involved) I found out that the program grows in memory.

Re: [Haskell-cafe] programatica and haddock

2005-07-01 Thread Thomas Hallgren
Hi, Christian Maeder wrote: I would like to see the advantages of both, programatica's documentation generation and haddock, to be united. (programatica sources don't go through haddock and have few type signatures that haddock could exploit, and haddock comments are useless for programatica.)

Re: [Haskell-cafe] A Tool To Show Functions Relationship?

2005-06-09 Thread Thomas Hallgren
Dimitry Golubovsky wrote: Does there exist a tool which given a Haskell source, shows functions that are mutually recursive (i. e. call each other, even via calling third, etc. functions)? With pfe, the Programmatica tools command line interface, you can currently get a list of definition

Re: [Haskell-cafe] Bit fiddling

2005-05-17 Thread Thomas Hallgren
Hi, Florian Weimer wrote: I'm toying a bit with Haskell and wondering what's the best way to implement bit fiddling. Most of my applications involve serializing and deserializing small blobs (IP packets, for instance), and after browsing the GHC library documentation, I'm not sure which appraoch

Re: [Haskell] The FunctorM library

2005-03-25 Thread Thomas Hallgren
Simon Peyton-Jones wrote: | | class Functor f where fmap :: ... | class Functor m = Monad m where | ...the usual stuff... | fmap = liftM | It seems overkill to have a whole new language feature to deal with one library issue. Perhaps it is... For example, what if

Re: ghc-6.4.20050220: panic! eval_data2tag...

2005-02-22 Thread Thomas Hallgren
://sourceforge.net/projects/ghc/. -- Thomas Hallgren ___ Glasgow-haskell-bugs mailing list Glasgow-haskell-bugs@haskell.org http://www.haskell.org/mailman/listinfo/glasgow-haskell-bugs

Re: self-import

2005-01-18 Thread Thomas Hallgren
Simon Peyton-Jones wrote: I quite liked this idea until I thought of this: module Doc.Pretty.Long( M.f, f ) where import qualified M( f ) import Doc.Pretty.Long as M f x = x The second import decl imports all the things exported by Doc.Pretty.Long. But what

Re: [Haskell-cafe] coercion to Int

2004-12-31 Thread Thomas Hallgren
james pentland wrote: what coercion can i use to get the below program to compile? ... various combinations of fromInteger, toInteger do not help. Did you try fromIntegral? fromIntegral :: (Integral a, Num b) = a - b fnK_ :: Int - Int fnK_ x = round (sqrt x) -- line 2 -- Thomas H

Re: [Haskell-cafe] Equality of functions

2004-11-30 Thread Thomas Hallgren
Adam Zachary Wyner wrote: Hi All, After some weeks of experimenting and digging around, I understand that functions cannot be compared for equality. Thanks to Bjorn Lisper for pointing this out. I basically understand (?) the underlying mathematical issue, which is that functions in general may

Re: [Haskell-cafe] readEitherChan

2004-06-18 Thread Thomas Hallgren
Tomasz Zielonka wrote: On Tue, Jun 15, 2004 at 06:29:59PM -0400, S. Alexander Jacobson wrote: readEitherChan::Chan a - Chan b - Either a b eitherChan a b left right = readEitherChan a b = either left right ... I think it would be safer to create once new Chan (Either a b), and then read

Re: [Haskell] GHC binary for Cygwin

2004-03-19 Thread Thomas Hallgren
Thomas Hafner wrote: Are somewhere GHC binaries for Cygwin available? I tried to cross compile from Linux, but didn't succeed. Maybe one want to answer me: ``Why is a cygwin port needed? There's already a great MS W port!'', but: ... In a ``pure'' Cygwin port all system calls should go through

[Haskell-cafe] Re: Simple Fudgets-question

2004-01-26 Thread Thomas Hallgren
Henrik Berg wrote: Thomas Hallgren [EMAIL PROTECTED] writes: ... All I want to do is to resend the input out on the output. If that is all you want, this combinator is the right choice: throughF :: F a b - F a (Either b a) Yes, but (Either b a) won't give me the input _together_

Re: Any versions of Fudgets working with GHC-6?

2004-01-21 Thread Thomas Hallgren
Henrik Berg wrote: ... I was able to compile Fudgets when I removed 6.0.1, using only 5.04.3. Still don't understand why I coudn't get it compile with 6.0.1, though. fudgets-030806.src.tar.gz compiles with GHC 6.0.1. Fudgets does not yet compile with GHC 6.2, however, since _casm_ (which very

ANN: Haskell tools from the Programatica project

2003-11-04 Thread Thomas Hallgren
reused in the Haskell refactoring project at the University of Kent. -- Thomas Hallgren The Programatica Project http://www.cse.ogi.edu/PacSoft/projects/programatica/ ___ Haskell mailing list [EMAIL PROTECTED] http://www.haskell.org/mailman/listinfo

Re: interact behaves oddly if used interactively

2003-10-02 Thread Thomas Hallgren
John Meacham wrote: personally, I think the easiest solution would be to punt the whole issue by having: getContents lazily read the file if it is mmapable or a pipe eagerly slurp the whole file if it refers to a tty I think this kind of irregular behaviour would make the IO functions even

Re: lexer puzzle

2003-09-24 Thread Thomas Hallgren
Marcin 'Qrczak' Kowalczyk wrote: A... should be split into A.. and . I found a compromise: let's make it a lexing error! :-) At least that agrees with what some Haskell compilers implement. No current Haskell compiler/interpreter agrees with what the report seems to say, that is that

Re: Fudgets

2003-06-10 Thread Thomas Hallgren
Ashley Yakeley wrote: Would it be worth rewriting Fudgets to take advantage of such recent advances in Haskell as monadic IO? A rejuvenation of Fudgets, taking advantage of things like subtyping, multi-parameter classes with functional dependencies, syntactic sugar for arrows, making room for

Re: Fudgets with GHC 5.04.3

2003-05-30 Thread Thomas Hallgren
Bas van Dijk wrote: In hsrc/ghmklib and Contrib/Makefile, there are options for which make tool to use. I think the 030414 version uses humake by default. env GHCFUDGETS=../GhcFudgets ../bin/ghuxmake -batch -cpp -O2 ContribFudgets.hs ../bin/ghuxmake: line 44: ghumake: command not found The

Re: Fudgets with GHC 5.04.3

2003-05-29 Thread Thomas Hallgren
Bas van Dijk wrote: Great! it's working now... I accidently downloaded the newest untested version (April 2003) from the Fudget website. That version gave errors while making. In hsrc/ghmklib and Contrib/Makefile, there are options for which make tool to use. I think the 030414 version uses

Uninformative error message from getModificationTime

2003-03-28 Thread Thomas Hallgren
Hi, If I run the program main = print = readFile god and god doesn't exist, I get the following informative error message Fail: does not exist Action: openFile Reason: No such file or directory File: god However, if I run the program import Directory main = print =

Re: -O doesn't work with gcc-3.2?

2002-11-23 Thread Thomas Hallgren
Hi, Anatoli Tubman (by way of Anatoli Tubma) wrote: ghc fails with this message: Prologue junk?: .globl __stginit_Main __stginit_Main: pushl %ebp movl%esp, %ebp It works without -O. I'm on stock Mandrake 9.0 system. It appears that the version of GCC 3.2 supplied with

Negative literals and the meaning of case -2 of -2 - True

2002-05-16 Thread Thomas Hallgren
Hi, The Haskell report seems pretty clear about the meaning of numeric literals and negation in expressions: -2 should be interpreted as negate (fromInteger 2). That is, negated literals are not treated specially, the general rule -(e) == negate (e) applies. (See section 3.2 and 3.4 of the

stripcomments 1.0

2002-03-21 Thread Thomas Hallgren
, that was really easy to reuse for this purpose! Regards, Thomas Hallgren Nicholas Nethercote wrote: On Mon, 18 Mar 2002, Kevin Glynn wrote: Are there any programs to strip comments and blank lines from a Haskell source file, that work on normal and literate programs? Doing a real job is 'hard' I'm

Re: unification

2002-01-28 Thread Thomas Hallgren
David Feuer wrote: Has anyone written an efficient purely-functional implementation of unification (for type checking)? Well, if you have ever used hbc or nhc, you have used type checkers containing purely functional implementations of unification. Purely functional unification can be

/tmp/ghc13435.lpp:388: Non-exhaustive patterns in function zip_ty_env

2001-10-16 Thread Thomas Hallgren
to type B i = A i helps, but the Haskell 98 report (section 4.2.2) explicitly allows the lhs of a type sysonym declaration to be of higher kind... Regards, Thomas Hallgren ___ Glasgow-haskell-bugs mailing list [EMAIL PROTECTED] http://www.haskell.org

Re: Strange error in show for datatype

2001-10-04 Thread Thomas Hallgren
it seems I have been too naive, not taking laziness and coherence into account. My underlying intuition comes from working with ideas from papers like [3] and [4]. My implemention mood has suddenly past. Does this mail do anything for your implementation mood? Thomas Hallgren PS By the way

Re: Strange error in show for datatype

2001-10-03 Thread Thomas Hallgren
([]::[Int])). The same trick applies to the Eq class, so that, e.g., [] == [] would be unambiguous and compute to True. So, obviously, the next version of Haskell should have a type system with subtyping, don't you agree? :-) Thomas Hallgren PS In some previous version of Haskell (1.3?), the Prelude

Re: ghc-pkg

2001-10-02 Thread Thomas Hallgren
in the source code.) 3. The ability to compile several modules in parallel, on a multi-processor machine, or a network of workstations. 4. The ability to automatically invoke program generators (e.g. happy)... 5. A graphical user interface. Regards, Thomas Hallgren

GHC 5.02, import Prelude hiding ...

2001-09-27 Thread Thomas Hallgren
to refer to entities in the Prelude. and in section 5.3 says The effect of multiple import declarations is strictly cumulative... Regards, Thomas Hallgren ___ Glasgow-haskell-bugs mailing list [EMAIL PROTECTED] http://www.haskell.org/mailman

Re: Bug with readFile and named pipes

2001-08-23 Thread Thomas Hallgren
to be ambiguous on the subject. I forgot to say that I tested my program on SunOS 5.7 (GHC 4.08 and 5.00.1), Linux 2.2 (GHC 5.00) and Linux 2.4 (GHC 5.00.2), and the problem occurs in all cases. What is it that only occurs on FreeBSD? Regards, Thomas Hallgren

Bug with readFile and named pipes

2001-08-21 Thread Thomas Hallgren
... Apparently, opening the file in nonblocking mode has undesirable effects... I consider this a bug and hope that it will be fixed for the 5.02 release. Is there a simple workaround I can use in the mean time? Regards, Thomas Hallgren

Re: POLL: GC options

2001-08-06 Thread Thomas Hallgren
time into account could perhaps help? Regarding the maximum heap size, to avoid letting the heap grow too large, you could perhaps take into account the number of page faults that occur during garbage collection, or the ratio between CPU time and real time... Regards, Thomas Hallgren (*) http

Re: hGetContents and laziness in file io

2001-07-24 Thread Thomas Hallgren
profiling to help you find out what kind of data is occupying all the space (constructor profile), which functions produced the data (producer profile) which functions have references to the data (retainer profile), ... Hope this helps! Thomas Hallgren

Re: lexical description problem in language report?

2001-07-24 Thread Thomas Hallgren
Wolfgang Lux wrote: Thomas Hallgren wrote There seems to be a similar problem with qualified identifiers. The production for lexeme includes varid, conid, etc, rather than qvarid, qconid, etc. Sorry we must have a different version of the report, but in my copy and also in the version

Re: lexical description problem in language report?

2001-07-23 Thread Thomas Hallgren
. The same problem is present in Appendix B. Suggestions: include qvarid, qconid in the production for lexeme. Move the explanation of the lexical properties of qualified names from section 5.5.1 to section 2.4. Thomas Hallgren ___ Haskell mailing list

basicTypes/Var.lhs:194: Non-exhaustive patterns in function readMutTyVar

2000-11-27 Thread Thomas Hallgren
zonkIdOcc: FunDep_a1s8 zonkIdOcc: FunDep_a1sa but these seem to be harmless.) Is there a fix for this already, or should I prepare a more detailed bug report? Regards, Thomas Hallgren PS My code is accepted by Hugs... ___ Glasgow-haskell-bugs

Re: basicTypes/Var.lhs:194: Non-exhaustive patterns in function readMutTyVar

2000-11-27 Thread Thomas Hallgren
construct a small example and mail it later today. -- Thomas Hallgren ___ Glasgow-haskell-bugs mailing list [EMAIL PROTECTED] http://www.haskell.org/mailman/listinfo/glasgow-haskell-bugs

Re: basicTypes/Var.lhs:194: Non-exhaustive patterns in function readMutTyVar

2000-11-27 Thread Thomas Hallgren
yton-Jones wrote: Thomas, in parallel, I'd like to get this bug into our regression test suite. How hard would it be to boil down your program to something of modest size that still shows the bug? As promised, here is a small example that shows the bug. Regards, Thomas Hallgren {- A str

Re: basicTypes/Var.lhs:194: Non-exhaustive patterns in function readMutTyVar

2000-11-27 Thread Thomas Hallgren
Hi, Here is another example which GHC doesn't like. Regards, Thomas Hallgren module PR where -- This accepted by Hugs, but not by GHC 4.08.1 class P a class R a b | b-a instance (P a,R a b) = P b {- GHC 4.08.1

Re: Haskell - Java bytecode?

2000-05-24 Thread Thomas Hallgren
rtual Machine", Journal of Functional Programming, Vol 9, Issue 6, Nov 1999. The translation, which is done via the v,G-machine, is described in detail. The article also contains performance figures with comparisons to related implementations. -- Thomas Hallgren

Re: Haskell + Functional GUIs

2000-03-14 Thread Thomas Hallgren
for Fudgets [1] version h13t on our ftp site [2]. It compiles with HBC and GHC 4.06. Fudgets is still maintained, although we haven't taken the time to make any thoroughly tested releases. But it still works well enough to be used in undergraduate teaching and in other reserch projects [3]. -- Thomas

Re: Which GUI on X11R6 ?

1999-08-02 Thread Thomas Hallgren
/ [3] http://www.cs.chalmers.se/Cs/Research/Functional/Fudgets/Manual/ -- Thomas Hallgren PS Since my home computer runs FreeBSD, I know for sure that Fudgets compiles and runs just fine under FreeBSD :-)

Re: Modifying the monomorphism restriction

1999-02-24 Thread Thomas Hallgren
an infinite one.) Have I missed something fundamental that prevents this solution from working? -- Thomas Hallgren

Re: Haskell-2

1999-02-19 Thread Thomas Hallgren
Jose Emilio Labra Gayo wrote: I agree; Haskell 2 should have existential (and universal) types. I also think it should have both extensible records and extensible variants. (See the following paper for more information on these. TREX is an implementation of half of this system; it

Pattern matching bug?

1999-02-08 Thread Thomas Hallgren
Hi, I enclose a small program that causes ghc 4.01 to say "panic! (the `impossible' happened)". I also supply the output from ghc -v. Regards, Thomas Hallgren module GhcBug where data E = B { a,b,c,d,e,f::Bool } bug x = case x of -- alt 1 and alt 2 should be equiva

Buggy implementation of exististential types?

1999-02-08 Thread Thomas Hallgren
our normal installation of gcc, Reading specs from /usr/pd/gnu/lib/gcc-lib/sparc-sun-solaris2.6/2.8.1/specs gcc version 2.8.1 all programs crashed with "bus error"... Regards, Thomas Hallgren -- This program crashes with "segmentation fault". main = print xs xs = [C

Re: how about main :: IO Int

1997-08-22 Thread Thomas Hallgren
(1) in some cases. Real programmers can do this already. They simply use the standard library function System.exitWith [1]. I don't like the idea of changing the type of main to IO Int for several reasons... Thomas Hallgren [1] http://haskell.systemsz.cs.yale.edu/onlinelibrary/system.html

Re: Lexer/Parser for Haskell in Haskell?

1997-07-08 Thread Thomas Hallgren at home
Graeme Moss wrote: Has anyone written a parser for Haskell 1.4 in Haskell 1.4? Has any compiler written the lexer/parser in Haskell? Nhc13 [1] by Niklas Rojemo contains both a lexer and a parser for/in Haskell 1.3. (The differences between 1.3 and 1.4 are small [2].) The parsing combinators

The Haskell 1.3 compiler NHC13 is now available

1996-11-09 Thread Thomas Hallgren at home
t;Two-pass heap profiling: a matter of life and death". In the proceedings of IFL'96. These are available from ftp://ftp.cs.chalmers.se/pub/users/rojemo/icfp96.ps.gz ftp://ftp.cs.chalmers.se/pub/users/rojemo/ifl96.ps.gz Niklas Rojemo Thomas Hallgren

New release of Fudgets available

1996-11-06 Thread Thomas Hallgren
/chalmers Send bug reports and feedback to [EMAIL PROTECTED] or [EMAIL PROTECTED] Thomas Hallgren Magnus Carlsson ? ?

New release of Fudgets available

1995-07-05 Thread Thomas Hallgren
via anonymous FTP on ftp.cs.chalmers.se in directory /pub/haskell/chalmers Bug reports and feedback to [EMAIL PROTECTED] or [EMAIL PROTECTED] Thomas Hallgren Magnus Carlsson

New release of Fudgets available

1995-07-05 Thread Thomas Hallgren
via anonymous FTP on ftp.cs.chalmers.se in directory /pub/haskell/chalmers Bug reports and feedback to [EMAIL PROTECTED] or [EMAIL PROTECTED] Thomas Hallgren Magnus Carlsson

Re: Subtypes

1992-07-23 Thread Thomas Hallgren
uccessful? If you have an answer to any of these questions, or know where to look for answers, or have any other comments, please email me! I'll post a summary of the replies I get. Thanks in advance. Thomas Hallgren --- References [1] Luca Cardelli Peter Wegner: "On Understanding Types, Data