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
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
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
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
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,
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
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
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
:: (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
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
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?
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
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
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
-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
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
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
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
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:
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
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
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
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
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
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
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
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
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
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,
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
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
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?
___
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
$ 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:
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
!
-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
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
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
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
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
___
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
...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
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
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
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
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
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
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
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
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?
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
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
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
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
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
)
| 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
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
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
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
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
, 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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
How do you automatically derive an instance for a data type defined in an imported module?-- automatic instance derivation directly after type declarationdata Val1 = V1 Int deriving Show-- manual instance derivation can be in separate file
data Val2 = V2 Intinstance Show Val2 where show (V2 i) =
What time on September 14th will the GHC Hackathon begin? I don't need a precise answer, just a quick one. Plus or minus an hour will do.Thanks,Greg
___
Haskell-Cafe mailing list
Haskell-Cafe@haskell.org
is a string, can I get access to that string without using 'runX':
getAttrValue :: String - a
XmlTree StringAre Arrows the wrong tool for this job?Thanks,GregOn 7/14/06, Greg Fitzgerald
[EMAIL PROTECTED] wrote: I'm trying to think of a way to translate this input, to the output below: Input: testfoo
I'm trying to translate this HXT code to use the Arrow 'do' syntax:readWriteDoc :: String - IOSLA (XIOState s) b IntreadWriteDoc path = readDocument [(a_validate, 0)] path
writeDocument [(a_output_encoding, isoLatin1)] -
getErrStatusThis attempt fails to compile:
readWriteDoc :: String -
I have tried. Using just normal lists, I found it difficult to avoid huge space leaks, but once things are working, the end result is easy to reason about.I'm considering giving it another try using Stream Processors or some form of Arrows instead of lists. I think this strategy might allow me to
I'd like to use a tool to automatically install Haskell XML Toolkit and its dependencies. What are my options? How's cabal-get coming?Thanks,Greg
___
Haskell-Cafe mailing list
Haskell-Cafe@haskell.org
http://www.haskell.org/mailman/listinfo/haskell-cafe
big memory leak ... two parsers in sequenceA related question, are these two equivalents?foldl2 f g y z lst = (foldl f y lst, foldl g z lst)foldl2' f g y z lst = foldl (\(i, j) x - (f i x, g j x)) (y, z) lst
If no, is there some strictness that can be added to make them
equivalent? And if so,
Brian, implementing the text buffer for an edit controlJust a few weeks ago I was thinking about a functional way to implement an edit control. I ended up with the code below. The function 'text' takes a stream of user input and returns the text to be displayed.
Rather than using a mutable buffer,
...Anyway, I can't help but think that there might be a happy mediumbetween eager and lazy evaluation.
What I'd love to see is the compiler continue to be call-by-need, but be smart enough to recognize when multiple expressions will all eventually need to be evaluated. A simple example: show (a +
How do I perform multiple computations on a long lazy list without introducing a space leak?Doing a single computation like this works great:
f = show . filter ( 1)But if I do something like this: f lst = show (filter ( 1) lst, filter ( 2) lst)then it looks like GHC won't garbage collect list
hold a part of the data in memory while you show the first one,Here would be a better example then. f lst = show (sum (filter ( 1) lst), sum (filter ( 2) lst))It ought to be *possible* to compute both operations without holding onto any of the list elements.
In the imperative world, you'd say:
Thanks Neil. How do I add in another ~10 computations, or map a list of a 100 computations to the same input?Isn't there a way to do this without one computation having to be aware of the other? This feels like a situation Parsec users would find themselves in all the time. When you have a bunch
88 matches
Mail list logo