Re: [GHC] #5295: TEST_HC needs to be quoted in plugins/Makefile
#5295: TEST_HC needs to be quoted in plugins/Makefile ---+ Reporter: daniel.is.fischer | Owner: Type: bug| Status: closed Priority: normal | Component: Test Suite Version: 7.1| Resolution: fixed Keywords: | Testcase: Blockedby: | Os: Unknown/Multiple Blocking: | Architecture: Unknown/Multiple Failure: None/Unknown | ---+ Changes (by batterseapower): * status: patch = closed * resolution: = fixed Comment: Done, thanks! -- Ticket URL: http://hackage.haskell.org/trac/ghc/ticket/5295#comment:2 GHC http://www.haskell.org/ghc/ The Glasgow Haskell Compiler ___ Glasgow-haskell-bugs mailing list Glasgow-haskell-bugs@haskell.org http://www.haskell.org/mailman/listinfo/glasgow-haskell-bugs
Re: [GHC] #3843: Merge plugins into HEAD
#3843: Merge plugins into HEAD -+-- Reporter: dreixel |Owner: simonpj Type: task | Status: new Priority: normal|Milestone: 7.2.1 Component: Compiler | Version: 6.13 Keywords:| Testcase: Blockedby:| Difficulty: Os: Unknown/Multiple | Blocking: Architecture: Unknown/Multiple | Failure: None/Unknown -+-- Comment(by batterseapower): Yep, that was in another one of my patches that I failed to push. I need to be more disciplined about validation - should probably have a tree I stage patches into, validate there and ONLY push from that tree. -- Ticket URL: http://hackage.haskell.org/trac/ghc/ticket/3843#comment:40 GHC http://www.haskell.org/ghc/ The Glasgow Haskell Compiler ___ Glasgow-haskell-bugs mailing list Glasgow-haskell-bugs@haskell.org http://www.haskell.org/mailman/listinfo/glasgow-haskell-bugs
[GHC] #5299: ghc.exe: panic! (the 'impossible' happened)
#5299: ghc.exe: panic! (the 'impossible' happened) -+-- Reporter: guest | Owner: Type: bug | Status: new Priority: normal| Component: Compiler Version: 7.0.3 |Keywords: Testcase:| Blockedby: Os: Unknown/Multiple |Blocking: Architecture: Unknown/Multiple | Failure: None/Unknown -+-- 1. open ghci 2. type in: [2,4..] 3. obviously this is an infinite list, so press ctrl+C to stop it 4. type in: take 20 [2,4..] 5. ghci panics Full output attached. -- Ticket URL: http://hackage.haskell.org/trac/ghc/ticket/5299 GHC http://www.haskell.org/ghc/ The Glasgow Haskell Compiler ___ Glasgow-haskell-bugs mailing list Glasgow-haskell-bugs@haskell.org http://www.haskell.org/mailman/listinfo/glasgow-haskell-bugs
Re: [GHC] #5292: libHSghc exports more symbols than Windows can handle
#5292: libHSghc exports more symbols than Windows can handle -+-- Reporter: batterseapower| Owner: Type: bug | Status: new Priority: normal| Component: Compiler Version: 7.0.3 |Keywords: Testcase:| Blockedby: Os: Windows |Blocking: Architecture: Unknown/Multiple | Failure: Runtime crash -+-- Comment(by batterseapower): A cursory inspection of the .o files doesn't reveal anything being exported that is obviously useless. It does give a clue as to where at least some of the bloat comes from though: Data instances for GHCs various data types account for 8661 exported symbols alone! As to your second suggestion, this may help. I note that currently all of GHCs modules are marked as exposed, so to implement it we would have to start hiding some modules. I quickly went through the list of exposed modules and created list of modules we could probably hide without hurting anyone (mostly the ones related to code generation): {{{ Llvm LlvmziAbsSyn LlvmziPpLlvm LlvmziTypes LlvmCodeGen LlvmCodeGenziBase LlvmCodeGenziCodeGen LlvmCodeGenziData LlvmCodeGenziPpr LlvmCodeGenziRegs LlvmMangler Cmm CmmBuildInfoTables CmmPipeline CmmCallConv CmmCommonBlockElim CmmContFlowOpt CmmCvt CmmDecl CmmExpr CmmInfo CmmLex CmmLint CmmLive CmmMachOp CmmNode CmmOpt CmmParse CmmProcPoint CmmSpillReload CmmRewriteAssignments CmmStackLayout CmmType CmmUtils CgBindery CgCallConv CgCase CgClosure CgCon CgExpr CgExtCode CgForeignCall CgHeapery CgHpc CgInfoTbls CgLetNoEscape CgMonad CgParallel CgPrimOp CgProf CgStackery CgTailCall CgTicky CgUtils StgCmm StgCmmBind StgCmmClosure StgCmmCon StgCmmEnv StgCmmExpr StgCmmForeign StgCmmGran StgCmmHeap StgCmmHpc StgCmmLayout StgCmmMonad StgCmmPrim StgCmmProf StgCmmTicky StgCmmUtils Coverage SimplEnv SimplMonad SimplUtils SpecConstr Specialise CoreToStg DmdAnal WorkWrap WwLib VectoriseziBuiltinsziBase VectoriseziBuiltinsziInitialise VectoriseziBuiltinsziModules VectoriseziBuiltins VectoriseziMonadziBase VectoriseziMonadziNaming VectoriseziMonadziLocal VectoriseziMonadziGlobal VectoriseziMonadziInstEnv VectoriseziMonad VectoriseziUtilsziBase VectoriseziUtilsziClosure VectoriseziUtilsziHoisting VectoriseziUtilsziPADict VectoriseziUtilsziPoly VectoriseziUtils VectoriseziTypeziEnv VectoriseziTypeziRepr VectoriseziTypeziPData VectoriseziTypeziPRepr VectoriseziTypeziPADict VectoriseziTypeziType VectoriseziTypeziTyConDecl VectoriseziTypeziClassify VectoriseziConvert VectoriseziVect VectoriseziVar VectoriseziEnv VectoriseziExp X86ziRegs X86ziRegInfo X86ziInstr X86ziCond X86ziPpr X86ziCodeGen PPCziRegs PPCziRegInfo PPCziInstr PPCziCond PPCziPpr PPCziCodeGen SPARCziBase SPARCziRegs SPARCziRegPlate SPARCziImm SPARCziAddrMode SPARCziCond SPARCziInstr SPARCziStack SPARCziShortcutJump SPARCziPpr SPARCziCodeGen SPARCziCodeGenziAmode SPARCziCodeGenziBase SPARCziCodeGenziCCall SPARCziCodeGenziCondCode SPARCziCodeGenziGen32 SPARCziCodeGenziGen64 SPARCziCodeGenziSanity SPARCziCodeGenziExpand RegAllocziLiveness RegAllocziGraphziMain RegAllocziGraphziStats RegAllocziGraphziArchBase RegAllocziGraphziArchX86 RegAllocziGraphziCoalesce RegAllocziGraphziSpill RegAllocziGraphziSpillClean RegAllocziGraphziSpillCost RegAllocziGraphziTrivColorable RegAllocziLinearziMain RegAllocziLinearziJoinToTargets RegAllocziLinearziState RegAllocziLinearziStats RegAllocziLinearziFreeRegs RegAllocziLinearziStackMap RegAllocziLinearziBase RegAllocziLinearziX86ziFreeRegs RegAllocziLinearziPPCziFreeRegs RegAllocziLinearziSPARCziFreeRegs ByteCodeAsm ByteCodeGen ByteCodeInstr ByteCodeItbls ByteCodeLink }}} Under the optimistic assumption that we don't export *any* symbols from these modules, by hiding these we would only need to export 60293 symbols from a -O build of libHSghc (as opposed to the current 75756), so we would be back within the limit. We would be a bit too close for comfort, however! Excluding modules from this list and modules exporting less than 400 symbols, the major offenders are: {{{ Coercion: 407 RnEnv: 412 TcEnv: 420 Constants: 422 Type: 436 GHC: 442 TypeRep: 467 TysPrim: 478 SrcLoc: 503 TcType: 509 RdrName: 511 TcMType: 526 IfaceSyn: 531 HsPat: 568
Re: [GHC] #4370: Bring back monad comprehensions
#4370: Bring back monad comprehensions --+- Reporter: simonpj | Owner: Type: feature request | Status: new Priority: normal | Milestone: 7.4.1 Component: Compiler |Version: 6.12.3 Resolution: | Keywords: Testcase: | Blockedby: Difficulty: | Os: Unknown/Multiple Blocking: | Architecture: Unknown/Multiple Failure: None/Unknown | --+- Changes (by giorgidze): * owner: nsch = * status: closed = new * resolution: fixed = Comment: Currently, the munzip function is not a member of the MonadZip class. It has the following type signature and definition: {{{ munzip :: MonadZip m = m (a,b) - (m a, m b) munzip mab = (liftM fst mab, liftM snd mab) }}} When developing monad comprehension examples for various MonadZip instances, I found that it is useful to allow a MonadZip instance to provide more efficient unzipping function. I suggest we make the munzip function a member of the MonadZip class by using the current definition as a default implementation. The laws that the munzip member should satisfy is already documented in the module. The small patch that is attached to this trac ticket implements the proposed change. Cheers, George -- Ticket URL: http://hackage.haskell.org/trac/ghc/ticket/4370#comment:61 GHC http://www.haskell.org/ghc/ The Glasgow Haskell Compiler ___ Glasgow-haskell-bugs mailing list Glasgow-haskell-bugs@haskell.org http://www.haskell.org/mailman/listinfo/glasgow-haskell-bugs
Re: [GHC] #4245: ghci panic: thread blocked indefinitely in an MVar operation
#4245: ghci panic: thread blocked indefinitely in an MVar operation ---+ Reporter: pturnbull |Owner: Type: bug | Status: new Priority: normal |Milestone: 7.2.1 Component: GHCi| Version: 6.12.3 Keywords: MVar| Testcase: Blockedby: | Difficulty: Os: MacOS X | Blocking: Architecture: x86_64 (amd64) | Failure: GHCi crash ---+ Changes (by modchan): * cc: malicious.wizard@… (added) -- Ticket URL: http://hackage.haskell.org/trac/ghc/ticket/4245#comment:14 GHC http://www.haskell.org/ghc/ The Glasgow Haskell Compiler ___ Glasgow-haskell-bugs mailing list Glasgow-haskell-bugs@haskell.org http://www.haskell.org/mailman/listinfo/glasgow-haskell-bugs
[GHC] #5301: Trac failure: KeyError: 'fields'
#5301: Trac failure: KeyError: 'fields' -+-- Reporter: modchan | Owner: Type: bug | Status: new Priority: normal| Component: None Version: 7.0.3 |Keywords: Testcase:| Blockedby: Os: Unknown/Multiple |Blocking: Architecture: Unknown/Multiple | Failure: None/Unknown -+-- How to Reproduce While doing a GET operation on `/ticket/4000`, Trac issued an internal error. Request parameters: {{{ {'action': u'diff', 'id': u'4000', 'version': u'3'} }}} User Agent was: `Mozilla/5.0 (Windows NT 6.1; WOW64; rv:5.0) Gecko/20100101 Firefox/5.0` System Information || '''Trac''' || `0.11.6` || || '''Python''' || `2.5.2 (r252:60911, Jan 24 2010, 18:02:01) ` [[br]] `[GCC 4.3.2]` || || '''setuptools''' || `0.6c8` || || '''SQLite''' || `3.5.9` || || '''pysqlite''' || `2.3.2` || || '''Genshi''' || `0.5.1` || || '''mod_python''' || `3.3.1` || || '''Pygments''' || `0.10` || || '''GIT''' || `1.5.6.5` || || '''FullBlog''' || `0.1.1` || || '''RPC''' || `1.0.6` || || '''CustomFieldAdmin''' || `0.2.2` || || '''jQuery:''' || `1.2.6` || Python Traceback {{{ Traceback (most recent call last): File /usr/lib/python2.5/site-packages/trac/web/main.py, line 450, in _dispatch_request dispatcher.dispatch(req) File /usr/lib/python2.5/site-packages/trac/web/main.py, line 217, in dispatch self._post_process_request(req, *resp) File /usr/lib/python2.5/site-packages/trac/web/main.py, line 309, in _post_process_request resp = f.post_process_request(req, *resp) File build/bdist.linux-x86_64/egg/mastertickets/web_ui.py, line 64, in post_process_request for field, field_data in change['fields'].iteritems(): KeyError: 'fields' }}} -- Ticket URL: http://hackage.haskell.org/trac/ghc/ticket/5301 GHC http://www.haskell.org/ghc/ The Glasgow Haskell Compiler ___ Glasgow-haskell-bugs mailing list Glasgow-haskell-bugs@haskell.org http://www.haskell.org/mailman/listinfo/glasgow-haskell-bugs
Re: [GHC] #3843: Merge plugins into HEAD
#3843: Merge plugins into HEAD -+-- Reporter: dreixel |Owner: simonpj Type: task | Status: new Priority: normal|Milestone: 7.2.1 Component: Compiler | Version: 6.13 Keywords:| Testcase: Blockedby:| Difficulty: Os: Unknown/Multiple | Blocking: Architecture: Unknown/Multiple | Failure: None/Unknown -+-- Comment(by thoughtpolice): Okay, current state of play - there are 2 commits for the documentation in this branch here: https://github.com/thoughtpolice/ghc/tree/3843-plugin-docs I talked to Max on IRC and he said he'd merge it into HEAD and the 7.2 branch. Currently plugins06 will still fail because of the linking issue (#5292). He is waiting for Simon M to give the go on this patch: http://www.haskell.org/pipermail/cvs-ghc/2011-July/063587.html so that plugins06 can also be fixed on windows. After this I think we should hopefully have everything in and ready to go. -- Ticket URL: http://hackage.haskell.org/trac/ghc/ticket/3843#comment:41 GHC http://www.haskell.org/ghc/ The Glasgow Haskell Compiler ___ Glasgow-haskell-bugs mailing list Glasgow-haskell-bugs@haskell.org http://www.haskell.org/mailman/listinfo/glasgow-haskell-bugs
[GHC] #5302: Unused arguments in join points
#5302: Unused arguments in join points -+-- Reporter: reinerp | Owner: Type: bug | Status: new Priority: normal| Component: Compiler Version: 7.0.3 |Keywords: Testcase:| Blockedby: Os: Unknown/Multiple |Blocking: Architecture: Unknown/Multiple | Failure: Runtime performance bug -+-- Sometimes GHC produces join points with unused parameters. In the example attached, we get join points like the following (when compiled with -O2): {{{ ... $j1_XHI :: GHC.Prim.Int# - GHC.Types.Int - (# Unboxed.FingerTree Unboxed.Size (Unboxed.Node Unboxed.Size b_ahY), Unboxed.Node Unboxed.Size b_ahY, Unboxed.FingerTree Unboxed.Size (Unboxed.Node Unboxed.Size b_ahY) #) [LclId, Arity=2, Str=DmdType LL] $j1_XHI = \ (x2_XE8 :: GHC.Prim.Int#) _ - ... }}} which is always called as follows: {{{ ... $j1_XHI x2_XE2 (GHC.Types.I# x2_XE2) ... }}} i.e. where the second argument is a boxed version of the first. GHC should remove the dead parameter from the join point, to avoid unnecessary boxing. I get this Core with 7.0.3 and with 7.1.20110629. I've attached a self-contained example, as small as I can make it. (Making it smaller lets GHC do more unfolding and the problem disappears.) These join points occur inside the 'Deep' case of '$wsplitTree'. -- Ticket URL: http://hackage.haskell.org/trac/ghc/ticket/5302 GHC http://www.haskell.org/ghc/ The Glasgow Haskell Compiler ___ Glasgow-haskell-bugs mailing list Glasgow-haskell-bugs@haskell.org http://www.haskell.org/mailman/listinfo/glasgow-haskell-bugs
non-linear complexity of :reload combined with :module in ghci
Hi all, I realized that ghci shows non-linear time complexity for a sequence of :module and :reload commands, say we do multiple times: :module *Foo :reload Steps to reproduce: time for i in {1..10}; do echo -e ':m Prelude\n:r'; done |ghci time for i in {1..99}; do echo -e ':m Prelude\n:r'; done |ghci On my system the first run uses 1 second of CPU time, the second 39 seconds. Is this considered a bug? Cheers, Simon ___ Glasgow-haskell-users mailing list Glasgow-haskell-users@haskell.org http://www.haskell.org/mailman/listinfo/glasgow-haskell-users
Reloading and templates
Hi, In ghci, if you change a module that exports a TH template it will not recompile modules that use the template. Example: -- In A.hs {-#LANGUAGE TemplateHaskell#-} module A where import Language.Haskell.TH a = [d|x = 5|] -- in B.hs {-#LANGUAGE TemplateHaskell#-} import A a -- As expected in ghci B.hs: *Main x 5 -- But if i change the def. of a to [d|x = 4|] and do :r [1 of 2] Compiling A( A.hs, interpreted ) Ok, modules loaded: A, Main. *Main x 5 The only workaround i know is to reload all modules. I assume you have the same problem when compiling with ghc. This has caused headaches for me on several occasions lately, is there a ticket for it or should i submit one? Regards, Jonas ___ Glasgow-haskell-users mailing list Glasgow-haskell-users@haskell.org http://www.haskell.org/mailman/listinfo/glasgow-haskell-users
[Haskell] Haskell Implementors Workshop 2011, Second CFT
Call for Talks ACM SIGPLAN Haskell Implementors' Workshop http://haskell.org/haskellwiki/HaskellImplementorsWorkshop/2011 Tokyo, Japan, September 23rd, 2011 The workshop will be held in conjunction with ICFP 2011 http://www.icfpconference.org/icfp2011/ Important dates Proposal Deadline: 22nd July 2011 Notification:8th August2011 Workshop: 23rd September 2011 The Haskell Implementors' Workshop is to be held alongside ICFP 2011 this year in Tokyo, Japan. There will be no proceedings; it is an informal gathering of people involved in the design and development of Haskell implementations, tools, libraries, and supporting infrastructure. This relatively new workshop reflects the growth of the user community: there is a clear need for a well-supported tool chain for the development, distribution, deployment, and configuration of Haskell software. The aim is for this workshop to give the people involved with building the infrastructure behind this ecosystem an opportunity to bat around ideas, share experiences, and ask for feedback from fellow experts. We intend the workshop to have an informal and interactive feel, with a flexible timetable and plenty of room for ad-hoc discussion, demos, and impromptu short talks. Scope and target audience - It is important to distinguish the Haskell Implementors' Workshop from the Haskell Symposium which is also co-located with ICFP 2011. The Haskell Symposium is for the publication of Haskell-related research. In contrast, the Haskell Implementors' Workshop will have no proceedings -- although we will aim to make talk videos, slides and presented data available with the consent of the speakers. In the Haskell Implementors' Workshop we hope to study the underlying technology. We want to bring together anyone interested in the nitty gritty details necessary to turn a text file into a deployed product. Having said that, members of the wider Haskell community are more than welcome to attend the workshop -- we need your feedback to keep the Haskell ecosystem thriving. The scope covers any of the following topics. There may be some topics that people feel we've missed, so by all means submit a proposal even if it doesn't fit exactly into one of these buckets: * Compilation techniques * Language features and extensions * Type system implementation * Concurrency and parallelism: language design and implementation * Performance, optimisation and benchmarking * Virtual machines and run-time systems * Libraries and Tools for development or deployment Talks - At this stage we would like to invite proposals from potential speakers for a relatively short talk. We are aiming for 20 min talks with 10 mins for questions and changeovers. We want to hear from people writing compilers, tools, or libraries, people with cool ideas for directions in which we should take the platform, proposals for new features to be implemented, and half-baked crazy ideas. Please submit a talk title and abstract of no more than 200 words to b...@cse.unsw.edu.au We will also have a lightning talks session which will be organised on the day. These talks will be 2-10 minutes, depending on available time. Suggested topics for lightning talks are to present a single idea, a work-in-progress project, a problem to intrigue and perplex Haskell implementors, or simply to ask for feedback and collaborators. Organisers -- * Rebekah Leslie (Portland State University) * Ben Lippmeier - co-chair (University of New South Wales) * Andres Loeh (Well-Typed LLP) * Oleg Lobachev(University of Marburg) * Neil Mitchell - co-chair (Standard Chartered) * Dimitrios Vytiniotis (Microsoft Research) ___ Haskell mailing list Haskell@haskell.org http://www.haskell.org/mailman/listinfo/haskell
Re: TypeFamilies vs. FunctionalDependencies type-level recursion
Sorry for the late reply. GHC does not accept the following program: {-# LANGUAGE TypeFamilies #-} x :: () x = const () (eq a b) where a :: S(S(S(S(S(S(S(S(S(S(S(S(S(S(S(S(S(S(S(S(S(Z) a = undefined b :: S(S(S(S(S(S(S(S(S(S(S(S(S(S(S(S(S(S(S(S(S(Z) b = undefined eq :: a - b - NatEq a b eq _ _ = undefined Notice that there are no undecidable instances required to compile this function (or the portions of your TTypeable that this function depends on). Yet GHC is still limiting my context stack (to 21 by default). Obviously any kind of unicode encoding of type names is going to run into the same sort of problem. I would call this a bug, a recent one. Old versions of GHC (before 6.10, I think) imposed no context stack restrictions on programs with decidable instances. Such a restriction is a recent addition (perhaps introduced as a safe-guard since it was discovered that the old versions of GHC did not properly implement the coverage condition). I would recommend to file this as a bug, including the sample code above. Your old message argues well why this new behavior should be considered as a bug. But now the comparison of types is depending on this context stack and likely worsening the problem. I agree that dependence on the arbitrary limit is unsatisfactory. That is why I was hoping that Nat kinds will eventually make their way into GHC (there are many arguments for their inclusion, and some people are reportedly have been working on them). Finally, I still think most of the magic in everything we've been talking about boils down to being able to have a type variable that can take on any type *except* a certain handful. This would allow us to avoid overlapping instances of both classes and type families, would allow us to define TypeEq, etc. Moreover, it would be a more direct expression of what programmers intend, and so make code easier to read. Such a constraint cannot be part of the context, because Alas, such `type variables' with inequality constraints are quite complex, and the consequences of their introduction are murky. Let me illustrate. First of all, the constraint /~ (to be used as t1 /~ Int) doesn't help to define TypeEq, etc. because constraints are not used when selecting an instance. Instances are selected only by matching a type to the instance head. Instance selection based on constraints is quite a change in the type checker, and is unlikely to be implemented. Let us see how the selection based on mismatch could be implemented. To recall, the constraint t1 ~ t2 means that there exists a substitution on free type variables such that its application to t1 and t2 makes the types identical. In symbols, \exists\sigma. t1\sigma = t2\sigma We call the type t matches the instance whose head is th if \exists\sigma. th\sigma = t Now, we wish to define selection of an instance based on dis-equality. We may say, for example, that the instance with the head th is selected for type t if \not\exists\sigma. th\sigma = t In other words, we try to match t against th. On mismatch, we select the instance. Let us attempt to define TypeEq class TypeEq a b c | a b - c instance TypeEq x x True instance TypeEq x (NOT x) False and resolve (TypeEq Int Bool x). We start with Bool: Bool matches x, so the second instance cannot be selected. The first instance can't be selected either. Thus, we fail. One may say: we should have started by matching Int first, which would instantiate x. Matching Bool against so instantiated x will fail, and the second instance will be selected. The dependence on the order of matching leaves a bad taste. It is not clear that there is always some order; it is not clear how difficult it is to find one. I submit that introducing disequality selection is quite a subtle matter. The TTypeable approach was designed to avoid large changes in the type checker. If you attend the Haskell implementors workshop, you might wish to consider giving a talk about overlapping instances and the ways to get around them or implement properly. About dynamic loading [perhaps this should be moved in a separate thread?] I wish I knew ML better, but from looking at that paper, I can't figure out the key piece of information, which is how to detect overlapping type instance declarations. (Does ML even have something equivalent?) ML does not have type-classes; they can easily be emulated via dictionary passing. Also, local open (recently introduced in OCaml) suffices quite frequently, as it turns out. I admit though I don't fully understand the problem: In the absence of type families, I'm okay using something like haskell-plugins that returns Dynamic. ... With type families, I'm at a loss to figure out how this could even work. You would need to know have a runtime representation of every type family
Re: [Haskell-cafe] Data.Time
I wrote: Not exactly. A TimeZone in Data.Time doesn't really represent a time zone - it represents a specific clock setting in a time zone. Ashley Yakeley wrote: I still regret this! I should have called it TimeOffset or somesuch. Oh, it's not your fault. Every other time library in the world calls that a time zone. You've gotten so many other more substantial things right that so many others got wrong. This name is nothing to worry about. To get a TimeZoneSeries, representing a time zone with all of its known clock changes throughout history and some years into the future, use the timezone-olson package[2] to read an Olson time zone file. On Linux and Mac OS X systems, Olson time zone files are available in the directory /usr/share/zoneinfo. Leap second data is there too, so it should be possible to create a Data.Time.Clock.TAI.LeapSecondTable from it. No, unfortunately. There is a place in the data structure for leap second information, but no live Olson file has every populated it AFAIK. That's not so important though. There have been very few leap seconds in history, and they occur rarely. Their release cycle has been slower than the usual release cycle of software packages. So this is something that could easily be done manually. Also, it might be worth creating an OS-specific package that dealt with the filepaths for you, so for instance you could read in a TimeZoneSeries given a time zone name such as America/Los_Angeles. That would be nice. Perhaps a higher priority would be to add support for Windows, where the Olson data is in the registry rather than in the file system. Right now, people on Windows are still dependent on asking a favor from their friends to lend them copies of the latest Olson files. Another important enhancement would be support for POSIX rules. Olson files still supply explicit clock changes for about two decades into the future. But I believe that will gradually end now that the new Olson file format supports POSIX rules for clock changes beyond the last one explicitly specified. (And besides being supported, recently released Olson files actually do contain the POSIX rules. So does the Windows registry.) Thanks, Yitz ___ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org/mailman/listinfo/haskell-cafe
Re: [Haskell-cafe] Data.Time
On Mon, 2011-07-04 at 10:38 +0300, Yitzchak Gale wrote: Leap second data is there too, so it should be possible to create a Data.Time.Clock.TAI.LeapSecondTable from it. No, unfortunately. There is a place in the data structure for leap second information, but no live Olson file has every populated it AFAIK. Have a look at the right/UTC timezone, I think leap-second data is represented there. But zdump right/UTC does not give you the TAI time. Quite the opposite, it gives you the UTC time if your clock is set to TAI. -- Ashley Yakeley ___ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org/mailman/listinfo/haskell-cafe
[Haskell-cafe] IterIO: How to write use my inumReverse
Hi Haskell Cafe, I've defined the following reverse echo server that echos text back in reverse: module Programs.TcpEchoIterServer where import Control.Concurrent import Control.Exception import Control.Monad import Control.Monad.Trans import Data.IterIO import Data.IterIO.Inum import Network import System.IO import System.IO.Error (isEOFError) import qualified Data.ByteString.Lazy as L import qualified Data.ByteString.Lazy.Char8 as C iterHandle' :: (MonadIO m) = Handle - IO (Iter L.ByteString m (), Onum L.ByteString m a) iterHandle' = iterHandle main = withSocketsDo $ do sListen - listenOn (PortNumber 8000) putStrLn Listening on Port 8000 forkIO $ forever $ do (sSession, hostname, port) - accept sListen hSetBuffering sSession NoBuffering putStrLn (Connected to ++ hostname ++ : ++ show port) forkIO $ do (iter, enum) - iterHandle' sSession enum |$ inumLines .| inumReverse .| inumUnlines .| iter putStrLn Press CTRL-D to quit. exitOnCtrlD iterLines :: (Monad m) = Iter L.ByteString m [L.ByteString] iterLines = do line - lineI return [line] iterUnlines :: (Monad m) = Iter [L.ByteString] m L.ByteString iterUnlines = (L.concat . (++ [C.pack \n])) `liftM` dataI iterReverse :: (Monad m) = Iter [L.ByteString] m [L.ByteString] iterReverse = do lines - dataI return (map L.reverse lines) inumLines = mkInum iterLines inumUnlines = mkInum iterUnlines inumReverse = mkInum iterReverse exitOnCtrlD = try getLine = either (\e - unless (isEOFError e) $ ioError e) (const exitOnCtrlD) It all works fine. My question is: Is it possible to rewrite inumReverse to be this: iterReverse :: (Monad m) = Iter L.ByteString m L.ByteString iterReverse = do line - dataI return (L.reverse line) inumReverse = mkInum iterReverse And still be able to use it in the line: enum |$ inumLines .| {-- inumReverse goes in here somehow --} .| inumUnlines .| iter The reason I ask is that the Haskell function reverse has the type [a] - [a], not [[a]] - [[a]]. I thought perhaps the alternative inumReverse is cleaner than the original as it behaves more similarly to Haskell's own reverse function. Cheers, -John ___ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org/mailman/listinfo/haskell-cafe
[Haskell-cafe] Haskell Platform on Ubuntu: Installation Problems
Hi, I am trying to install Haskell Platform on latest Ubuntu desktop: ( uname -a: Linux frigate 2.6.38-8-generic #42-Ubuntu SMP Mon Apr 11 03:31:24 UTC 2011 x86_64 x86_64 x86_64 GNU/Linux ) I started with installing GHC. Ubuntu could only install version 6.12.3: without Cabal! Now I am trying to install haskell-platform which is a separate package. Ubuntu suggests to insatll version 2010.1.0.0.1 and fails (see bellow). What sould I do now to get GHC + Cabal? Should I: 1) De-insatll GHC 6.12.3 and all related libraries and try then installing Haskell Platform again? 2) Should I install Caball separately and forget about Haskell Platform? 3) Provide somehow for two different installations? Thanks! === Installation errors: This error could be caused by required additional software packages which are missing or not installable. Furthermore there could be a conflict between software packages which are not allowed to be installed at the same time. haskell-platform: Depends: ghc6 ( 6.12.1+) but 6.12.3-1ubuntu7 is to be installed Depends: libghc6-cgi-dev (= 3001.1.7.2) but 3001.1.7.2-1build1 is to be installed Depends: libghc6-fgl-dev ( 5.4.2.2+) but 5.4.2.2-2build2 is to be installed Depends: libghc6-glut-dev ( 2.1.2.1+) but 2.1.2.1-1build1 is to be installed Depends: libghc6-haskell-src-dev ( 1.0.1.3+) but 1.0.1.3-2build1 is to be installed Depends: libghc6-html-dev ( 1.0.1.2+) but 1.0.1.2-3build2 is to be installed Depends: libghc6-hunit-dev ( 1.2.2.1+) but 1.2.2.1-2build2 is to be installed Depends: libghc6-mtl-dev ( 1.1.0.2+) but 1.1.0.2-10build2 is to be installed Depends: libghc6-network-dev ( 2.2.1.7+) but 2.2.1.7-1build2 is to be installed Depends: libghc6-opengl-dev ( 2.2.3.0+) but 2.2.3.0-2build2 is to be installed Depends: libghc6-parallel-dev ( 2.2.0.1+) but 2.2.0.1-1build1 is to be installed Depends: libghc6-parsec2-dev ( 2.1.0.1+) but 2.1.0.1-2build2 is to be installed Depends: libghc6-quickcheck2-dev ( 2.1.0.3+) but 2.1.0.3-1build2 is to be installed Depends: libghc6-regex-base-dev ( 0.93.1+) but 0.93.1-8build1 is to be installed Depends: libghc6-regex-compat-dev ( 0.92+) but 0.92-6build2 is to be installed Depends: libghc6-regex-posix-dev ( 0.94.1+) but 0.94.1-2build1 is to be installed Depends: libghc6-stm-dev ( 2.1.1.2+) but 2.1.1.2-5build2 is to be installed Depends: libghc6-xhtml-dev (= 3000.2.0.1) but 3000.2.0.1-6build2 is to be installed Depends: libghc6-zlib-dev ( 0.5.2.0+) but 0.5.2.0-4build2 is to be installed Depends: libghc6-http-dev (= 4009) but 4009-2build1 is to be installed Depends: libghc6-deepseq-dev ( 1.1.0.0+) but 1.1.0.0-2build1 is to be installed Depends: alex ( 2.3.3+) but 2.3.3-1 is to be installed Depends: happy ( 1.18.4-2+) but 1.18.4-2 is to be installed Depends: haddock but it is a virtual package ___ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org/mailman/listinfo/haskell-cafe
Re: [Haskell-cafe] Haskell Platform on Ubuntu: Installation Problems
Hello, I encountered the same kind of problems with the dependencies, GHC 6.12 etc. I dropped the idea of installing Haskell Platform with synaptic. I installed it manually and I don't have any problem since then. I installed first a precompiled binary version GHC 7 then the Haskell Platform 2011. It takes more time (about 2 hours on my case), but you are sure to have the lastest version of GHC and Haskell Platform. I had to assign some symlinks manually, but it took me 5 min. Adrien On Mon, 4 Jul 2011 17:04:41 +0400, Dmitri O.Kondratiev wrote: Hi, I am trying to install Haskell Platform on latest Ubuntu desktop: ( uname -a: Linux frigate 2.6.38-8-generic #42-Ubuntu SMP Mon Apr 11 03:31:24 UTC 2011 x86_64 x86_64 x86_64 GNU/Linux ) I started with installing GHC. Ubuntu could only install version 6.12.3: without Cabal! Now I am trying to install haskell-platform which is a separate package. Ubuntu suggests to insatll version 2010.1.0.0.1 and fails (see bellow). What sould I do now to get GHC + Cabal? Should I: 1) De-insatll GHC 6.12.3 and all related libraries and try then installing Haskell Platform again? 2) Should I install Caball separately and forget about Haskell Platform? 3) Provide somehow for two different installations? Thanks! ___ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org/mailman/listinfo/haskell-cafe
Re: [Haskell-cafe] How to ensure code executes in the context of a specific OS thread?
On Mon, Jul 4, 2011 at 2:38 AM, Jason Dagit dag...@gmail.com wrote: (I believe the way the FFI works I'll have to make a new wrapper for each thing because I can't directly call objective-c). Probably, yes. I suppose I should try adding wrappers around all the GLFW functions so that it sends the request over to the main thread and see if it solves my problem. The downside is that it would be a lot of wrapper code and it would be nice to have solution that other libraries can use. Do you mean, on each function of GLFW's API? Usually it's better to call postGUISync/postGUIAsync alikes with the largest number of function calls possible because (a) of the overhead (especially postGUISync's) and (b) it's safer to assume that postGUIAsyncs can be reordered. That is, if you need to call 'do {foo; bar}', instead of using 'do {fooS; barS}' where these are wrapped functions, call 'postGUISync $ do {foo; bar}'. This solution is general in the sense that you only have to code it once for everything Cocoa-related. Cheers! =) -- Felipe. ___ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org/mailman/listinfo/haskell-cafe
Re: [Haskell-cafe] IterIO: How to write use my inumReverse
At Mon, 4 Jul 2011 20:36:33 +1000, John Ky wrote: Hi Haskell Cafe, enum |$ inumLines .| inumReverse .| inumUnlines .| iter ... iterLines :: (Monad m) = Iter L.ByteString m [L.ByteString] iterLines = do line - lineI return [line] iterUnlines :: (Monad m) = Iter [L.ByteString] m L.ByteString iterUnlines = (L.concat . (++ [C.pack \n])) `liftM` dataI iterReverse :: (Monad m) = Iter [L.ByteString] m [L.ByteString] iterReverse = do lines - dataI return (map L.reverse lines) inumLines = mkInum iterLines inumUnlines = mkInum iterUnlines inumReverse = mkInum iterReverse It all works fine. My question is: Is it possible to rewrite inumReverse to be this: iterReverse :: (Monad m) = Iter L.ByteString m L.ByteString iterReverse = do line - dataI return (L.reverse line) inumReverse = mkInum iterReverse And still be able to use it in the line: enum |$ inumLines .| {-- inumReverse goes in here somehow --} .| inumUnlines .| iter The reason I ask is that the Haskell function reverse has the type [a] - [a], not [[a]] - [[a]]. I thought perhaps the alternative inumReverse is cleaner than the original as it behaves more similarly to Haskell's own reverse function. I'm not sure what you are trying to achieve. If you want an iter that works on L.ByteStrings, then you can say: iterReverse :: (Monad m) = Iter L.ByteString m L.ByteString iterReverse = do line - lineI return (L.reverse line) In that case you don't need inumLines and inumUnlines. If, however, you want the type to be [L.ByteString], and you would rather do this one line at a time, instead of calling map, then you could do something like the following: iterReverse :: (Monad m) = Iter [L.ByteString] m [L.ByteString] iterReverse = do line - headI return [L.reverse line] But the code you have above should also work, so it all depends on what you are trying to achieve. David ___ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org/mailman/listinfo/haskell-cafe
Re: [Haskell-cafe] How to ensure code executes in the context of a specific OS thread?
Sounds like something that could use a GHC Trac feature request. Edward ___ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org/mailman/listinfo/haskell-cafe
Re: [Haskell-cafe] How to ensure code executes in the context of a specific OS thread?
On Sun, Jul 3, 2011 at 10:02 PM, Jason Dagit dag...@gmail.com wrote: Hello, I'm trying to get some GUI code working on OSX and numerous forums around the internet keep reiterating that on OSX to correctly handle GUI events you need to use the original thread allocated to your process to check for events and to call the Cocoa framework functionality. Specifically, using a secondary thread (even a bound thread) is not sufficient with the Cocoa framework. I looked at the threading documentation in Control.Concurrent for GHC and it's not clear to me if this is even possible with GHC without restricting to the non-threaded RTS. This means that using the GUI library from GHCI is not an option and using multiple OS threads in the final application is also not possible. This means that some FFI libraries will be unusable. My main question is, is there a way around this so that I could, for example, use the library from GHCI? My second question is, if there is no current workaround then how can we remedy this situation? It seems like there could be an api function like: runOnOriginalThread :: IO a - IO a I've got some code in https://github.com/dpp/LispHaskellIPad that uses an FFI call into ObjC code that invokes a function on the UI thread. In Haskell: runOnMain :: IO () - IO () runOnMain todo = do func - funky dispatchFunc func where funky = mkStrCB $ \v - do todo And in ObjC: void dispatchFunc(void (*fp)(void*)) { // dispatch_async_f(dispatch_get_main_queue(), NULL, fp); id runner = [[PerformOMatic alloc] init]; [runner setFunc:fp]; [runner run]; } And: #import PerformOMatic.h @implementation PerformOMatic - (void)run { [self performSelectorOnMainThread:@selector(reallyDoIt:) withObject:self waitUntilDone:TRUE]; } - (void)reallyDoIt:(id)ignore { whatToDo(NULL); releaseMe(whatToDo); [self dealloc]; } - (void)setFunc:(void *)func { whatToDo = func; } @end Pardon the extremely ugly code, I'm a Haskell newbie and my ObjC skills are 20 years old. This function would be similar to runInBoundThread except it would be guaranteed to run on the original thread allocated to the ghc/ghci process. I believe the above primitive would be sufficient. I'll worry about filing a bug or making a libraries proposal after I have a better understanding of what must be done. Thanks, Jason ___ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org/mailman/listinfo/haskell-cafe -- Lift, the simply functional web framework http://liftweb.net Simply Lift http://simply.liftweb.net Follow me: http://twitter.com/dpp Blog: http://goodstuff.im ___ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org/mailman/listinfo/haskell-cafe
Re: [Haskell-cafe] Haskell Platform on Ubuntu: Installation Problems
Adrien Haxaire adrien at adrienhaxaire.org wrote: I dropped the idea of installing Haskell Platform with synaptic. I installed it manually and I don't have any problem since then. To install GHC 7, have you completely de-installed GHC 6.12.3 and all related libraries ? On Mon, Jul 4, 2011 at 5:04 PM, Dmitri O.Kondratiev doko...@gmail.comwrote: Hi, I am trying to install Haskell Platform on latest Ubuntu desktop: ( uname -a: Linux frigate 2.6.38-8-generic #42-Ubuntu SMP Mon Apr 11 03:31:24 UTC 2011 x86_64 x86_64 x86_64 GNU/Linux ) I started with installing GHC. Ubuntu could only install version 6.12.3: without Cabal! Now I am trying to install haskell-platform which is a separate package. Ubuntu suggests to insatll version 2010.1.0.0.1 and fails (see bellow). What sould I do now to get GHC + Cabal? Should I: 1) De-insatll GHC 6.12.3 and all related libraries and try then installing Haskell Platform again? 2) Should I install Caball separately and forget about Haskell Platform? 3) Provide somehow for two different installations? Thanks! === Installation errors: This error could be caused by required additional software packages which are missing or not installable. Furthermore there could be a conflict between software packages which are not allowed to be installed at the same time. haskell-platform: Depends: ghc6 ( 6.12.1+) but 6.12.3-1ubuntu7 is to be installed Depends: libghc6-cgi-dev (= 3001.1.7.2) but 3001.1.7.2-1build1 is to be installed Depends: libghc6-fgl-dev ( 5.4.2.2+) but 5.4.2.2-2build2 is to be installed Depends: libghc6-glut-dev ( 2.1.2.1+) but 2.1.2.1-1build1 is to be installed Depends: libghc6-haskell-src-dev ( 1.0.1.3+) but 1.0.1.3-2build1 is to be installed Depends: libghc6-html-dev ( 1.0.1.2+) but 1.0.1.2-3build2 is to be installed Depends: libghc6-hunit-dev ( 1.2.2.1+) but 1.2.2.1-2build2 is to be installed Depends: libghc6-mtl-dev ( 1.1.0.2+) but 1.1.0.2-10build2 is to be installed Depends: libghc6-network-dev ( 2.2.1.7+) but 2.2.1.7-1build2 is to be installed Depends: libghc6-opengl-dev ( 2.2.3.0+) but 2.2.3.0-2build2 is to be installed Depends: libghc6-parallel-dev ( 2.2.0.1+) but 2.2.0.1-1build1 is to be installed Depends: libghc6-parsec2-dev ( 2.1.0.1+) but 2.1.0.1-2build2 is to be installed Depends: libghc6-quickcheck2-dev ( 2.1.0.3+) but 2.1.0.3-1build2 is to be installed Depends: libghc6-regex-base-dev ( 0.93.1+) but 0.93.1-8build1 is to be installed Depends: libghc6-regex-compat-dev ( 0.92+) but 0.92-6build2 is to be installed Depends: libghc6-regex-posix-dev ( 0.94.1+) but 0.94.1-2build1 is to be installed Depends: libghc6-stm-dev ( 2.1.1.2+) but 2.1.1.2-5build2 is to be installed Depends: libghc6-xhtml-dev (= 3000.2.0.1) but 3000.2.0.1-6build2 is to be installed Depends: libghc6-zlib-dev ( 0.5.2.0+) but 0.5.2.0-4build2 is to be installed Depends: libghc6-http-dev (= 4009) but 4009-2build1 is to be installed Depends: libghc6-deepseq-dev ( 1.1.0.0+) but 1.1.0.0-2build1 is to be installed Depends: alex ( 2.3.3+) but 2.3.3-1 is to be installed Depends: happy ( 1.18.4-2+) but 1.18.4-2 is to be installed Depends: haddock but it is a virtual package ___ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org/mailman/listinfo/haskell-cafe
Re: [Haskell-cafe] Haskell Platform on Ubuntu: Installation Problems
No, you shouldn't need to do that. Just download the Haskell Platform and GHC 7: http://lambda.galois.com/hp-tmp/2011.2.0.1/haskell-platform-2011.2.0.1.tar.gz http://haskell.org/ghc/dist/7.0.3/ghc-7.0.3-i386-unknown-linux.tar.bz2 Extract ghc, change into the directory, run configure, then make install as root. After that, extract the haskell platform, change into the directory, configure, make, make install as root. Then run cabal update. The haskell platform is broken on Natty. https://bugs.launchpad.net/ubuntu/+source/haskell-platform/+bug/742052 On Mon, Jul 4, 2011 at 9:12 AM, Dmitri O.Kondratiev doko...@gmail.comwrote: Adrien Haxaire adrien at adrienhaxaire.org wrote: I dropped the idea of installing Haskell Platform with synaptic. I installed it manually and I don't have any problem since then. To install GHC 7, have you completely de-installed GHC 6.12.3 and all related libraries ? On Mon, Jul 4, 2011 at 5:04 PM, Dmitri O.Kondratiev doko...@gmail.comwrote: Hi, I am trying to install Haskell Platform on latest Ubuntu desktop: ( uname -a: Linux frigate 2.6.38-8-generic #42-Ubuntu SMP Mon Apr 11 03:31:24 UTC 2011 x86_64 x86_64 x86_64 GNU/Linux ) I started with installing GHC. Ubuntu could only install version 6.12.3: without Cabal! Now I am trying to install haskell-platform which is a separate package. Ubuntu suggests to insatll version 2010.1.0.0.1 and fails (see bellow). What sould I do now to get GHC + Cabal? Should I: 1) De-insatll GHC 6.12.3 and all related libraries and try then installing Haskell Platform again? 2) Should I install Caball separately and forget about Haskell Platform? 3) Provide somehow for two different installations? Thanks! === Installation errors: This error could be caused by required additional software packages which are missing or not installable. Furthermore there could be a conflict between software packages which are not allowed to be installed at the same time. haskell-platform: Depends: ghc6 ( 6.12.1+) but 6.12.3-1ubuntu7 is to be installed Depends: libghc6-cgi-dev (= 3001.1.7.2) but 3001.1.7.2-1build1 is to be installed Depends: libghc6-fgl-dev ( 5.4.2.2+) but 5.4.2.2-2build2 is to be installed Depends: libghc6-glut-dev ( 2.1.2.1+) but 2.1.2.1-1build1 is to be installed Depends: libghc6-haskell-src-dev ( 1.0.1.3+) but 1.0.1.3-2build1 is to be installed Depends: libghc6-html-dev ( 1.0.1.2+) but 1.0.1.2-3build2 is to be installed Depends: libghc6-hunit-dev ( 1.2.2.1+) but 1.2.2.1-2build2 is to be installed Depends: libghc6-mtl-dev ( 1.1.0.2+) but 1.1.0.2-10build2 is to be installed Depends: libghc6-network-dev ( 2.2.1.7+) but 2.2.1.7-1build2 is to be installed Depends: libghc6-opengl-dev ( 2.2.3.0+) but 2.2.3.0-2build2 is to be installed Depends: libghc6-parallel-dev ( 2.2.0.1+) but 2.2.0.1-1build1 is to be installed Depends: libghc6-parsec2-dev ( 2.1.0.1+) but 2.1.0.1-2build2 is to be installed Depends: libghc6-quickcheck2-dev ( 2.1.0.3+) but 2.1.0.3-1build2 is to be installed Depends: libghc6-regex-base-dev ( 0.93.1+) but 0.93.1-8build1 is to be installed Depends: libghc6-regex-compat-dev ( 0.92+) but 0.92-6build2 is to be installed Depends: libghc6-regex-posix-dev ( 0.94.1+) but 0.94.1-2build1 is to be installed Depends: libghc6-stm-dev ( 2.1.1.2+) but 2.1.1.2-5build2 is to be installed Depends: libghc6-xhtml-dev (= 3000.2.0.1) but 3000.2.0.1-6build2 is to be installed Depends: libghc6-zlib-dev ( 0.5.2.0+) but 0.5.2.0-4build2 is to be installed Depends: libghc6-http-dev (= 4009) but 4009-2build1 is to be installed Depends: libghc6-deepseq-dev ( 1.1.0.0+) but 1.1.0.0-2build1 is to be installed Depends: alex ( 2.3.3+) but 2.3.3-1 is to be installed Depends: happy ( 1.18.4-2+) but 1.18.4-2 is to be installed Depends: haddock but it is a virtual package ___ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org/mailman/listinfo/haskell-cafe ___ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org/mailman/listinfo/haskell-cafe
Re: [Haskell-cafe] Haskell Platform on Ubuntu: Installation Problems
To install GHC 7, have you completely de-installed GHC 6.12.3 and all related libraries ? I am not sure if uninstalling GHC 6.12.3 is mandatory, but I did it to have a clean Haskell installation. Then I did what anonymous has summarized below: Just download the Haskell Platform and GHC 7: http://lambda.galois.com/hp-tmp/2011.2.0.1/haskell-platform-2011.2.0.1.tar.gz [5] http://haskell.org/ghc/dist/7.0.3/ghc-7.0.3-i386-unknown-linux.tar.bz2 [6] Extract ghc, change into the directory, run configure, then make install as root. After that, extract the haskell platform, change into the directory, configure, make, make install as root. Then run cabal update. The haskell platform is broken on Natty. https://bugs.launchpad.net/ubuntu/+source/haskell-platform/+bug/742052 [7] Adrien ___ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org/mailman/listinfo/haskell-cafe
Re: [Haskell-cafe] Haskell Platform on Ubuntu: Installation Problems
On Mon, Jul 4, 2011 at 6:24 PM, anonymous qubi...@gmail.com wrote: No, you shouldn't need to do that. Just download the Haskell Platform and GHC 7: http://lambda.galois.com/hp-tmp/2011.2.0.1/haskell-platform-2011.2.0.1.tar.gz http://haskell.org/ghc/dist/7.0.3/ghc-7.0.3-i386-unknown-linux.tar.bz2 Extract ghc, change into the directory, run configure, then make install as root. After that, extract the haskell platform, change into the directory, configure, make, make install as root. Then run cabal update. The haskell platform is broken on Natty. https://bugs.launchpad.net/ubuntu/+source/haskell-platform/+bug/742052 I noticed that ) I removed GHC 6 completely. Then installed platform-independent GHC 7 compiler. Next to configure and eventually compile Haskell Platform I had to install libgmp3-dev, zlib and OpenGL libraries. Istall and 'cabal update' went smoothly. Now I got : GHCi, version 7.0.3 Great! Thanks! On Mon, Jul 4, 2011 at 9:12 AM, Dmitri O.Kondratiev doko...@gmail.comwrote: Adrien Haxaire adrien at adrienhaxaire.org wrote: I dropped the idea of installing Haskell Platform with synaptic. I installed it manually and I don't have any problem since then. To install GHC 7, have you completely de-installed GHC 6.12.3 and all related libraries ? On Mon, Jul 4, 2011 at 5:04 PM, Dmitri O.Kondratiev doko...@gmail.comwrote: Hi, I am trying to install Haskell Platform on latest Ubuntu desktop: ( uname -a: Linux frigate 2.6.38-8-generic #42-Ubuntu SMP Mon Apr 11 03:31:24 UTC 2011 x86_64 x86_64 x86_64 GNU/Linux ) I started with installing GHC. Ubuntu could only install version 6.12.3: without Cabal! Now I am trying to install haskell-platform which is a separate package. Ubuntu suggests to insatll version 2010.1.0.0.1 and fails (see bellow). What sould I do now to get GHC + Cabal? Should I: 1) De-insatll GHC 6.12.3 and all related libraries and try then installing Haskell Platform again? 2) Should I install Caball separately and forget about Haskell Platform? 3) Provide somehow for two different installations? Thanks! === Installation errors: This error could be caused by required additional software packages which are missing or not installable. Furthermore there could be a conflict between software packages which are not allowed to be installed at the same time. haskell-platform: Depends: ghc6 ( 6.12.1+) but 6.12.3-1ubuntu7 is to be installed Depends: libghc6-cgi-dev (= 3001.1.7.2) but 3001.1.7.2-1build1 is to be installed Depends: libghc6-fgl-dev ( 5.4.2.2+) but 5.4.2.2-2build2 is to be installed Depends: libghc6-glut-dev ( 2.1.2.1+) but 2.1.2.1-1build1 is to be installed Depends: libghc6-haskell-src-dev ( 1.0.1.3+) but 1.0.1.3-2build1 is to be installed Depends: libghc6-html-dev ( 1.0.1.2+) but 1.0.1.2-3build2 is to be installed Depends: libghc6-hunit-dev ( 1.2.2.1+) but 1.2.2.1-2build2 is to be installed Depends: libghc6-mtl-dev ( 1.1.0.2+) but 1.1.0.2-10build2 is to be installed Depends: libghc6-network-dev ( 2.2.1.7+) but 2.2.1.7-1build2 is to be installed Depends: libghc6-opengl-dev ( 2.2.3.0+) but 2.2.3.0-2build2 is to be installed Depends: libghc6-parallel-dev ( 2.2.0.1+) but 2.2.0.1-1build1 is to be installed Depends: libghc6-parsec2-dev ( 2.1.0.1+) but 2.1.0.1-2build2 is to be installed Depends: libghc6-quickcheck2-dev ( 2.1.0.3+) but 2.1.0.3-1build2 is to be installed Depends: libghc6-regex-base-dev ( 0.93.1+) but 0.93.1-8build1 is to be installed Depends: libghc6-regex-compat-dev ( 0.92+) but 0.92-6build2 is to be installed Depends: libghc6-regex-posix-dev ( 0.94.1+) but 0.94.1-2build1 is to be installed Depends: libghc6-stm-dev ( 2.1.1.2+) but 2.1.1.2-5build2 is to be installed Depends: libghc6-xhtml-dev (= 3000.2.0.1) but 3000.2.0.1-6build2 is to be installed Depends: libghc6-zlib-dev ( 0.5.2.0+) but 0.5.2.0-4build2 is to be installed Depends: libghc6-http-dev (= 4009) but 4009-2build1 is to be installed Depends: libghc6-deepseq-dev ( 1.1.0.0+) but 1.1.0.0-2build1 is to be installed Depends: alex ( 2.3.3+) but 2.3.3-1 is to be installed Depends: happy ( 1.18.4-2+) but 1.18.4-2 is to be installed Depends: haddock but it is a virtual package ___ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org/mailman/listinfo/haskell-cafe ___ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org/mailman/listinfo/haskell-cafe
Re: [Haskell-cafe] Haskell Platform on Ubuntu: Installation Problems
You're welcome :) Adrien On Mon, 4 Jul 2011 19:09:50 +0400, Dmitri O.Kondratiev wrote: I noticed that ) I removed GHC 6 completely. Then installed platform-independent GHC 7 compiler. Next to configure and eventually compile Haskell Platform I had to install libgmp3-dev, zlib and OpenGL libraries. Istall and cabal update went smoothly. Now I got : GHCi, version 7.0.3 Great! Thanks! ___ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org/mailman/listinfo/haskell-cafe
[Haskell-cafe] Diagnose stack space overflow
Hi, For the following error: Stack space overflow: current size 8388608 bytes. Use `+RTS -Ksize -RTS' to increase it. I want to find out the culprit function and rewrite it tail-recursively. Is there a way to find out which function is causing this error other than reviewing the code manually? Thanks, Loganathan ___ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org/mailman/listinfo/haskell-cafe
Re: [Haskell-cafe] Diagnose stack space overflow
Profile!! E.g. http://stackoverflow.com/questions/6429085/haskell-heap-issues-with-parameter-passing-style/6429888#6429888 On Mon, Jul 4, 2011 at 11:44 AM, Logo Logo sarasl...@gmail.com wrote: Hi, For the following error: Stack space overflow: current size 8388608 bytes. Use `+RTS -Ksize -RTS' to increase it. I want to find out the culprit function and rewrite it tail-recursively. Is there a way to find out which function is causing this error other than reviewing the code manually? Thanks, Loganathan ___ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org/mailman/listinfo/haskell-cafe ___ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org/mailman/listinfo/haskell-cafe
Re: [Haskell-cafe] Diagnose stack space overflow
You can use the heap profiling options in GHC to find out what is using all the memory. You'll want to compile with -prof and -rtsopts, and then invoke the program with +RTS -hx, where x is one of 'c', 'y', or a few others. Then run hp2ps on the resulting .hp file to get a graph of what's using all the memory. -- Chris Smith On Jul 4, 2011 9:46 AM, Logo Logo sarasl...@gmail.com wrote: Hi, For the following error: Stack space overflow: current size 8388608 bytes. Use `+RTS -Ksize -RTS' to increase it. I want to find out the culprit function and rewrite it tail-recursively. Is there a way to find out which function is causing this error other than reviewing the code manually? Thanks, Loganathan ___ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org/mailman/listinfo/haskell-cafe
Re: [Haskell-cafe] Diagnose stack space overflow
On 4 July 2011 16:44, Logo Logo sarasl...@gmail.com wrote: Hi, For the following error: Stack space overflow: current size 8388608 bytes. Use `+RTS -Ksize -RTS' to increase it. I want to find out the culprit function and rewrite it tail-recursively. Is there a way to find out which function is causing this error other than reviewing the code manually? It's possible that building your program with profiling and then running with +RTS -xc will print a useful call stack. Cheers, Max ___ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org/mailman/listinfo/haskell-cafe
[Haskell-cafe] ANNOUNCE: doctest-0.4.0
I just uploaded a new version of doctest[1] to Hackage. WHAT IS doctest? doctest is a port of Python's doctest[2] to Haskell. It can be used to verify, that examples in Haddock comments[3] do still work. This also provides you with a simple mechanism to write unit test, without the burden of maintaining a dedicated test suite. A basic example of usage is at [4]. WHAT'S NEW IN THIS VERSION? === doctest's functionality is now exposed as a library, this allows for integration with existing test frameworks. Sakari Jokinen is working on integration with test-framework[5]. Thanks to Sakari Jokinen for both, his contributions to the doctest API and his work on test-framework-doctest! Cheers, Simon [1] http://hackage.haskell.org/package/doctest [2] http://docs.python.org/library/doctest.html [3] http://www.haskell.org/haddock/doc/html/ch03s08.html#id566093 [4] https://github.com/sol/doctest-haskell#readme [5] https://github.com/sakari/test-framework-doctest ___ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org/mailman/listinfo/haskell-cafe
Re: [Haskell-cafe] Diagnose stack space overflow
Hi Don, I find this answer confusing. The SO question you're linking to is about heap size, not stack overflow. The stack size in this example is 8M. The whole heap size may be much bigger (and increasing the stack size may actually remove the overflow). It would be interesting to learn about success stories of investigation of a stack overflow using heap profiling. * Don Stewart don...@gmail.com [2011-07-04 12:08:05-0400] Profile!! E.g. http://stackoverflow.com/questions/6429085/haskell-heap-issues-with-parameter-passing-style/6429888#6429888 On Mon, Jul 4, 2011 at 11:44 AM, Logo Logo sarasl...@gmail.com wrote: Hi, For the following error: Stack space overflow: current size 8388608 bytes. Use `+RTS -Ksize -RTS' to increase it. I want to find out the culprit function and rewrite it tail-recursively. Is there a way to find out which function is causing this error other than reviewing the code manually? -- Roman I. Cheplyaka :: http://ro-che.info/ ___ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org/mailman/listinfo/haskell-cafe
Re: [Haskell-cafe] Diagnose stack space overflow
From: Logo Logo sarasl...@gmail.com Hi, For the following error: Stack space overflow: current size 8388608 bytes. Use `+RTS -Ksize -RTS' to increase it. I want to find out the culprit function and rewrite it tail-recursively. Is there a way to find out which function is causing this error other than reviewing the code manually? I'd like to point out that a stack-space overflow in Haskell isn't quite the same thing as in other functional languages. In particular, it's possible for tail-recursive functions to overflow the stack because of laziness. Consider this tail-recursive sum function: trSum :: [Int] - Int trSum l = go 0 l where go acc [] = acc go acc (x:xs) = go (acc+x) xs It's tail-recursive. But if you enter this in ghci and run it, you'll find that it uses increasing stack space, and will likely cause a stack overflow for large enough inputs. The problem is that the accumulator 'acc' isn't strict and builds up a thunk of the form: 0+n1+n2+...+nn The solution is to add strictness. For this example, a '!' on the accumulator will do. GHC will sometimes spot cases where extra strictness is helpful (it'll figure this one out when compiled with -O), but it often needs help. I'd recommend Edward Yang's series of blog posts about debugging, space leaks, and the Haskell heap. One useful article is http://blog.ezyang.com/2011/05/anatomy-of-a-thunk-leak/ , but you may want to start at the beginning of the heap series. John L. ___ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org/mailman/listinfo/haskell-cafe
[Haskell-cafe] NVIDIA's CUDA and Haskell
Hi, NVIDIA's CUDA library seems to be really hot in the massively parallel world: http://www.nvidia.com/object/cuda_home_new.html. I realize that given CUDA seems to be implemented in an extension of ANSI C that it is pervaded by statefulness. However, is there any effort to build a bridge between Haskell and CUDA, foreign language bindings or maybe better yet a monad to encapsulate state?? Kind regards, Vasili ___ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org/mailman/listinfo/haskell-cafe
Re: [Haskell-cafe] NVIDIA's CUDA and Haskell
There's a lot of active work: Direct access to CUDA: http://hackage.haskell.org/package/cuda CUDA in Haskell: http://hackage.haskell.org/package/language-c-quote Direct access to OpenCL: http://hackage.haskell.org/package/OpenCLRaw High-level pure data parallelism targetting your GPU: http://hackage.haskell.org/package/accelerate On Mon, Jul 4, 2011 at 8:09 PM, Vasili I. Galchin vigalc...@gmail.com wrote: Hi, NVIDIA's CUDA library seems to be really hot in the massively parallel world: http://www.nvidia.com/object/cuda_home_new.html. I realize that given CUDA seems to be implemented in an extension of ANSI C that it is pervaded by statefulness. However, is there any effort to build a bridge between Haskell and CUDA, foreign language bindings or maybe better yet a monad to encapsulate state?? Kind regards, Vasili ___ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org/mailman/listinfo/haskell-cafe ___ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org/mailman/listinfo/haskell-cafe
[Haskell-cafe] Haskell Implementors Workshop 2011, Second CFT
Call for Talks ACM SIGPLAN Haskell Implementors' Workshop http://haskell.org/haskellwiki/HaskellImplementorsWorkshop/2011 Tokyo, Japan, September 23rd, 2011 The workshop will be held in conjunction with ICFP 2011 http://www.icfpconference.org/icfp2011/ Important dates Proposal Deadline: 22nd July 2011 Notification:8th August2011 Workshop: 23rd September 2011 The Haskell Implementors' Workshop is to be held alongside ICFP 2011 this year in Tokyo, Japan. There will be no proceedings; it is an informal gathering of people involved in the design and development of Haskell implementations, tools, libraries, and supporting infrastructure. This relatively new workshop reflects the growth of the user community: there is a clear need for a well-supported tool chain for the development, distribution, deployment, and configuration of Haskell software. The aim is for this workshop to give the people involved with building the infrastructure behind this ecosystem an opportunity to bat around ideas, share experiences, and ask for feedback from fellow experts. We intend the workshop to have an informal and interactive feel, with a flexible timetable and plenty of room for ad-hoc discussion, demos, and impromptu short talks. Scope and target audience - It is important to distinguish the Haskell Implementors' Workshop from the Haskell Symposium which is also co-located with ICFP 2011. The Haskell Symposium is for the publication of Haskell-related research. In contrast, the Haskell Implementors' Workshop will have no proceedings -- although we will aim to make talk videos, slides and presented data available with the consent of the speakers. In the Haskell Implementors' Workshop we hope to study the underlying technology. We want to bring together anyone interested in the nitty gritty details necessary to turn a text file into a deployed product. Having said that, members of the wider Haskell community are more than welcome to attend the workshop -- we need your feedback to keep the Haskell ecosystem thriving. The scope covers any of the following topics. There may be some topics that people feel we've missed, so by all means submit a proposal even if it doesn't fit exactly into one of these buckets: * Compilation techniques * Language features and extensions * Type system implementation * Concurrency and parallelism: language design and implementation * Performance, optimisation and benchmarking * Virtual machines and run-time systems * Libraries and Tools for development or deployment Talks - At this stage we would like to invite proposals from potential speakers for a relatively short talk. We are aiming for 20 min talks with 10 mins for questions and changeovers. We want to hear from people writing compilers, tools, or libraries, people with cool ideas for directions in which we should take the platform, proposals for new features to be implemented, and half-baked crazy ideas. Please submit a talk title and abstract of no more than 200 words to b...@cse.unsw.edu.au We will also have a lightning talks session which will be organised on the day. These talks will be 2-10 minutes, depending on available time. Suggested topics for lightning talks are to present a single idea, a work-in-progress project, a problem to intrigue and perplex Haskell implementors, or simply to ask for feedback and collaborators. Organisers -- * Rebekah Leslie (Portland State University) * Ben Lippmeier - co-chair (University of New South Wales) * Andres Loeh (Well-Typed LLP) * Oleg Lobachev(University of Marburg) * Neil Mitchell - co-chair (Standard Chartered) * Dimitrios Vytiniotis (Microsoft Research) ___ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org/mailman/listinfo/haskell-cafe
[Haskell-cafe] Splitting Hackage Packages and re-exporting entire modules (with same module name)
All, I have decided it would be beneficial to split System.Crypto.Random and the rest of crypto-api into different packages. Is there I way I can create a package, entropy, with System.Crypto.Random but continue to expose that module from crypto-api (allowing people who use that module some time to move)? If so, how? If not, does anyone else see value in this and how it can be added to the infrastructure? Cheers, Thomas ___ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org/mailman/listinfo/haskell-cafe