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
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
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
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
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]] *
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
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
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
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
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.
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.)
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
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
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
://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
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
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
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
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
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
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_
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
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
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
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
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
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
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
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 =
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
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
, 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
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
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
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
([]::[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
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
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
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
...
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
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
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
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
.
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
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
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
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
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
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
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
/
[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 :-)
an infinite one.)
Have I missed something fundamental that prevents this solution from working?
--
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
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
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
(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
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
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
/chalmers
Send bug reports and feedback to
[EMAIL PROTECTED]
or [EMAIL PROTECTED]
Thomas Hallgren
Magnus Carlsson
? ?
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
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
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
62 matches
Mail list logo