__GLASGOW_HASKELL__=708?

2014-09-25 Thread Greg Fitzgerald
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

Re: __GLASGOW_HASKELL__=708?

2014-09-25 Thread Greg Fitzgerald
, “GHC version numbering policy”. On Fri, Sep 26, 2014 at 11:09 AM, Greg Fitzgerald gari...@gmail.com wrote: 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

[Haskell-cafe] haskell.cs.yale.edu error

2013-01-09 Thread Greg Fitzgerald
I was hoping to check on the status of Yampa, but: http://haskell.cs.yale.edu/ [an error occurred while processing this directive] You don't have permission to access the requested directory. There is either no index document or the directory is read-protected. [an error occurred while

Re: [Haskell-cafe] ANNOUNCE: tie-knot library

2012-12-14 Thread Greg Fitzgerald
GHC's reliance on the LGPLed GMP library ... use integer-simple in your GHC I think this can still use some attention. GHC requires an integer library internally, so to switch to integer-simple, you need to build GHC from source. Has anyone reviewed of the performance implications of this

Re: Hoopl vs LLVM?

2012-12-12 Thread Greg Fitzgerald
On Wed, Dec 12, 2012 at 4:35 AM, Simon Marlow marlo...@gmail.com wrote: Now, all that LLVM knows is that z was read from Sp[8], it has no more information about its value. Are you saying Hoopl can deduce the original form from the CPS-version? Or that LLVM can't encode the original form? Or

Re: Hoopl vs LLVM?

2012-12-11 Thread Greg Fitzgerald
Thank you all for your replies. On Tue, Dec 11, 2012 at 11:16 AM, Simon Peyton-Jones simo...@microsoft.comwrote: And I think there is probably quite a lot that is in reach for C--, but out of reach for LLVM. Why? Because before we pass the code to LLVM we do CPS-conversion. Is there a

Hoopl vs LLVM?

2012-12-10 Thread Greg Fitzgerald
I don't know my way around the GHC source tree. How can I get the list of optimizations implemented with Hoopl? Is there overlap with LLVM's optimization passes? If so, has anyone compared the implementations at all? Should one group be stealing ideas from the other? Or apples and oranges?

[Haskell-cafe] fixed-length bit-vectors

2012-11-21 Thread Greg Fitzgerald
Hi all, My goal, eliminate the failure case in 'byte': https://gist.github.com/4128503 I don't want my 'byte' function to fail at runtime or return $ Left vector not 8 bits. I want it to return a Word8 for an 8-bit bit-vector or not compile. Is there an existing library that offers

Re: [Haskell-cafe] Cabal failures...

2012-11-19 Thread Greg Fitzgerald
cabal install -v cabal-install Not sure if you're running into this one, but a configuration that wasn't working for me: 1) Install Haskell Platform 2) Install GHC 7.6.1 3) cabal install cabal-install As I recall, the error had something to do with a Cabal-generated 'Paths' file assuming the

Re: [Haskell-cafe] hackageDB haddock errors

2012-11-13 Thread Greg Fitzgerald
Any reason haddock isn't run at the time the package is uploaded? Or could the docs be included in the tarball? Folks oftentimes want to announce their new packages right after uploading them, but usually there are no docs yet. A little awkward. Thanks, Greg On Tue, Nov 13, 2012 at 7:41 AM,

[Haskell-cafe] Safe lens?

