Using GHC 7.8.3 from the latest Haskell Platform on OS X 10.9.4, the
__GLASGOW_HASKELL__ preprocessor symbol is being set to 708 instead of
783. I'd guess I have some stale files lying from previous versions
GHC or HP, but I can't seem to find them. Any clues?
$ cat wtf.hs
{-# LANGUAGE CPP
, “GHC 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
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
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
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
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?
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
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
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
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
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
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
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
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
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
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
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
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
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
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
___
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
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
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
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
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
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
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?
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
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
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
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
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
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
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
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
1 - 100 of 113 matches
Mail list logo