Re: regression in ghc / cabal integration in 9.2.1

2021-10-30 Thread Albert Y. C. Lai
On 2021-10-30 3:43 p.m., Brandon Allbery wrote: Wasn't there specifically a new cabal version released to deal with 9.2.1? 3.4.1.0 / 3.6.2.0? There is a double fault here. Firstly yes, one should use a newer version of cabal-install that is known to support GHC 9.2. So, 3.6.2.0 it is! But

Re: Linking completely statically

2020-08-12 Thread Albert Y. C. Lai
On 2020-08-12 10:15 a.m., Volker Wysk wrote: But it sounds quite complicated. What I have in mind isn't worth the trouble. I just wanted to have a statically linked version for inclusion in my backup and in my maintenance USB stick. I have an exe built by GHC in January 2014 (that's like GHC

Multiple C threads -> one unthreaded GHC RTS

2017-09-28 Thread Albert Y. C. Lai
Suppose I have a C program with multiple C threads calling Haskell functions, maybe the same Haskell function too, and the GHC RTS used is the unthreaded one. What will go wrong? I ask because Cabal/cabal-install has recently added building of export-to-C shared libraries, i.e., the

Re: Behavior of GHC_PACKAGE_PATH

2016-08-19 Thread Albert Y. C. Lai
On 2016-08-16 07:08 AM, Harendra Kumar wrote: As per the GHC manual (https://downloads.haskell.org/~ghc/master/users-guide/packages.html#the-ghc-package-path-environment-variable ),

Re: How to remove a cabal package from the local system?

2015-01-22 Thread Albert Y. C. Lai
On 2015-01-21 10:36 AM, Volker Wysk wrote: I have installed/registered a new version of a package with cabal by accident. How can I remove it again? See my http://www.vex.net/~trebla/haskell/sicp.xhtml#remove . In fact, read the whole thing. ___

Re: 7.8.1, template haskell, and dynamic libraries

2014-02-19 Thread Albert Y. C. Lai
On 14-02-18 10:44 PM, Carter Schonwald wrote: hey Albert, could you open a ticket on ghc Trac about the QuasiQuot thing? It is now https://ghc.haskell.org/trac/ghc/ticket/8805 ___ Glasgow-haskell-users mailing list Glasgow-haskell-users@haskell.org

Re: 7.8.1, template haskell, and dynamic libraries

2014-02-18 Thread Albert Y. C. Lai
The new dynamism is pretty nice! I even used GHC 7.6.3 to build cabal-install 1.18, then played with PATH so that when I said cabal install mtl it saw GHC 7.8. It correctly added -dynamic-too and built both *.a and *.so in one go. This is very user-friendly. Still, I observed a few oddities.

Re: target audience for the binary distribution

2014-02-09 Thread Albert Y. C. Lai
On 14-02-08 01:33 PM, harry wrote: Who actually are most users for the bindist? Debian derivatives have the latest GHC in the package repository No. The other pasture is not greener. The distro you don't use is not more up to date. Chinese proverb: all crows in the whole world are equally

Re: 32-bit libs required for 64-bit install

2013-08-28 Thread Albert Y. C. Lai
On 13-08-25 08:48 AM, Yitzchak Gale wrote: 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

Re: change location of user's package directory

2013-07-25 Thread Albert Y. C. Lai
On 13-07-25 03:14 PM, harry wrote: How can I change the location that ghc and ghc-pkg use for the user's package directory? I'm running GHC in a very restricted environment where I don't have access to $HOME, but I can use specific subdirectories. Cannot. But you have another option. GHC and

Re: missing mtl (which exists) when installing filemanip package

2013-01-10 Thread Albert Y. C. Lai
On 13-01-10 10:34 AM, HP Wei wrote: Question: why can't $HOME/ghc/lib/mtl-2.0.1.0/ be recognized during the above Setup configure ?? You need to see my http://www.vex.net/~trebla/haskell/sicp.xhtml Existence of files is insufficient. Metadata trumps data. But there is one point I

Re: Using DeepSeq for exception ordering

2012-11-12 Thread Albert Y. C. Lai
On 12-11-12 11:34 AM, Simon Marlow wrote: Did you try -fpedantic-bottoms? Interesting option. And furthermore its doc refers to -fno-state-hack, too. import Control.DeepSeq import Control.Exception main = do evaluate (('a' : error A) `deepseq` putStrLn hi) throwIO (userError B) -O

Re: Using DeepSeq for exception ordering

2012-11-08 Thread Albert Y. C. Lai
On 12-11-08 07:12 AM, Simon Hengel wrote: I was just going to say that I can give at least one counterexample where this does not hold: evaluate (('a' : undefined) `deepseq` return () :: IO ()) throwIO exceptionB But then I realized that here exceptionA is optimized away altogether. For

Re: Using DeepSeq for exception ordering

2012-11-08 Thread Albert Y. C. Lai
On 12-11-08 01:01 PM, Nicolas Frisby wrote: And the important observation is: all of them throw A if interpreted in ghci or compiled without -O, right? Yes. ___ Glasgow-haskell-users mailing list Glasgow-haskell-users@haskell.org

Re: divRem by `-' performance

2012-10-18 Thread Albert Y. C. Lai
On 12-10-18 05:24 AM, Serge D. Mechveliani wrote: And concerning this example: I am not even sure now that it worths to setting $! there. Because I deliberately program qRem as returning a pair (quot, rem), and do not program a separate function for rem. And to obtain rem, one applies

Re: divRem by `-' performance

2012-10-18 Thread Albert Y. C. Lai
On 12-10-18 03:10 PM, Serge D. Mechveliani wrote: But in this example of qRem the time is almost so as if quot was not computed. Probably, the coefficient of this expense is small. On the other hand, an extra memory occupation also often causes slowing down of all the environment program,

Re: default instance for IsString

2012-04-24 Thread Albert Y. C. Lai
On 12-04-24 10:11 PM, wren ng thornton wrote: To the extent that ByteString's instance runs into issues with high point codes, that strikes me as a bug in virtue of poor foresight. Consider, for instance, the distinction between integral and non-integral numeric literals. We recognize that (0.1

Re: cabal install version selection

2012-03-30 Thread Albert Y. C. Lai
On 12-03-30 06:37 PM, Christian Höner zu Siederdissen wrote: I fail to remember or re-google the package version selection for cabal, if no version constraints are given. If I depend on iteratee, and there are no constraints, does it take the lowest version? It takes the highest version. To

Re: Error while installing new packages with GHC 7.4.1

2012-03-05 Thread Albert Y. C. Lai
On 12-02-29 09:30 PM, Brent Yorgey wrote: I wonder about the possibility of making a simple tool to parse the output of cabal install -v3 and visualize/organize it in some sort of way to make this process easier. What might such visualization/organization look like? The most useful

Re: Error while installing new packages with GHC 7.4.1

2012-02-29 Thread Albert Y. C. Lai
On 12-02-29 06:04 AM, Antoras wrote: I don't know where the dependency to array-0.3.0.3 comes from. Is it possible to get more info from cabal than -v? hoogle-4.2.8 has Cabal = 1.8 1.13, this brings in Cabal-1.12.0. Cabal-1.12.0 has array = 0.1 0.4, this brings in array-0.3.0.3. It is a

Re: named pipes

2012-01-20 Thread Albert Y. C. Lai
On 12-01-19 02:16 PM, Serge D. Mechveliani wrote: -- Main.hs - hPutStr h1 str hFlush h1 This fails to send a newline. --- fifo2.c - if (fgets(str, BOUND,

Re: named pipes

2012-01-18 Thread Albert Y. C. Lai
Main.hs does not open fromA at all. (fromA_IO is dead code.) This causes fifo2.c to be hung whenever it opens fromA. From the man page of mkfifo(3) on Linux: Opening a FIFO for reading normally blocks until some other process opens the same FIFO for writing, and vice versa. See fifo(7) for

Re: ghc-pkg unregister disobedience

2011-08-30 Thread Albert Y. C. Lai
On 11-08-29 02:39 PM, Albert Y. C. Lai wrote: ghc-pkg unregister --user P drops the global package if P is not in user. [etc] Now as ticket http://hackage.haskell.org/trac/ghc/ticket/5442 ___ Glasgow-haskell-users mailing list Glasgow-haskell-users

ghc-pkg unregister disobedience

2011-08-29 Thread Albert Y. C. Lai
For package P, ghc-pkg unregister --user P drops the global package if P is not in user. ghc-pkg unregister --global P drops the user package if P is in user. ghc-pkg unregister --package-conf=dir P drops the user or the global package, preferring the user one, if P is not found in dir.

Re: Why no stack overflow in ghci?

2011-08-02 Thread Albert Y. C. Lai
On 11-08-01 10:12 AM, Simon Marlow wrote: On 26/07/2011 22:41, Albert Y. C. Lai wrote: http://www.mail-archive.com/haskell-cafe@haskell.org/msg88368.html The message linked here doesn't really explain *why*, rather it seems to be a bug report on haskell-cafe (which I don't usually read, so

Re: Why no stack overflow in ghci?

2011-07-26 Thread Albert Y. C. Lai
On 11-07-26 03:57 PM, Roman Cheplyaka wrote: The code main = print $ foldl (+) 0 [1..100] when compiled (without optimizations) results in a stack overflow, which is expected. However, when run from ghci it succeeds. Why is it so? (Tested with GHC 6.12.something and 7.0.4) To enjoy

Re: haskell-platform configures failed on Ubuntu 11.04

2011-07-22 Thread Albert Y. C. Lai
On 11-07-22 02:26 PM, David Smith wrote: I tried to build the newest haskell-platform-2011.2.01 from source on Ubuntu 11.04, following the instructions http://www.vex.net/~trebla/haskell/haskell-platform.xhtml. But there was still an configure error. [...] checking for library containing

Re: Package management

2011-04-27 Thread Albert Y. C. Lai
On 11-04-26 05:05 PM, Brandon Moore wrote: There are already hashes to keep incompatible builds of a package separate. Would anything break if existing packages were left alone when a new version was installed? (perhaps preferring the most recent if a package flag specifies version but not

hot-refreshing a package (same version number, new content)

2010-07-15 Thread Albert Y. C. Lai
Suppose I start ghci, use a value from a package, causing it to be linked, then I modify the package and reinstall, same version number, without quitting my ghci session. Is there a way to tell the ghci session to refresh and use the modified package? Suppose I do something similar with the

Re: Modules and their explicit export lists (are an annoyance)

2010-06-19 Thread Albert Y. C. Lai
I write an export list because I want to help Haddock. It suffices to export a constructor with (..) for this, if I intend to. How much to export is always politics, bargaining, negotiation, social dynamics. There will always be someone annoyed. Exporting too much reduces annoyance now by

Re: Type checker's expected and inferred types (reformatted)

2009-10-24 Thread Albert Y. C. Lai
For the record, and to speak up as part of a possible silent majority, I completely understand the type error messages. I find enough information in them. I like them. I find it unnecessary to decrypt the two words expected and inferred. They have their own definitions and they stand for

Re: Having trouble with parallel Haskell

2008-06-04 Thread Albert Y. C. Lai
I do not have a platform to try it on; the following is pure speculation. In main, the builder of input is highly lazy, since randoms is. To be sure, the spine of the list is presently forced by printing its length, but the numbers inside the list... It is very bleak because randoms ensures

Re: ANNOUNCE: GHC version 6.6.1

2007-04-28 Thread Albert Y. C. Lai
Duncan Coutts wrote: Is it just me who thinks this is a silly idea? Why should GHC include a C++ compiler? I'm afraid it's just you. Like that someone who has indicated interest in haskell-c++ integration, I am interested in the prospect of mixing haskell with .NET languages, and not to