2012-10-29 Thread Greg Fitzgerald
Why are getters from the 'lens' package unsafe? Is there a subset like Data.Label.Pure from 'fclabels' that can be imported safely? $ cat a.hs {-# LANGUAGE Safe #-} import Control.Lens.Getter main = print 123 $ runghc a.hs a.hs:3:1: Control.Lens.Getter: Can't be safely imported! The

Re: [Haskell-cafe] Safe lens?

2012-10-29 Thread Greg Fitzgerald
AM, Petr P petr@gmail.com wrote: Hi I believe the reason is that it uses TemplateHaskell for automatic derivation of labels. And TemplateHaskell is of course unsafe, since it could convert your code into something entirely different. Best regards, Petr Pudlak 2012/10/29 Greg

Re: [Haskell-cafe] Safe lens?

2012-10-29 Thread Greg Fitzgerald
for automatic derivation of labels. And TemplateHaskell is of course unsafe, since it could convert your code into something entirely different. Best regards, Petr Pudlak 2012/10/29 Greg Fitzgerald gari...@gmail.com: Why are getters from the 'lens' package unsafe? Is there a subset

Re: [Haskell-cafe] foldr (.) id

2012-10-27 Thread Greg Fitzgerald
:: (F.Foldable t, C.Category cat) = t (cat b b) - cat b b {- Sneaky type-specialization -} Prelude F C :t F.foldr C.id F.foldr C.id :: F.Foldable t = b - t (b - b) - b On Sat, Oct 27, 2012 at 3:09 AM, Ross Paterson r...@soi.city.ac.uk wrote: On Fri, Oct 26, 2012 at 07:41:18PM +0100, Greg Fitzgerald

[Haskell-cafe] Overload function application? (was: foldr (.) id)

2012-10-27 Thread Greg Fitzgerald
libraries, and effectively none of the runtime, by implementing instances for literals and function application? Say, for example, to generate a call graph, or make the language strict, or target LLVM more directly. Anyone tried this? Thanks, Greg On Sat, Oct 27, 2012 at 11:39 AM, Greg Fitzgerald

[Haskell-cafe] foldr (.) id

2012-10-26 Thread Greg Fitzgerald
Hi Haskellers, I've recently found myself using the expression: foldr (.) id to compose a list (or Foldable) of functions. It's especially useful when I need to map a function over the list before composing. Does this function, or the more general foldr fmap id, defined in a library anywhere?

Re: [Haskell-cafe] foldr (.) id

2012-10-26 Thread Greg Fitzgerald
parseOrIgnore p = either (const s) id . parse p s parseAllOrIgnore = compose . map parseOrIgnore [p1, p2, p3] Naming: (.)/compose is consistent with (+)/sum, (*)/product, ()/and, etc. Thoughts? -Greg On Fri, Oct 26, 2012 at 12:31 PM, John Wiegley jwieg...@gmail.com wrote: Greg Fitzgerald gari

Re: [Haskell-cafe] foldr (.) id

2012-10-26 Thread Greg Fitzgerald
sorry for the buggy code let parseOrIgnore p s = either (const s) id $ parse p s let parseAllOrIgnore = compose . map parseOrIgnore [p1, p2, p3] parseAllOrIgnore abbbcccbbba On Fri, Oct 26, 2012 at 2:11 PM, Greg Fitzgerald gari...@gmail.com wrote: Hmm, neato. but didn't make life any

[Haskell-cafe] a parallel mapM?

2012-09-28 Thread Greg Fitzgerald
I'm new to concurrent programming in Haskell. I'm looking for a drop-in replacement for 'mapM' to parallelize a set of independent IO operations. I hoped 'mapConcurrently' might be it, but I need something that will only spawn as many threads as I have CPUs available [1]. I also tried

Re: [Haskell-cafe] a parallel mapM?

2012-09-28 Thread Greg Fitzgerald
-io/0.3.2/doc/html/Control-Concurrent-ParallelIO-Global.html On Fri, Sep 28, 2012 at 1:01 PM, Greg Fitzgerald gari...@gmail.com wrote: I'm new to concurrent programming in Haskell. I'm looking for a drop-in replacement for 'mapM' to parallelize a set of independent IO operations. I hoped

Re: [Haskell-cafe] JavaScript (SpiderMonkey, V8, etc) embedded in GHC?

2012-09-09 Thread Greg Fitzgerald
Hi Bob, All I really need is to allow users to write some JavaScript that accepts a single JSON 'file/string' from my Haskell program and produces another JSON 'file/string' that my Haskell program will accept. One option is to make your Haskell program an HTTP server, and then use Node.js

Re: [Haskell-cafe] [Haskell-beginners] Why is the the transpose function in Data.List more complicated?

2012-08-03 Thread Greg Fitzgerald
Hi KC, transp :: [[b]] - [[b]] transp ([]:_) = [] transp rows = map head rows : transp (map tail rows) Why is the the transpose function in Data.List more complicated? In the Data.List version, the list comprehension syntax quietly filters out items that fail to pattern-match (empty

[Haskell-cafe] (+1) vs let inc=(+1)

2012-05-22 Thread Greg Fitzgerald
In ghci 7.4.1: Prelude :t (+1) (+1) :: Num a = a - a Prelude let inc=(+1) Prelude :t inc inc :: Integer - Integer Why the difference? Thanks, Greg ___ Haskell-Cafe mailing list Haskell-Cafe@haskell.org

Re: [Haskell-cafe] (+1) vs let inc=(+1)

2012-05-22 Thread Greg Fitzgerald
Thanks! $ ghci -XNoMonomorphismRestriction Prelude :t (+1) (+1) :: Num a = a - a Prelude let inc=(+1) Prelude :t inc inc :: Num a = a - a Cool. -Greg On Tue, May 22, 2012 at 12:34 PM, Artyom Kazak artyom.ka...@gmail.comwrote:

Re: [Haskell-cafe] anyone else driven mad by trying to setup a gmp free version of haskell platform?

2012-05-08 Thread Greg Fitzgerald
can we build a version of the compiler that loads [GMP] via dlopen on demand? An explanation from well-typed: http://www.well-typed.com/blog/32 But that was ~3 years ago. Anybody still looking at possible solutions? Maintaining the INTEGER_SIMPLE branch of GHC, minor as it is, is still a

[Haskell-cafe] LLVM M.D. source code?

2012-05-08 Thread Greg Fitzgerald
A paper, LLVM M.D.: A Denotational Translation Validator, mentions the source code for LLVM M.D is available here: http://llvm-md.seas.harvard.edu/ I can't seem to spot it there or on Hackage. Anyone seen it? Thanks, Greg ___ Haskell-Cafe mailing

[Haskell-cafe] ping haskell.org timeout

2011-08-25 Thread Greg Fitzgerald
cabal update hangs. ping haskell.org times out. But haskell.org and hackage webpages are loading just fine. What's going on? Thanks, Greg ___ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org/mailman/listinfo/haskell-cafe

how to link a minimal executable?

2010-08-11 Thread Greg Fitzgerald
Is there any documentation or examples available that shows what needs to be linked to get a haskell executable to print hello world? Instead of using GHC to link, I'm interested in using gcc, ar, or link directly. For starters, what implements the entry point? $ cat Main.hs main = print hello

$thisdir for package.conf?

2010-08-11 Thread Greg Fitzgerald
Is there a way for a package.conf file to contain paths that are relative to the directory containing the .conf file? GHC 6.12.1 chokes on relative paths. I see the problem is solved for GHC's core libraries with the $topdir variable. Is there something like a $thisdir we could use in inplace

[Haskell-cafe] ANN: spec2code

2010-04-01 Thread Greg Fitzgerald
After 5 years of RD, I’m proud to announce the spec2code compiler. With spec2code, developers no longer need to acknowledge the mundane details of programming, such as memory allocation, bounds-checking, byte ordering, inheritance models or performance tuning. spec2code uses the latest techniques

Re: integer-simple by default

2010-02-22 Thread Greg Fitzgerald
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 Thanks for the data point. Looks like they swapped

Re: integer-simple by default

2010-02-20 Thread Greg Fitzgerald
You can dynamically link libgmp on windows. That might be easier: Do you know if the dynamic link escape hatch has ever held up in court? Last time I looked into it, the free software community had mixed opinions. In any case, giving GMP the boot alleviates any licensing concerns, makes the

Re: Confusion about GHC and GMP

2010-02-17 Thread Greg Fitzgerald
I assume you mean http://hackage.haskell.org/trac/ghc/wiki/ReplacingGMPNotes#CurrentStatus in which case, yes. I assume that INTEGER_LIBRARY=integer-foo is an option when compiling GHC itself and not when using GHC, correct? Yes. Great, thanks for your help Ian. Building GHC with

Re: [Haskell] Parsec operator issue

2010-02-16 Thread Greg Fitzgerald
Hi Adam, parse x=-1, it fails. Does anyone know how to fix this? This issue is in using the 'reservedOp' combinator which rejects '=' when followed by '-'.    reservedOp name =        lexeme $ try $        do{ string name          ; notFollowedBy (opLetter languageDef) ? (end of ++ show

Confusion about GHC and GMP

2010-02-12 Thread Greg Fitzgerald
I wonder if someone might be able to clear a few things up for me about implementing Integer with GMP.  First, is the link below the most up-to-date information regarding GHC's situation? http://hackage.haskell.org/trac/ghc/wiki/ReplacingGMPNotes#BinaryDropinReplacementforGMP I assume that

Re: [Haskell-cafe] Token parsers in parsec consume trailing whitespace

2009-12-14 Thread Greg Fitzgerald
Hi Edward, 1. Is there a more elegant way of doing number parsing? In particular, are there token parsers that don't consume trailing whitespace, or is there a better way to do this with the primitives. Parsec defines a combinator it calls 'lexeme' which the tokenizer wraps each of its

Re: [Haskell-cafe] Implicit newtype unwrapping

2009-12-03 Thread Greg Fitzgerald
On Thu, Dec 3, 2009 at 5:34 AM, Conor McBride wrote: http://www.haskell.org/pipermail/libraries/2008-January/008917.html On Tue, Jan 15, 2008 at 3:31 PM, Conor McBride wrote: Haskell's classes are the best damn rhythm section in the industry: you hum it, they play it. On Fri, Dec 10, 2004 at

Re: [Haskell-cafe] Implicit newtype unwrapping

2009-12-02 Thread Greg Fitzgerald
Gregory Crosswhite gcr...@phys.washington.edu wrote: Out of curiosity, why would one want a newtype that were unwrapped implicitly, rather than just using type? One reason might be because you only switched from 'type' to 'newtype' so that you could write more refined Arbitrary instances for

Re: [Haskell-cafe] Implicit newtype unwrapping

2009-12-02 Thread Greg Fitzgerald
That suggests that the feature we'd really like is a way to declare that we want a type in a context to act as if it had a different instance declaration for a given typeclass, without having to go through newtype. I'd want implicit type coercion from subtypes, so that you wouldn't need an

Re: Update on GHC 6.12.1

2009-10-29 Thread Greg Fitzgerald
Another minor question is whether -XDoRec is a good name for the flag. We can't really use -XRecursiveDo because that's the one we are deprecating! -XReDo :) -Greg ___ Glasgow-haskell-users mailing list Glasgow-haskell-users@haskell.org

Re: [Haskell-cafe] cabal haddock hpc, exposed modules?

2009-10-28 Thread Greg Fitzgerald
Duncan wrote: By default hpc markup will generate pages for every module in the program. Am I missing something? Nope, user error. I started using --include to avoid running coverage over my test framework files, and was looking for something like haddock's internal flag before thinking to

[Haskell-cafe] cabal haddock hpc, exposed modules?

2009-10-27 Thread Greg Fitzgerald
I have a cabal package that defines a few dozen modules, and I'm hoping to generate documentation and code coverage for all modules without listing each module explicitly. currently my .cabal includes: library exposed-modules: Language.Idl.Data, Language.Idl.Merge,

[Haskell-cafe] Re: cabal haddock hpc, exposed modules?

2009-10-27 Thread Greg Fitzgerald
not . doesDirectoryExist) (flatten tree) childPaths :: FilePath - IO (FilePath, [String]) childPaths dir = do b - doesDirectoryExist dir fs - if b then getDirectoryContents dir else return [] return (dir, [dir ++ / ++ p | p - fs, head p /= '.']) -Greg On Tue, Oct 27, 2009 at 2:33 PM, Greg

Re: [Haskell-cafe] Re: a boring parser

2009-10-01 Thread Greg Fitzgerald
Cool, I like how this parser can model the Look, an Eagle scenario. For reference: http://www.youtube.com/watch?v=pjh3e198pUQ The parser can change focus (that is, change traversal strategy) in response to a successful parse. In the Look, an Eagle scenario, the bear is able to interpret and

Re: [Haskell-cafe] the problem of design by negation

2009-05-20 Thread Greg Fitzgerald
On Wed, May 20, 2009 at 3:54 PM, Michael Mossey m...@alumni.caltech.edu wrote: I want to aspire to positive design. I want to list the goals, and think of design as making clever choices that meet all the goals. Design by Thomas the Tank Engine? ___

[Haskell-cafe] Parsec and (then?) type-check

2008-12-12 Thread Greg Fitzgerald
Parser gurus, When you write a parser with a library like Parsec, do you typically type-check while parsing, or afterward in a separate pass? The latter is more modular, but it means labeling every element in the AST with the parser position so that you can give good error messages. Do you find

Re: [Haskell-cafe] Re: [Haskell] GHC 6.10 and OpenGL

2008-11-22 Thread Greg Fitzgerald
$ cabal install OpenGL HOpenGL installs easily with cabal-install, but most HOpenGL examples and tutorials also use GLUT, which is not so painless on Windows. Luckily Conal Elliot just recently posted detailed instructions of how to do it:

Re: [Haskell-cafe] Re: OOPer?

2008-11-17 Thread Greg Fitzgerald
Jonathan Cast wrote: [Functional and object-oriented programming] have points of similarity, but on net the best plan is to simply never reason analogically from one to the other. Coming from the OO world, I found it very useful to see how the same solution is modeled using different

Re: [Haskell-cafe] Re: OOPer?

2008-11-17 Thread Greg Fitzgerald
! -Greg On Mon, Nov 17, 2008 at 11:00 AM, Greg Fitzgerald [EMAIL PROTECTED] wrote: Jonathan Cast wrote: [Functional and object-oriented programming] have points of similarity, but on net the best plan is to simply never reason analogically from one to the other. Coming from the OO world, I

[Haskell-cafe] Linker errors to OpenGL with GHC 6.10.1

2008-11-12 Thread Greg Fitzgerald
Do you know how I can fix these linker errors? C:\projects\funcat HelloWorld.hs import Graphics.Rendering.OpenGL import Graphics.UI.GLUT main = do (progname, _) - getArgsAndInitialize createWindow Hello World displayCallback $= clear [ColorBuffer] mainLoop C:\projects\funls lib

Parsec in 6.10 RC 1

2008-10-08 Thread Greg Fitzgerald
The instance for Functor (Either ParserError) disappeared. Is that intentional? Thanks, Greg ___ Glasgow-haskell-users mailing list Glasgow-haskell-users@haskell.org http://www.haskell.org/mailman/listinfo/glasgow-haskell-users

Re: [Haskell-cafe] lines of code metrics

2008-08-20 Thread Greg Fitzgerald
On Aug 19, 2008, at 9:12 AM, Greg Fitzgerald wrote: Does anyone know of a good case study comparing a project written in C versus one written in Haskell? I'm mostly looking for a comparison of lines of code, but any other metric, such as time to market and code quality metrics could also

Re: [Haskell-cafe] lines of code metrics

2008-08-20 Thread Greg Fitzgerald
Greg wrote: Thank you all for your help! These references are a great help for pushing Haskell at work. Don wrote: I've also set up the Who's using Haskell section on haskell.org's front page -- let me know what you think Great, thanks! I added Qualcomm. -Greg

[Haskell-cafe] lines of code metrics

2008-08-19 Thread Greg Fitzgerald
Does anyone know of a good case study comparing a project written in C versus one written in Haskell? I'm mostly looking for a comparison of lines of code, but any other metric, such as time to market and code quality metrics could also be ___

Re: ANN: prof2dot, version 0.4.1

2008-08-05 Thread Greg Fitzgerald
Sounds fantastic I'm using 'prof2dot' on a ~3000 LOC project and it's working well. Visual quality metrics like this and Haskell Program Coverage makes using Haskell in the corporate world a little easier to pull off. Zero crash reports helps too. ;-) -Greg F On Tue, Aug 5, 2008 at 1:02

[Haskell-cafe] GHC ARM Hackathon (Re: Haskell on ARM )

2008-07-02 Thread Greg Fitzgerald
It may not be long before most of the computing world has gone mobile. CNET suggests the major players will be Qualcomm and Intel, where QC is more power-efficient, but Intel conveniently targets x86. June 29, 2008 7:30 PM PDT Qualcomm vs Intel: You

[Haskell-cafe] Re: GHC ARM Hackathon (Re: Haskell on ARM )

2008-07-02 Thread Greg Fitzgerald
...try that hyperlink again... Qualcomm vs Intel: You decide http://news.cnet.com/8301-13924_3-9979989-64.html On Wed, Jul 2, 2008 at 11:16 AM, Greg Fitzgerald [EMAIL PROTECTED] wrote: It may not be long before most of the computing world has gone mobile. CNET suggests the major players

[Haskell-cafe] derive Pretty?

2008-01-31 Thread Greg Fitzgerald
Is it possible to automatically derive instances of Prettyhttp://haskell.org/ghc/docs/latest/html/libraries/haskell-src/Language-Haskell-Pretty.html? If no, what do most do when it comes to pretty-printing large data types? Thanks, Greg ___ Haskell-Cafe

[Haskell-cafe] shootout using 6.6?

2008-01-17 Thread Greg Fitzgerald
http://shootout.alioth.debian.org/gp4/haskell.php Anyone know if the Language Shootout is actually using GHC 6.6 or is that a typo? Thanks, Greg ___ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org/mailman/listinfo/haskell-cafe

[Haskell-cafe] cabal and hpc?

2008-01-14 Thread Greg Fitzgerald
Has the Haskell Program Coverage tool been integrated into Cabal? That is, is there anything like runhaskell Setup.hs coverage to generate a coverage report? Thanks, Greg ___ Haskell-Cafe mailing list Haskell-Cafe@haskell.org

Re: GHC 6.8.2, Haddock not finding std libs

2007-12-10 Thread Greg Fitzgerald
Haddock is no longer able to resolve the names from the standard libraries. There should be a new haddock release shortly, which fixes that as well as an HTML link bug. Or you can get the latest source with darcs The darcs version fixes the issue. Thanks Ian! -Greg

Re: HUnit 1.2.0.0 on 6.8.1 vs 1.1.1 on 6.6.1

2007-12-10 Thread Greg Fitzgerald
abc @=? efg Loading package HUnit-1.2.0.0 ... linking ... done. *** Exception: (unknown) On Dec 3, 2007 7:23 AM, Ian Lynagh [EMAIL PROTECTED] wrote: This is caused by a change in the HUnit library, from assertFailure msg = ioError (userError (hunitPrefix ++ msg)) to

Re: HUnit 1.2.0.0 on 6.8.1 vs 1.1.1 on 6.6.1

2007-12-07 Thread Greg Fitzgerald
abc @=? efg Loading package HUnit-1.2.0.0 ... linking ... done. *** Exception: (unknown) On Dec 3, 2007 7:23 AM, Ian Lynagh [EMAIL PROTECTED] wrote: This is caused by a change in the HUnit library, from assertFailure msg = ioError (userError (hunitPrefix ++ msg)) to assertFailure

GHC 6.8.2, Haddock not finding std libs

2007-12-07 Thread Greg Fitzgerald
Please test as much as possible One difference between 6.8.1 and 6.8.2 that I see is in running runhaskell Setup.hs haddock with Haddock 0.8 on Windows XP. Haddock is no longer able to resolve the names from the standard libraries. Running Haddock for Xyz-0.1... Warning: Xyz: the following

HUnit 1.2.0.0 on 6.8.1 vs 1.1.1 on 6.6.1

2007-11-21 Thread Greg Fitzgerald
On Windows, HUnit's assertions are not working - trace below in ghci 6.8.1and 6.6.1. Can others reproduce? Is this the right place to report bugs? Should I confirm a bug here and then create a ticket, create a ticket and that's it, or just mention it here and someone else creates a ticket?

Exposed module still hidden, why?

2007-11-20 Thread Greg Fitzgerald
Using GHC 6.8.1 on Windows XP, after having used ghc-pkg to expose ' directory-1.0.0.0', I am getting an error when I build haddock that says the package is hidden. When I type ghc-pkg list, the package is not in parenthesis. Typing ghc -v says that it is using the file from

[Haskell-cafe] Re: Exposed module still hidden, why?

2007-11-20 Thread Greg Fitzgerald
Why does GHC still think the package is hidden? You need to add directory to the Build-Depends instruction in the cabal file Thanks Olivier. Haddock now builds with this list for 'build-depends': base=1.0, haskell98=1.0, directory=1.0, process=1.0, containers=0.1, array=0.1, pretty=1.0 The

6.8.1: source code in docs?

2007-11-16 Thread Greg Fitzgerald
GHC 6.8.1's docs no longer link to the source code in the upper right-hand corner of each module. Intentional? http://haskell.org/ghc/docs/latest/html/libraries/ Thanks, Greg ___ Glasgow-haskell-users mailing list Glasgow-haskell-users@haskell.org

[Haskell-cafe] Re: Composing trading strategies (was: Should I step into a minefield? / Writing a trading studio in Haskell)

2007-11-08 Thread Greg Fitzgerald
Hi Joel, Can you post a couple of examples of what the trading strategies look like? Here are some very simple strategies, which are written in the context of just one stock. If these aren't very convincing, could you post some more complex strategies that you'd like to see built using this

[Haskell-cafe] Composing trading strategies (was: Should I step into a minefield? / Writing a trading studio in Haskell)

2007-11-08 Thread Greg Fitzgerald
My idea is to write something like TradeStation [1] or NinjaTrader, only for the Mac. It would be quite nifty to use SPJ's financial combinator approach I was experimenting with a Haskell EDSL for financial trading not too long ago. My favorite strategy so far is the parallel parser combinator

[Haskell-cafe] ARM back end?

2007-11-02 Thread Greg Fitzgerald
Anybody know of an ARM back end for any of the Haskell compilers? Thanks, Greg ___ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org/mailman/listinfo/haskell-cafe

Re: [Haskell-cafe] Re: Why can't Haskell be faster?

2007-11-02 Thread Greg Fitzgerald
while LOC is not perfect, gzip is worse. the gzip change didn't significantly alter the rankings Currently the gzip ratio of C++ to Python is 2.0, which at a glance, wouldn't sell me on a less code argument. Although the rank stayed the same, did the change reduce the magnitude of the victory?

Re: [Haskell-cafe] Elevator pitch for Haskell.

2007-09-04 Thread Greg Fitzgerald
Paul, This page (http://www.npdbd.umn.edu/deliver/elevator.html) has a template for an elevator pitch. I thought I'd try instantiating it for Haskell. For software developers who need to produce highly reliable software at minimum cost... Looks like a good pitch for developers. Here's my

OPTIONS_GHC -iMyDir

2007-07-24 Thread Greg Fitzgerald
I notice that some of GHC's command-line parameters do not work from within the OPTIONS_GHC pragma (6.6.1 on Windows). I can see how that makes sense for some parameters like --make, but what about -i and -v? Is this intentional or a bug? Can't specify the include path: {-# OPTIONS_GHC -iMyDir

Re: [Haskell-cafe] directory tree?

2007-06-22 Thread Greg Fitzgerald
Chad, I can't seem to find anything representing a directory tree Here's my shot. http://hpaste.org/370 Not much different than Tom Moertel's, but grabs the fileSize along the way. -Greg ___ Haskell-Cafe mailing list Haskell-Cafe@haskell.org

Re: 64-bit windows version? (Haskell is a scripting language too!)

2007-06-21 Thread Greg Fitzgerald
each sub-project...have a...Haskell program...building that sub-project I was trying to build something like this recently but hit a roadblock. Rather than execute the script in each directory, I wanted to import it as a module instead. This way you can, for example, pass functions, like a

Re: [Haskell-cafe] embedded build language?

2007-06-15 Thread Greg Fitzgerald
Tomek, If you want to see the code I will try to release it I'm very interested. Thanks, Greg On 6/15/07, Tomasz Zielonka [EMAIL PROTECTED] wrote: On Thu, Jun 14, 2007 at 05:55:46PM -0700, Greg Fitzgerald wrote: Has anyone embedded a build language in Haskell? Something like Rakehttp

[Haskell-cafe] embedded build language?

2007-06-14 Thread Greg Fitzgerald
Has anyone embedded a build language in Haskell? Something like Rakehttp://rake.rubyforge.org/is to Ruby, but in Haskell or any statically-typed functional language. Thanks, Greg ___ Haskell-Cafe mailing list Haskell-Cafe@haskell.org

Re: [Haskell-cafe] Re: [Haskell] Who pays for *.haskell.org machines?

2007-06-13 Thread Greg Fitzgerald
is its funding will be reliable? for example, if we don't get money from Google in 2008 year? Some hosting companies, like http://turtol.com/ offer pay once, keep forever. Would that be an option? Thanks, Greg ___ Haskell-Cafe mailing list

Re: [Haskell-cafe] Idiomatically using lists

2007-06-05 Thread Greg Fitzgerald
) | i == length xs - 1 = (0, last xs : init (tail xs) ++ [head xs]) | otherwise = (i + 1, start ++ [right,left] ++ end) where (start, left:right:end) = splitAt i xs -Greg On 6/4/07, kevin birch [EMAIL PROTECTED] wrote: On 火, 2007-6月-05, at 02:54, Greg Fitzgerald wrote

Re: [Haskell-cafe] Lazy IO and closing of file handles

2007-03-14 Thread Greg Fitzgerald
Pete, mapM fileContentsOfDirectory = mapM_ print . threadEmails . map parseEmail . concat By using the IO monad you've /scheduled/ your first 'print' to occur after your last 'readFile', so every file is opened before the first file is read. I've come across the same problem and

[Haskell-cafe] How to build a generic spreadsheet?

2007-02-23 Thread Greg Fitzgerald
I want to write a program where a user would update a bunch of variables, and everything that depends on those variables (and nothing else) are recalculated. Basically, a spreadsheet, but generalized for any computation. Could someone recommend an elegant way to do it or some good reading

Re: [Haskell-cafe] pythags

2007-02-12 Thread Greg Fitzgerald
Check out Hoogle: http://haskell.org/hoogle/?q=guard import Control.Monad -Greg On 2/12/07, [EMAIL PROTECTED] [EMAIL PROTECTED] wrote: Hello, the Advanced Monads page in the Haskell Wikibook (http://en.wikibooks.org/wiki/Haskell/Advanced_monads) contains the following example of a List

Re: [Haskell-cafe] OT: any haskell-friendly / functional programming friendly comp sci programs? (for a 30s guy who did his undergrad in liberal arts)

2007-02-05 Thread Greg Fitzgerald
Thomas, Here's a good place to start, although I'm not sure how up to date it is: http://haskell.org/haskellwiki/Haskell_in_education I too am interested in an FP-related, higher education in California. Could you please send another post with whatever information you find? Thanks, Greg On

Re: [Haskell-cafe] Suggestions for a hReadUntilStr implementation

2007-02-04 Thread Greg Fitzgerald
, thanks for the link. Cheers, Matt On 2/3/07, Greg Fitzgerald [EMAIL PROTECTED] wrote: Hi Matt, hReadUntilStr - that is, a function that takes a Handle as an input source, a String to match, and a Num a as the number of seconds to wait before returning a (String, Bool) where the String

Re: [Haskell-cafe] Suggestions for a hReadUntilStr implementation

2007-02-03 Thread Greg Fitzgerald
Hi Matt, hReadUntilStr - that is, a function that takes a Handle as an input source, a String to match, and a Num a as the number of seconds to wait before returning a (String, Bool) where the String is all the text read from the Handle until either matching or timing out and the Bool is true

Re: [Haskell-cafe] Simple HTTP lib for Windows?

2007-01-19 Thread Greg Fitzgerald
Alistair, Neil, Brad, Yitzchak, Bjorn, Thanks all for your help. -Greg On 1/19/07, Björn Bringert [EMAIL PROTECTED] wrote: Greg Fitzgerald wrote: I'd like to write a very simple Haskell script that when given a URL, looks up the page, and returns a string of HTML. I don't see an HTTP

[Haskell-cafe] Simple HTTP lib for Windows?

2007-01-17 Thread Greg Fitzgerald
I'd like to write a very simple Haskell script that when given a URL, looks up the page, and returns a string of HTML. I don't see an HTTP library in the standard libs, and the one in Hackage requires Windows machines have GHC and MinGW to be installed and in the PATH. Is there a simple way to

Re: [Haskell-cafe] Shrinking the Prelude: The categorical approach

2006-12-20 Thread Greg Fitzgerald
Wouldn't this raise the same problems monad comprehensions raise? The do-notation isn't specific to IO, yet it is the only thing beginners use it for. Do beginners have noticeably more trouble with the do-notation errors than list comprehension errors? As someone who learned Haskell fairly

Re: [Haskell-cafe] Showing the 1 element tuple

2006-12-19 Thread Greg Fitzgerald
Neil, On Tue, Dec 19, 2006 at 10:41:56PM +, Neil Mitchell wrote: A weird question, what does the 1 element tuple look like? Could tuples be implemented as an HList? singleton = (`hCons` hNil) -Greg ___ Haskell-Cafe mailing list

[Haskell-cafe] Refactoring recklessly

2006-12-12 Thread Greg Fitzgerald
I'd like to be able to reorganize my code and then verify that I didn't change any functionality. That is, the old and new code have precisely the same meaning. Also, I'd like to be able to change a function and verify that efficiency was the only thing affected. Are either of these possible

Re: [Haskell-cafe] Reversing a string of words: C# v Perl V Ruby v Haskell

2006-12-11 Thread Greg Fitzgerald
Hi Steve, On 12/11/06, Steve Downey [EMAIL PROTECTED] wrote: transforming one two three four into four three two one, how could this be done? This is a good problem for Parsechttp://www.cs.uu.nl/%7Edaan/download/parsec/parsec.html : import Text.ParserCombinators.Parsec

[Haskell-cafe] '+++' and 'interleave'

2006-12-04 Thread Greg Fitzgerald
Could ReadP's '+++' (symmetric choice) operator be implemented for all Monads with the 'interleave' function mentioned in Backtracking, Interleaving, and Terminating Monad Transformershttp://portal.acm.org/ft_gateway.cfm?id=1086390type=pdfcoll=GUIDEdl=GUIDECFID=5430836CFTOKEN=76321932? This paper

[Haskell-cafe] Parsec: Where's +++?

2006-12-01 Thread Greg Fitzgerald
Koen Claessen's Parallel Parsing Processes, suggests their parsing combinators have been integrated into Parsec. If so, where is the +++ operator hiding? If not, does anyone know of a parsing library with a choice operator that does breadth-first search? Also, how do I determine what instances

Re: [Haskell-cafe] Parsec: Where's +++?

2006-12-01 Thread Greg Fitzgerald
Text.ParserCombinators.ReadP.(+++) :: ReadP a - ReadP a - ReadP a Wow, fast and complete, Thanks Don!:) Would it make sense to derive instances of Applicable and Alternative for ReadP? Something like this maybe: instance Applicative ReadP where pure = return (*) = ap

Re: [Haskell-cafe] Re: Strictness, order of IO operations: NewCGI HDBC

2006-10-20 Thread Greg Fitzgerald
Does DB.getTables use 'unsafeInterleaveIO'?I would think that if an unsafe operation was *not* used, DB.disconnect could *not* execute before DB.getTables has returned every row.Either way, by the Principle of Least Surprise, I think Tim's original code ought to be made to work, despite not

Re: [Haskell-cafe] Re: Strictness, order of IO operations: NewCGI HDBC

2006-10-20 Thread Greg Fitzgerald
An ugly solution is to explicitly keep a pointer to the next unevaluated entry, advancing it in the interleaved IO operation. A leaky solution is to keep a reference to the list, and force it all. Another way to attack this is asking: Why doesn't the simple solution work? That is, not using

Re: [Haskell-cafe] flip dot

2006-09-28 Thread Greg Fitzgerald
You mean apply the function on the right to the result of the left?Yes.(.) :: a - (a - b) - bx.f == f xPrefix usage:given: (f :: Integer - Char) and (g :: Double - Double - Integer) (foo = .f) == \x - f x(bar = .g) == \x y = g x yfoo :: Double - Double - Charfoo = .g.f How about making . reverse

[Haskell-cafe] flip dot

2006-09-27 Thread Greg Fitzgerald
Since there's talk of removal of the composition operator in Haskell-prime, how about this: Instead of:foo = f . gyou write:foo = .g.fA leading dot would mean, apply all unnamed parameters to the function on the right. A trailing dot would mean, apply the result of the left to the function on the

Re: [Haskell-cafe] automatic instance derivation

2006-08-19 Thread Greg Fitzgerald
well, the best practical way i know is to use Template Haskell / DrIFTThat's too bad. I was hoping we could trivially solve Tim Newsham's XML problem by importing HaXml, automatically deriving Data and Typeable for HaXml's 'Content' data type, and then use 'everywhereM' from

  1   2   >