I have made available a build of GHC 8.2.2 with the config option:
--disable-large-address-space
You may find this useful if you are using Ubuntu 16.04 on Windows
Subsystem for Linux.
https://github.com/zoominsoftware/ghc-8.2.2-wsl
Although Microsoft has been making gradual progress on the
Joachim, first and foremost, thanks for the awesome libraries
ghc-vis and ghc-heap-view.
The design trade-offs for ghc-vis do make sense if you think of
it as a didactic tool. But as a debugging tool, the most important
factor is that it should "Just Work", with no big builds, no fiddling,
no
I wrote:
>> I need a simple heap visualization for debugging purposes...
>> Vacuum... has some long-outstanding PRs against it...
>> that were never applied...
>> Getting ghc-vis to compile looks hopeless...
>> ghc-heap-view... is there a quick and simple
>> visualizer for its output, without
I need a simple heap visualization for debugging purposes.
I'm using GHC 8.0.2 to compile a large and complex yesod-based
web app. What's the quickest and easiest way?
Vacuum looks simple and nice. But it has some long-outstanding
PRs against it to support GHC 7.10 and GHC 8.0 that were never
I have a module A with no export list, and a function f which from the
API point of view should part of the export list of A. But f must be
defined in module B, not module A, due an import cycle. I added this
line in module A to re-export f from A:
import B as A (f)
This resulted in an unused
Resurrecting this thread:
My impression was that Edward's suggestion was a simple and
obvious solution to the problem of previous GHC versions quickly
becoming orphaned and unbuildable. But Austin thought that this
thread was stuck.
Would Edward's suggestion be difficult to implement for any
I wrote:
This thread makes it clear what a mess
we have inherited from the days when GHC was primarily a
research compiler. Let's face it - GHC is now also a serious
production compiler, and this urgently needs to be cleaned up.
hvr wrote:
Are you referring to the GMP dependency or something
In order support some older software that we released, we need
to get a working GHC 7.4.2 on Ubuntu Trusty. We currently have
GHC 7.8.3.
The binary tarball for GHC 7.4.2 does not install on Trusty due to
multiple incompatibilities. For example, GHC requires GMP 3, but
Trusty only provides GMP =
I wrote:
How do I get a working GHC 7.4.2 on Trusty?
Thanks to all for the suggestions.
Daniel Trstenjak wrote, off-list:
I can only recommend: https://launchpad.net/~hvr/+archive/ubuntu/ghc
Thanks Daniel! I hadn't looked at Herbert's ppa for a while. Despite
the comments, which say it is
You may need to resort to
strace to find out what's trying to pull in libgmp.so.whatever.
I don't know how to do that. And anyway, I don't have access to
the machine on which the customer is reporting this. I do believe
the report - there is no compilation going on here, they are
only running
We received a complaint from one of our customers that
the Linux executable for one of our products - compiled
using GHC - does not run because of libgmp not being
installed on their server. This binary was compiled using
GHC 7.4.2 (HP 2012.4.0.0). We hope to be migrating soon
to GHC 7.6.3 (HP
Hi Brandon,
Thanks for your response and explanation.
I wrote:
[For] GHC-compiled binaries...
what are the exact requirements we need to communicate
to our customers?
You wrote:
Ideally you would use `ldd` on
binaries to determine other dynamic dependencies
that must be communicated
ldd
I had trouble installing the generic 64-bit Linux tarball for 7.6.3.
With some help from Ian, who pointed out that the problem was
related to ld-linux.so, I finally figured out the root of the problem:
the installation requires *both* the 64-bit and 32-bit
versions of libc6 plus deps to be
Simon Peyton-Jones wrote:
This message is to invite you to send me your favourite example of using a
GADT to get the job done. Ideally I’d like to use examples that are (a)
realistic, drawn from practice (b) compelling and (c) easy to present
without a lot of background.
Last year I
Hi Simon,
First of all, I'm sorry if I'm coming off as too combative,
as Greg says. That is certainly not my intention.
I'm not asking for any free work from you, either.
The only reason I don't like using OverloadedStrings
for typing string literals as Text and ByteString
is that when you turn
Erik Hesselink wrote:
I don't think IsString should be dismissed so easily.
I'm just saying I don't want to be forced to use it.
If others like it, I'm not dismissing it.
we have a couple of newtypes over Text that do different kinds of
normalization. An IsString instance for these is useful
I wrote:
In addition, OverloadedStrings is unsound.
J. Garrett Morris wrote:
fromString can throw errors, just like fromInteger
This is true; the use of polymorphism
for numeric literals is also unsound.
However, in practice, it is rare for there to be
dangerous instances of the numeric type
Greg Weber wrote:
I very much agree with you. However, when we complain about something
essentially we are asking others to prioritize it ahead of other
things. I don't think any more visibility of this issue is going to
improve its prioritization. I suspect your only way forward right now
is
J. Garrett Morris wrote:
By this logic, head is unsound, since head [] throws an error.
Haskell types are pointed; Haskell computations can diverge.
Well, there are those who would actually agree with
that and banish 'head' and friends from the language.
But I'll agree with you here.
[As an
Michael Snoyman wrote:
Here's a theoretically simple solution to the problem. How about
adding a new method to the IsString typeclass:
isValidString :: String - Bool
...whenever GHC applies OverloadedStrings in a case
where the type is fully known at compile time (likely the most common
Markus Läll wrote:
What can go wrong when you use an overloaded string to be fromString'd
into Text?
Here's an example:
The author of the xml-types package provides an IsString
instance for XML names, so you can conveniently
represent XML names as string literals in your source
code.
But not
Simon Peyton-Jones wrote:
If you want validation of literal strings, then TH quasiquotes are the way to
go:
I agree. OverloadedStrings is, in effect, an unsafe replacement
for quasiquotes. People find OverloadedStrings easier to use
than quasiquotes, so its use in that way is becoming popular.
Markus Läll wrote:
You do know, that you already *can* have safe Text and ByteString from
an overloaded string literal.
Yes, the IsString instances for Text and ByteString are safe
(I hope).
But in order to use them, I have to turn on OverloadedStrings.
That could cause other string literals
Daniel Peebles wrote:
Why are potentially partial literals scarier than the fact that every value
in the language could lead to an exception when forced?
That's a legitimate question, but it's strange to hear it from
you.
People ask that same question about Haskell's static
type system. Why
Simon Marlow wrote:
In this thread people are using the term safe to
mean total. We already overload safe too much, might it be a better
idea to use total instead?
I'm not sure what you're talking about. I don't see how
this thread has anything to do with total vs. partial
functions.
I'm
Jeremy Shaw wrote:
I have often wished for something like:
{-# LANGUAGE StringLiteralsAs Text #-}
where all string literals like:
f = foo
would be translated to:
f = (fromString foo :: Text)
Agreed, I would also really like this.
I find that OverloadedStrings is too general
Evan Laforge wrote:
Is there something that changed in 7.4.1 that would cause it to decide
to interpret .hs files instead of loading their .o files? E.g.:
Brandon Allbery wrote:
I thought this was deliberate because the debugger won't work with object
files?
Oh I hope not. I almost never
By the way, thanks to Greg for driving this discussion,
please keep up the good work!
Simon Peyton-Jones wrote:
Can you turn your proposal into a Wiki page?
OK I'll try to get to that later today.
It's different to Johan's.
Oh? I didn't realize that. OK, I'll look at it more closely.
I'm
I wrote:
Today, it is very unusual to use GHC by itself.
To use Haskell, you install the Haskell Platform.
That is GHC together with Cabal and a basic
set of libraries. It is very easy to install.
Wolfram Kahl wrote:
However, since you are willing and able to test bleeding-edge versions of
Gershom Bazerman wrote:
Beyond that, it would really help namespacing in general to appropriately
extend the module system to allow multiple modules to be declared within a
single file -- or, better yet, submodules. I know that this introduces a
few corner cases that need to be thought through
Serge D. Mechveliani wrote:
I have ghc-7.4.0.20111219 made from source and tested it on the
DoCon-2.12 application -- thanks to people for their help!
It looks all right.
This was -- with skipping the module Random
Now it remains to add the Random package.
I have taken AC-Random Version
I wrote:
Yes. The translation of record updates given in the Report
makes perfect sense for {}. It is only forbidden by
n = 1, but no reason is given for that restriction.
d wagner wrote:
It doesn't make sense to me. The translation explodes a value into a case
statement over its
Simon Peyton-Jones wrote:
Trouble is, what type does this have?
f x = x {}
Malcolm Wallace wrote:
Empty record patterns {} are permitted, even for types
that are not declared with named fields.
So I don't see why an empty record update should
require the type to be declared with named
Simon Peyton-Jones wrote:
Trouble is, what type does this have?
f x = x {}
Malcolm Wallace wrote:
f :: a - a
Ian Lynagh wrote:
That wouldn't help the original poster, as it is incompatible with
f :: Foo Clean - Foo Dirty
Only because in that expression the type of x is not known.
Simon Marlow wrote:
It would probably be better to have an abstract FilePath type and to keep
the original bytes, decoding on demand. But that is a big change to the API
and would break much more code. One day we'll do this properly; for now we
have this, which I think is a pretty reasonble
George Giorgidze wrote:
My second proposal is to introduce the
OverloadedLists extension that overloads
list literals...
I am opposed to this proposal as stated.
But I think that with a modification,
it can not only be improved, but also solve
the problems with the current OverloadedStrings
Roman Leshchinskiy wrote:
In general, if we are going to overload list literals then forcing the
desugaring to always go through lists seems wrong to me. There are plenty
of data structures where that might result in a significant performance
hit.
These are literals. So the lists will almost
It was pointed out by Ben Millwood on the Cafe
that there is an undocumented way to escape the
closing oxford bracket of a quasi-quote using
a backslash:
[s|This quasi-quote contains this, \|], an escaped
closing oxford bracket.|]
The backslash itself cannot be escaped in this
way:
[s|Also
Don Stewart wrote:
The haskell.org committee... has decided to
incorporate haskell.org as a legal entity. This email outlines our
recommendation, and seeks input from the community on this decision.
Thanks, good news! And thanks for posting to multiple
lists for maximum public notification to
Simon Peyton-Jones wrote:
Generic Defaults... will replace... the Derivable type classes
stuff... in GHC 7.2 or 7.4...
Please yell if you are a secret user of derivable type classes,
so this change would discombobulate you.
Could you give us a preview of the parts of the syntax
spectrum that
Iavor Diatchki wrote:
I use git for a lot of my development...
Given the responses though, it sounds like this is a well
known problem with darcs with no obvious solution.
Why do you say there is no obvious solution? In fact, Ganesh,
representing the Darcs team, responded:
1) a darcs rebase
Just after upgrading some basic packages from
Hackage, doesDirectoryExist began always returning
False. I suspect that this is related to the unix
package, and/or its strange interaction with the
directory package. See:
http://hackage.haskell.org/trac/ghc/ticket/4812
Thanks,
Yitz
Henning Thielemann wrote on Haskell Cafe:
Attached is a program with a space leak...
I have coded a simple 'map' function, once using unsafePerformIO and
once without. UnsafePerformIO has a space leak in some circumstances.
In the main program I demonstrate cases with and without space leak.
leledumbo wrote:
I notice that many of the installed libs aren't required for learning
Haskell. What libs are required so I can get the bare minimum version of
GHC?
For most people, the recommended approach is to install
the Haskell Platform. This is not a minimal setup - it includes
packages
On Fri, Apr 23, 2010 at 1:24 PM, Bayley, Alistair wrote:
Looks like the London HUG domain (londonhug.net) registration has
expired. Neil Bartlett was the registrant.
Neil: do you plan to renew?
The whois database reports:
Domain name: LONDONHUG.NET
This domain name is up for auction for a
I wrote:
My opinion is that we should either use TWO DOT LEADER,
or just leave it as it is now, two FULL STOP characters.
Simon Marlow wrote:
Just to be clear, you're suggesting *removing* the Unicode alternative for
'..' from GHC's UnicodeSyntax extension?
Yes, sorry. Either use TWO DOT
My opinion is that we should either use TWO DOT LEADER,
or just leave it as it is now, two FULL STOP characters.
Two dots indicating a range is not the same symbol
as a three dot ellipsis.
Traditional non-Unicode Haskell will continue to be
around for a long time to come. It would be very
I wrote:
I was suggesting that whenever the Prelude fails to load,
the error message should contain that hint.
hmm, I'll think about that. Is it not enough to see a compilation error
pointing to the file Prelude.hs?
Seems obvious in the context of this thread. But not being in
the middle of
Isaac Dupree:
We could try to find out how large Integers get, in practice, in
existing Haskell code (this may be difficult to find out).
Daniel Fischer wrote:
Just as a data-point, my code rarely exceeds 128 bits (at least, beyond
that performance isn't so important anymore).
And Daniel,
I wrote:
As another data point, Python has also re-invented the GMP
wheel, likely for the same licensing reasons. They have
been using a simple implementation of Karatsuba
multiplication for years. I have never heard of anyone
complaining about it
Greg Fitzgerald wrote:
Looks like they
Daniel Fischer wrote:
(Note: Surprisingly (?), if you load a module with
{-# LANGUAGE NoMonomorphismRestriction #-}
, the monomorphsm restriction is still enabled at the ghci prompt, so we
have to disable it for that again - or we could have loaded the module with
$ ghci
This discussion definitely does not belong on the
Haskell-Beginners list. Besides not being a topic
for beginners, being there is keeping it under the
radar of many or most of the people who work on
these things in Haskell.
I am moving the discussion to the GHC users list,
as suggested by
Please add to the documentation for :set prompt:
If you enclose \i{prompt} in quotes, you can use Haskell
syntax for String literals.
Actually, :set prompt is nearly useless without quotes, because
GHCi strips off trailing spaces from commands. We should either
add a space at the end of a prompt
Hi Slavomir,
Slavomir Kaslev wrote:
inter x [] = [[x]]
inter x yys@(y:ys) = [x:yys] ++ map (y:) (inter x ys)
perm [] = [[]]
perm (x:xs) = concatMap (inter x) (perm xs)
I was surprised to find that not only my version is much simpler from the one
in Data.List but it also performs better.
The (Interactive) Glasgow Haskell Compiler -- version 6.10.4
How to get it
http://www.haskell.org/ghc/
I have a few comments about the Distribution Packages page
that is linked from there:
http://www.haskell.org/ghc/distribution_packages.html
Debian:
Remove the line Newer packages
The Debian ghc6 package for the stable distribution is currently
back at GHC 6.6 - not surprising given the way stable works at
Debian. There is currently no backport of a more recent GHC to
Debian stable.
I need GHC 6.8 for a project to run on a production server.
That means it will be running
Chris Kuklewicz wrote:
Who can suggest a way to cast from Float to Word32 and Double to Word64
using ghc? The actual task is that I need to write out the Float as a
little endian sequence of four bytes and also be able to read it back in.
The writing and reading are done in Put and Get
Moving this side point to the ghc users list...
Ashley Yakely wrote:
What is an orphan instance, and why do we care about them?
Simon Peyton-Jones wrote:
They are documented in the GHC manual
http://www.haskell.org/ghc/docs/latest/html/users_guide/separate-compilation.html#orphan-modules
Judah Jacobson wrote:
I'm writing a program that reads input from the user but should also
handle a ctrl-c...
It works fine compiled without -threaded, but with -threaded
it blocks forever after a ctrl-c.
Simon Marlow wrote:
Ah, this is a consequence of the change we made to
Claus Reinke wrote:
i tried at the time to get others to post their .ghci files at well,
and share their favourite tricks, but there weren't many responses.
OK, OK. I just posted Customized GHCi interactive environments
to wiki. It's a simple but very powerful trick that I use all the time.
Hi Neil,
Neil Mitchell wrote:
You can search for it in the standard libraries using Hoogle:
[something mangled]
I think you were trying to suggest searching for (a,b)-(b,a)
by using a URI directly. My mail reader justifiably
mangled your proposed URI, as would any non-broken
mail reader,
Manuel M T Chakravarty wrote:
The file length is correct.
MD5 (Public/Web/haskell/GHC-6.9.20080213-i386.dmg) =
cc76dea615234aa83d85ef5c30021828
Bingo! Thanks.
I wrote:
In the readme, you say that I require Xcode 3.0. Tiger came with
Xcode 2.4.1, and I have not updated it. Could that be
Manuel M T Chakravarty wrote:
Try this
http://www.cse.unsw.edu.au/~chak/haskell/GHC-6.9.20080213-i386.dmg
I got it, but there were some download problems. I hope the
file is intact. It has exactly 44740924 bytes. Perhaps you
could send me an md5sum to be certain.
Have a look whether that
Manuel M T Chakravarty wrote:
I'd also be nice to have a cool logo/icon.
Don Stewart wrote:
Someone want to clean up the classic GHC logo?
http://www.cse.unsw.edu.au/~dons/images/happy-dino.jpg
:)
The Clyde Arc in Glasgow, combined somehow with a lambda,
could be the basis of a striking
Manuel M T Chakravarty wrote:
Finally, you can have the glorious GHC in a format satisfying the
discerning Mac user
Fantastic news! Thanks!
The GHC binary in the package links statically against GNU readline
(to provide editing capabilities at the GHCi prompt). This is fine as
GHC's BSD3
Denis Bueno wrote:
the Read StdGen instance should never fail. However, in GHC 6.8.2, it
appears to:
It first fails for me on strings of length seven.
You need to use fst . head . reads instead of read.
The Read instance of StdGen only uses part of the string,
and politely gives you back the
Christian Maeder wrote:
Where are the users that use the functionality not supported by
editline's emulation layer? (Shout now or be quiet ever after)
I only wanted to find out which user group would need to change readline
to editline and (if following my suggestion) which group readline to
Christian Maeder wrote:
3. if ghci is going to use editline... then readline would not
need to be a core package und users might need to
install package readline explicitly.
OK, I get it.
Even if we leave readline as it is, so that the package system will
theoretically not force the person to
Hi Christian,
Christian Maeder wrote:
...Even better if the current package readline is renamed to old-readline
and readline-compat to readline.
I have been trying to understand why you want to do
that. What would we gain?
Thanks,
Yitz
___
Christian Maeder wrote:
The extended packages 2 could go under extra libs or hackageDB, while
1 remains a boot package for ghc that can link to editline on macs
and readline under linux, but has the same interface and package name!
I would hope that ghc will link to editline-ext on all
Bulat Ziganshin wrote:
for me, GMP is much more problematic issue. strictly speaking, we
can't say that GHC is BSD-licensed because it includes LGPL-licensed
code (and that much worse, it includes this code in run-time libs)
Manuel M T Chakravarty wrote:
..binary distributions of GHC that
Isaac Dupree wrote:
GHC is in no legal trouble whatsoever... only if proprietary Haskell
code uses the readline library and doesn't switch to using the editline
backend.
Agreed. I didn't mean that GHC itself was ever in any
legal trouble. But as a compiler, it must be possible for
users to
Don Stewart wrote:
However, its buried in the rts/distributed with the runtime, so that
users may optionally use that version, rather than finding and
installing their own external gmp package. On almost all platforms
though, the distributed-with-ghc gmp is unused.
But doesn't that mean that
Don Stewart wrote:
on any system where an external libgmp is available, it will
be dynamically linked into the generated haskell programs,
and in-tree gmp isn't used at all (or compiled, or installed)
So on linux and *bsd, that should be fine.
On Mac OS X (as a special case of *bsd), we have
Christian Maeder wrote:
ghc will link to libedit if it is available on your platform, but the
Haskell package will still have the name readline and give ghc all the
functionality it needs (without licence problems).
Only the current readline Haskell package needs libreadline and
supplies more
Isaac Dupree wrote:
It's also possible to just distribute, for
example, the .o file(s) and a way to link them with a GMP to get the
final result; this doesn't even reveal your source-code any more than
your program being dynamically linked, at least if you do it right -- right?
It doesn't
Thorkil Naur wrote:
Readline is free software, distributed under the terms of the GNU General
Public License, version 2.
Bulat Ziganshin wrote:
in short, that means that software compiled with this compiler AND
distributed to general audience, should have GPL-compatible license
(i.e. GPL or
Bulat Ziganshin wrote:
in short, that means that software compiled with this compiler AND
distributed to general audience, should have GPL-compatible license
(i.e. GPL or BSD-like)
(as far as i understand GPL/LGPL terms)
Any software compiled with this compiler, or only
software that uses
I wrote:
Removing support for %HOME% has suddenly broken many
programs. If people don't like it, we can consider
deprecating it in some future version of GHC, but for now
it should put back.
Simon Marlow wrote:
Only GHCi has changed here. Perhaps you're under the impression that we
Hi Felix,
You have described your own style of using
some of the Window's Known Folders. In my
opinion your style is a bit Unixy, but that's fine,
you should be allowed to do it that way in GHC.
But GHC should not force others to do it only that way.
btw, years ago I used to use the Profile
Removing support for %HOME% has suddenly broken many
programs. If people don't like it, we can consider
deprecating it in some future version of GHC, but for now
it should put back. I would say it is quite ironic that some
people are arguing against this by saying that it will lead
to more bug
Hi Seth.
Sorry, my asterisks were not at all meant to be a flame.
Please accept my sincere apologies if it appeared that way.
I wrote:
It is *not* trivial to wrap the function in question, and
it is not more correct.
Seth Kurtzberg wrote:
Why is it *not* trivial to wrap the function?
Juanma Barranquero wrote:
In fact, it'd be better if GHC/GHCi would do what Emacs on Windows
does: use HOME if defined, else use ShGetFolderPath to find the
Windows-defined home directory.
I agree, that is closer to the correct behavior.
Except that on Vista ShGetFolderPath is deprecated.
Use
Simon Peyton-Jones wrote:
Given instance C T where ..., for any method 'm' not
defined by ...:
for every class D of which C is a superclass
where there is an instance for (D T)
see if the instance gives a binding for 'm'
If this search finds exactly one
Sigbjorn wrote:
This was a hack to work around similar behaviour when starting up GHCi,
Notice that my workaround is only applied upon startup, not in the REPL. =
floating the hackery inward could just save the day.
OK.
Simon Marlow wrote:
The underlying bug is in the Windows CRT, or
Greg Fitzgerald wrote:
Running 6.8.1 on Windows XP, typing 'main' while :r is still processing
causes the 'm' in 'main' to morph to a 'g'.
Olivier Boudry wrote:
it (also works with :l).
Stefan O'Rear wrote:
It's very old. http://hackage.haskell.org/trac/ghc/ticket/831
But these
Quoth InteractiveUI.runGHCi:
case maybe_expr of
Nothing -
do
#if defined(mingw32_HOST_OS)
-- The win32 Console API mutates the first character of
-- type-ahead when reading from it in a non-buffered manner. Work
-- around this by flushing
Hi Christian,
binary distributions of GHC 6.8.1 for Mac OS X 10.4 (Tiger)
Great, thanks!
Can this be posted together with the other binary distributions at:
http://haskell.org/ghc/download_ghc_681.html
and also Manuel Chakravarty's Leopard build?
Warning: this binary distribution does NOT
Duncan Coutts wrote:
iswspace... We could short-cut that for ascii characters.
Also, '\t', '\n', '\r', '\f', and '\v' are contiguous. So
isSpace c =c == ' '
|| c = '\r' c = '\t'
|| c == '\xa0'
|| c '\xff' iswspace (fromIntegral (ord c)) /= 0
That makes
I wrote:
I have observed the following weird behavior:
...ghci's ability to recognize the
methods of the class seems to vary depending
on whether or not hi files exist for the modules.
Daniel Fischer wrote:
Pertinent to this is section 3.4.3 of the user's guide, What's really in
scope at the
I have observed the following weird behavior:
When I define an instance of a certain MPTC
in a separate module from the definition of
the class, ghci's ability to recognize the
methods of the class seems to vary depending
on whether or not hi files exist for the modules.
I am using the current
Simon Peyton-Jones wrote:
I just applied this rule
http://www.haskell.org/ghc/docs/latest/html/users_guide/type-extensions.html#id3170412
In this case the type of newBoard is
newBoard :: (Game b mv e, MonadStaet b m) = m ()
Following the rules in that manual section, this type
On 12 November 2006 I wrote (on the haskell list):
class Error e = Game b mv e | b - mv e where
newBoard :: MonadState b m = m ()
...
Since MonadState has the fundep m - b, the type
of newBoard fully specifies all of the class parameters
But GHC 6.6 complains...
Simon Peyton-Jones
93 matches
Mail list logo