News aggregator

How do I recover from a bytestring installation that broke ghc?

Haskell on Reddit - Fri, 09/26/2014 - 11:30am

Hi, I had a ghc-7.8.2 system working. I installed a new version of bytestring, which broken the package system, as "ghc-7.8.2" is shown in braces under ghc-pkg, and I cannot compile anything now. I tried to do "ghc-pkg unregister", but that did not help (it did remove bytestring from the ghc-pkg list, but did not recover ghc-7.8.2, which still shows in braces)

The problem is that I installed the 7.8.2 binary long ago in a local directory from source distribution, using another version that I installed in local directory too, but now I have deleted that other version, so I have no version from which to make a source build again. I tried to download a binary version, but they all fail to install because of different dependencies such as LIBC >=2.7 (I only have 2.5), libffi.so.5, or libedit.so.0. I even tried to build a libedit.so.0, but the downloaded old binary refuses to use it.

I do not have sudo on this machine, so I am limited to what I can install into my local directory.

So is there any way I can recover my 7.8.2 installation? Thanks!

submitted by diyu60607
[link] [21 comments]
Categories: Incoming News

minmax

Haskell on Reddit - Fri, 09/26/2014 - 7:06am

I came up with the need of using a function that retrieved both minimal and maximal value in a list. I haven’t found that function yet, so I wrote a little implementation:

minmax :: (Ord a) => [a] -> (a,a) minmax [] = error "empty list: minmax" minmax (x:xs) = foldl (\(mn,mx) a -> (min mn a,max mx a)) (x,x) xs

I guess that can also be written as minmax :: (Ord a,Foldable f).

What do you think? Should such a function be in Data.Ord, Data.List or whatever?

submitted by _skp
[link] [18 comments]
Categories: Incoming News

__GLASGOW_HASKELL__=708?

glasgow-user - Fri, 09/26/2014 - 4:09am
Using GHC 7.8.3 from the latest Haskell Platform on OS X 10.9.4, the __GLASGOW_HASKELL__ preprocessor symbol is being set to 708 instead of 783. I'd guess I have some stale files lying from previous versions GHC or HP, but I can't seem to find them. Any clues? $ cat wtf.hs {-# LANGUAGE CPP #-} $ ghc-7.8.3 -v -E wtf.hs 2>&1 | grep 708 /usr/bin/gcc -E -undef -traditional -Wno-invalid-pp-token -Wno-unicode -Wno-trigraphs -I /Library/Frameworks/GHC.framework/Versions/7.8.3-x86_64/usr/lib/ghc-7.8.3/base-4.7.0.1/include -I /Library/Frameworks/GHC.framework/Versions/7.8.3-x86_64/usr/lib/ghc-7.8.3/integer-gmp-0.5.1.0/include -I /Library/Frameworks/GHC.framework/Versions/7.8.3-x86_64/usr/lib/ghc-7.8.3/include '-D__GLASGOW_HASKELL__=708' '-Ddarwin_BUILD_OS=1' '-Dx86_64_BUILD_ARCH=1' '-Ddarwin_HOST_OS=1' '-Dx86_64_HOST_ARCH=1' -U__PIC__ -D__PIC__ '-D__SSE__=1' '-D__SSE2__=1' -x assembler-with-cpp wtf.hs -o /var/folders/w7/_cxvr2k540163p59kwvqlzrc0000gn/T/ghc14288_0/ghc14288_1.hscpp Thanks, Greg
Categories: Offsite Discussion

Hackage bad gateway?

haskell-cafe - Fri, 09/26/2014 - 3:56am
Today (9/25/2014) Hackage is not reachable due to "bad gateway." Is there a status page? Thanks, Dominick
Categories: Offsite Discussion

SIGVTALRM and Unbound threads

haskell-cafe - Thu, 09/25/2014 - 8:55pm
Howdy, I've banged into this issue of FFI errors stemming from a C library improperly handling system call interrupts caused by the SIGVTALRM/SIGALRMs emitted by the Haskell runtime. Usually the 'proper' solution is to fix the C library—easier said than done for most C quagmires. The most popular workaround, described by Bryan O'Sullivan[1] and several others, is to block the culprit signals from reaching the FFI call. I found another workaround using unbound threads, and it seems to work generally for this problem. However, I'm not satisfied with my understanding about *why* it works given what I know about FFI, bound vs unbound threads, and sys calls. As the simplest example, compiled with the threaded runtime (and neglecting imports): main = void $ sleep 10 will be interrupted, whereas main = void $ runInUnboundThread $ sleep 10 will complete its 10 second sleep. How does running the FFI call on an unbound thread block SIGVTALRM or otherwise avoid the interrupt? My understanding is that
Categories: Offsite Discussion

Hackage is down?

Haskell on Reddit - Thu, 09/25/2014 - 7:01pm

I am in the east coast ny area around 9pm Eastern Time. Is hackage down for anyone else?

submitted by tempforfather
[link] [2 comments]
Categories: Incoming News

NOTE: hackage is down (disk space needs).

Haskell on Reddit - Thu, 09/25/2014 - 5:35pm

The hackage server ran out of disk space temporarily, and when I restarted it, there seemed to be some sort of error with the transaction log. I'm investigating.

I'm currently restoring backups and stuff. This will at worst move back time to to early September 25th, so if you uploaded something, please spread the word.

submitted by aseipp
[link] [41 comments]
Categories: Incoming News

5Yr Research Fellowships

General haskell list - Thu, 09/25/2014 - 4:16pm
In the heart of Free Glasgow, in the soon to be People's Republic of Scotland, there is a chance to join the University of Strathclyde with a 5 year research fellowship leading to a permanent full time position. All you need is a 5-page research plan … a lot less than many Fellowship avenues. The area is data science and/or security but we intend to interpret this broadly. Very broadly. More details can be found here. strathvacancies.co.uk All the best Neil
Categories: Incoming News

Haskell Weekly News: Issue 307

General haskell list - Thu, 09/25/2014 - 4:54am
Welcome to issue 307 of the HWN, an issue covering crowd-sourced bits of information about Haskell from around the web. This issue covers from September 14 to 20, 2014 Quotes of the Week * Qfwfq: I seq what you mean. * trap_exit_: if haskell makes programmers 10x more productive, then why are there not better haskell ides? :-) Fuuzetsu: trap_exit_: because you don't need one when you're 10x more productive already ;P * joshcough: im just surprised when im looking for something and i dont find a package by ed kmett. Top Reddit Stories * Wayward Tide is Being Written in Haskell Domain: blog.chucklefish.org, Score: 131, Comments: 30 Original: [1] http://goo.gl/00xr22 On Reddit: [2] http://goo.gl/kJBqTe * Hython: The simplest possible language Domain: callcc.io, Score: 82, Comments: 16 Original: [3] http://goo.gl/T95xQ3 On Reddit: [4] http://goo.gl/LBKTks * Hey /r/haskell, we're hiring! Domain: blog.chucklefish.org, Score:
Categories: Incoming News

Proposal (long term): Remove (/=) from Eq; change the semantics of (==) for floating point

libraries list - Thu, 09/25/2014 - 4:25am
As Edward Kmett explained to me, (/=) is currently needed in Eq to support IEEE floating point semantics for (==) and (/=). As I see it, those semantics are badly broken from the perspective of what Eq is supposed to mean, and really should be supported using special functions (eqIEEE and neqIEEE or whatever), whereas the most appropriate Eq instance for floating point would be something more like instance Eq Double where x == y = decodeFloat x == decodeFloat y If this is (eventually) done, that would allow us to remove (/=) from Eq, reducing its dictionary to a single member, (==), improving efficiency when the type is not statically known. David _______________________________________________ Libraries mailing list Libraries< at >haskell.org http://www.haskell.org/mailman/listinfo/libraries
Categories: Offsite Discussion

The GHC source code contains 1088 TODOs, please help bring that number down

Haskell on Reddit - Thu, 09/25/2014 - 1:09am

TeamGHC is doing an amazing job developing GHC, but I'm sure they won't mind some extra manpower.

Here's how you can help.
  1. Clone the GHC source code (~1')

    $ git clone git://github.com/ghc/ghc.git # This doesn't clone any submodules. See building link below for that.

  2. Find a TODO or FIXME that you think you can solve (~10', compiler/utils or libraries/base is a good place to start)

    $ git grep -I -P -i '\b(TODO|FIXME|XXX)\b'

  3. Work it (max. 1 day, ask #ghc on irc for help if you get stuck)

    $ git commit -a -m 'Fix FIXME'

  4. Sign up for Phabricator and install Arcanist (~15')

    https://ghc.haskell.org/trac/ghc/wiki/Phabricator

  5. Submit a code review to Phabricator (~1', example: https://phabricator.haskell.org/D213)

    $ arc diff

  6. Wait for Harbormaster to build and validate your commit (~45 minutes)

    https://phabricator.haskell.org/harbormaster/

  7. Wait for someone from TeamGHC to review and push your commit (1-2 weeks)

  8. Go to 2.

D̶o̶ ̶n̶o̶t̶ ̶(̶y̶e̶t̶)̶ If your change involves more than a few lines, you will also want to

Edit: I changed the regexp. Now it's 874 TODOs, not that it really matters.

Edit2: Changed advice about not building yourself, removed link to slow Trac query.

Edit 3: Note: GHC master currently doesn't build on OS X. Please try commit 5ed12810 from a few days ago, or remove the import of Control.Monad from the file libraries/base/GHC/Event/KQueue.hs.

Edit 4: Please use the github mirror for cloning. GHC servers can't handle the load! Good sign!

submitted by thomie
[link] [101 comments]
Categories: Incoming News

Replacement for Ptr () in FFI declaration?

haskell-cafe - Wed, 09/24/2014 - 10:56pm
Hi, Apparently, before GHC 7.8, it was possible to specify FFI declarations using Ptr (). However, it now gets an error message: This is from com-1.2.3.1 when I try to compile it: ------ message follows ----- [12 of 21] Compiling System.Win32.Com.Automation.TypeLib ( System\Win32\Com\Automation\TypeLib.hs, dist\build\System\Win 32\Com\Automation\TypeLib.o ) System\Win32\Com\Automation\TypeLib.hs:1379:1: Unacceptable argument type in foreign declaration: Ptr () When checking declaration: foreign import stdcall safe "dynamic" prim_System_Win32_Com_Automation_TypeLib_setGuid :: Ptr () -> Ptr () -> Ptr GUID -> IO Int32 ------ end of message ----- What is the proper declaration to use instead of Ptr () ? Thanks. Howard B. Golden
Categories: Offsite Discussion

Taking over the thrift package.

haskell-cafe - Wed, 09/24/2014 - 7:03pm
Hi there. As per the instructions on the Haskell wiki I'm posting here as I'm interested in either taking over the thrift package or helping out with getting more recent builds uploaded as it's wildly out of date: https://hackage.haskell.org/package/thrift Does anyone have any contact details for the current maintainer? Thanks, Sean.
Categories: Offsite Discussion

We should use Haskell for Y

Haskell on Reddit - Wed, 09/24/2014 - 3:54pm

"Pascal? Gross."

Is there a well-developed way to avoid this situation? I find myself having to correct people every time somebody asks me what I program, to the point where occasionally I say something like "Hache-askell".

submitted by kvanberendonck
[link] [14 comments]
Categories: Incoming News