Actually it is possible to implement all three evaluation orders
within the same final tagless framework, using the same interpretation
of types and reusing most of the code save the semantics of lam. That
is where the three orders differ, by their own definition.
In call-by-name, we have
Perhaps it would be appropriate to point out the IFIP conference on
exactly that topic, DSL. The conference took place in July, here is
the permanent record:
http://dsl09.blogspot.com/
with pointers to the slides and the discussions.
The panel discussion has debated that very question,
A while ago I moved a project away from using a mix of Cabal and make
to build (Cabal to build the library and make to build the tests) to
using only Cabal. I added a flag and then made a construct like this:
flag BuildTests
Description: Build unit and quickcheck tests.
Default:
On 7 Oct 2009, at 23:39, John Velman wrote:
For anyone following this: The XCode ld script is complex, and has
mac
specific defaults early in the search path specification, and I
probably
don't want to change these. A library in a default path is the wrong
libgmp.[dylib | a].
Is there
To make this work I had to move the 'main-is' outside of the if-else:
executable tests
main-is: Test.hs
hs-source-dirs: test-src src
if flag(BuildTests)
build-depends: test-framework, test-framework-hunit, HUnit,
test-framework-quickcheck2, QuickCheck = 2.1.0.0
Hi,
I'd like to know what are the typing rules used in Haskell (98 is ok).
Specifically, I'd like to know what makes
let i = \x - x in (i True, i 1)
legal, and not
let a = 1 in (a + (1 :: Int), a + (1.0 :: Float))
Is it correct that polymorphic functions can be used polymorphically
(in
minh thu wrote:
Also, I'd like to know why
id id True
is permitted but not
(\f - f f True) id
Because this requires rank-2 types:
Prelude :set -XScopedTypeVariables
Prelude :set -XRank2Types
Prelude (\(f :: forall a. a - a) - f f True) id
True
HTH,
Martijn.
minh thu wrote:
Also, I'd like to know why
id id True
is permitted but not
(\f - f f True) id
If you want to do this, answer the question what is the type of (\f -
f f True)?
You can do this, by the way, using rank-2 types:
{-# LANGUAGE Rank2Types, PatternSignatures #-}
thisIsAlwaysTrue
We have run into an issue that it seems other people have already found but
has apparently not been resolved, yet. It manifests as with the error HTTP
request failed with: Unsupported socket. The problem is described in two
places with different workarounds.
Excerpts from Bryan O'Sullivan's message of Wed Oct 07 23:25:10 +0200 2009:
On Wed, Oct 7, 2009 at 1:59 PM, Michael Mossey m...@alumni.caltech.eduwrote:
My thread about randomness got hijacked so I need to restate my remaining
question here. Is it acceptable to write pure routines that use
On Thu, 2009-10-08 at 09:31 +0100, Magnus Therning wrote:
A while ago I moved a project away from using a mix of Cabal and make
to build (Cabal to build the library and make to build the tests) to
using only Cabal. I added a flag and then made a construct like this:
[..]
Interestingly that
On Thu, 2009-10-08 at 00:37 -0400, Sean McLaughlin wrote:
Hi,
I'm trying to compile some code using Cabal. One of the files has a
CPP directive
#include undefined.h
The file undefined.h is in the same directory as the file with the
directive.
That works fine for me.
I've
2009/10/8 Jochem Berndsen joc...@functor.nl:
minh thu wrote:
Also, I'd like to know why
id id True
is permitted but not
(\f - f f True) id
If you want to do this, answer the question what is the type of (\f -
f f True)?
You can do this, by the way, using rank-2 types:
{-# LANGUAGE
On Thu, Oct 8, 2009 at 11:04 AM, minh thu not...@gmail.com wrote:
Hi,
I'd like to know what are the typing rules used in Haskell (98 is ok).
Specifically, I'd like to know what makes
let i = \x - x in (i True, i 1)
legal, and not
let a = 1 in (a + (1 :: Int), a + (1.0 :: Float))
Is it
2009/10/8 Cristiano Paris fr...@theshire.org:
On Thu, Oct 8, 2009 at 11:04 AM, minh thu not...@gmail.com wrote:
Hi,
I'd like to know what are the typing rules used in Haskell (98 is ok).
Specifically, I'd like to know what makes
let i = \x - x in (i True, i 1)
legal, and not
let a = 1
The reason a gets a single type is the monomorphism restriction (read
the report).
Using NoMonomorphismRestriction your example with a works fine.
On Thu, Oct 8, 2009 at 12:29 PM, Cristiano Paris fr...@theshire.org wrote:
On Thu, Oct 8, 2009 at 11:04 AM, minh thu not...@gmail.com wrote:
Hi,
I'd also like to note that the canonical pronunciation of DSL ends in -izzle.
___
Haskell-Cafe mailing list
Haskell-Cafe@haskell.org
http://www.haskell.org/mailman/listinfo/haskell-cafe
Thanks all!
Thu
2009/10/8 Lennart Augustsson lenn...@augustsson.net:
The reason a gets a single type is the monomorphism restriction (read
the report).
Using NoMonomorphismRestriction your example with a works fine.
On Thu, Oct 8, 2009 at 12:29 PM, Cristiano Paris fr...@theshire.org wrote:
George == George Pollard por...@porg.es writes:
George I'd also like to note that the canonical pronunciation of
George DSL ends in -izzle.
Whose canon?
Interestingly, I have always assumed the canonical pronunciation of
DSSSL was diesel, as JADE stands for JAmes's DSSSL Engine.
I
On 8 Oct 2009, at 00:41, Curt Sampson wrote:
On 2009-10-02 09:03 -0600 (Fri), John A. De Goes wrote:
[Haskell] is missing many key libraries that would be of great
commercial value.
Just out of curiousity, can you give me some examples of what you feel
these are?
Relational database
Hi all,
I'd like to summarize my impressions on the DSL issue, gathered from the
responses to my posts.
It is absolutely amazing, various people have shown here that it is
possible to design languages within haskell that are almost or just as
powerful and safe as haskell itself. It is
Sean Leather leat...@cs.uu.nl writes:
We have run into an issue that it seems other people have already
found but has apparently not been resolved, yet. It manifests as with
the error HTTP request failed with: Unsupported socket. The problem
is described in two places with different
To me, the D and S come in when I'm deciding what to support. The
domain represents the set of primitive operations I want to support. The
specific says that I don't support anything other than those operations.
Consider a language for laying out boolean logic circuits: we want to
implement only
On Thu, Oct 8, 2009 at 12:48 PM, Lennart Augustsson
lenn...@augustsson.net wrote:
The reason a gets a single type is the monomorphism restriction (read
the report).
Using NoMonomorphismRestriction your example with a works fine.
Could you explain why, under NoMonomorphismRestriction, this
On Thu, Oct 08, 2009 at 10:34:07AM +0200, Wouter Swierstra wrote:
On 7 Oct 2009, at 23:39, John Velman wrote:
For anyone following this: The XCode ld script is complex, and has mac
specific defaults early in the search path specification, and I probably
don't want to change these. A
2009/10/8 Cristiano Paris fr...@theshire.org:
On Thu, Oct 8, 2009 at 12:48 PM, Lennart Augustsson
lenn...@augustsson.net wrote:
The reason a gets a single type is the monomorphism restriction (read
the report).
Using NoMonomorphismRestriction your example with a works fine.
Could you
Hi folks,
I am trying to integrate my own preprocessor into a cabal build
process. But there are several points that I get stuck with. Could
someone help me, please?
A simplification of my problem:
I have files Abc.foo and each of them should be transformed into
Abc.hs by calling
I wrote some code to model the keystroke-to-keystroke delay in a person
typing, with pseudorandomness. There are two kinds of delays.. one is a
very small delay as the person reaches for a new key (call this 'reach'
delays), the other is a larger delay that represents a pause to think or
to take a
From Learn You a Haskell (Let it be section):
1. cylinder :: (RealFloat a) = a - a - a
2. cylinder r h =
3. let sideArea = 2 * pi * r * h
4. topArea = pi * r ^2
5. in sideArea + 2 * topArea
===
What's the proper indentation for LET so
Here's a list of libraries that are quite significant to commercial
software development in 2009, but which either do not exist in
Haskell, or if they exist, are hard to find, undocumented, unstable,
or perhaps uncompilable:
* A drop-in comet server, with JavaScript bindings (or
Hello Cristiano,
Thursday, October 8, 2009, 7:14:20 PM, you wrote:
Could you explain why, under NoMonomorphismRestriction, this typechecks:
let a = 1 in (a + (1 :: Int),a + (1 :: Float))
while this not:
foo :: Num a = a - (Int,Float)
foo k = (k + (1 :: Int), k + (1.0 :: Float))
i think
I don't dismiss Haskell in business. I only maintain it's a niche
market.
There are some domains where the infrastructure in more established
languages is minimal, and in such cases, I think Haskell can be more
efficient than those languages.
I should note, too, the the agile
You're running into this problem because you're in a do-block. In a do-
block, all the continuing lines of a single statement in the do-block
must be indented w/r/t to the first line. The cylinder example doesn't
have this issue because it's not in a do-block.
The layout rule (I'm
On Oct 8, 2009, at 11:43 , michael rice wrote:
This doesn't:
import System.Random
main = do
gen - getStdGen
let (randNumber, newGen) = randomR (1,6) gen :: (Int, StdGen)
in putStrLn $ Number is ++ show randNumber
[mich...@localhost ~]$ runhaskell zz.hs
zz.hs:4:2:
The last statement
Exactly, it's things like this that are so frustrating and which
reduce efficiency. In a mature library, you don't need to handle
details like this for yourself.
Regards,
John A. De Goes
N-Brain, Inc.
The Evolution of Collaboration
http://www.n-brain.net|877-376-2724 x 101
On
On Oct 8, 2009, at 11:53 , Brandon S. Allbery KF8NH wrote:
The problem here is that the do construct parses things a bit
differently; if you're at the same indentation level, it inserts a
() on the assumption that the next line is an independent
expression, so you need to indent the in a
Indeed, the types
foo :: forall a . (Num a) = a - (Int, Float)
and
foo :: (forall a . (Num a) = a) - (Int, Float)
are quite different.
The first one say, I (foo) can handle any kind of numeric 'a' you (the
caller) can pick. You (the caller) get to choose exactly what type you
give me.
The
On 08/10/09 04:57, David Menendez wrote:
On Wed, Oct 7, 2009 at 8:29 PM, Michael Mosseym...@alumni.caltech.edu wrote:
In Test.QuickCheck, the type of 'generate' is
generate :: Int - StdGen - Gen a - a
I can't find docs that explain what the Int does. Some docs are here:
Judging
Thanks all,
So, in a do expression
let x = 1
y = 2
etc.
in z = 1 + 2
if bool expr
then
etc.
else
etc.
Is this deviation documented somewhere?
Michael
--- On Thu, 10/8/09, Brandon S. Allbery KF8NH allb...@ece.cmu.edu wrote:
From: Brandon S. Allbery KF8NH
I don't know of any offhand that specifically call it out -- it's a
natural consequence of the layout rule which is described in the
Haskell Report. However, there is at least one ticket in Haskell' to
fix it for if/then/else: http://hackage.haskell.org/trac/haskell-prime/ticket/23
-Ross
On Thu, Oct 8, 2009 at 2:07 PM, Ross Mellgren rmm-hask...@z.odi.ac wrote:
there is at least one ticket in Haskell' to fix it for if/then/else
...and there isn't one for let/in because you can use just let
(without in) inside a do-block. Of course the meanings are different
as in the first case
john:
* Haskell interfaces to Twitter, Facebook, MySpace, Google, etc.
This one is fine:
twitter
hs-twitter library: Haskell binding to the Twitter API
del.icio.us
delicious library: Accessing the del.icio.us APIs from Haskell (v2)
friendfeed
ffeed library and
Some of these are not ready for production use; e.g.: RESTng: RESTng
is still experimental and incomplete. It has no documentation and
doesn't even compile. Sadly typical.
It's a bit of a chicken and egg thing. I'd switch to Haskell in a
commercial setting if there were more good
The IHG (http://industry.haskell.org/) has funded about 6 months worth
of development so far. You can see the status report here:
http://industry.haskell.org/status
Dynamic libraries, GMP-less GHC, and efficient Cabal, all appearing in
the GHC 6.12.
The IHG is designed as a mechanism
I am trying to learn more about concurrent applications in Haskell by
studying an existing a real application source code. I would very much
appreciate if you can recommend an application that you feel has done a good
job in implementing a real time application in Haskell.
Daryoush
dmehrtash:
I am trying to learn more about concurrent applications in Haskell by studying
an existing a real application source code. I would very much appreciate if
you can recommend an application that you feel has done a good job in
implementing a real time application in Haskell.
hmp3
Out of curiosity, why do you think that porting Haskell to the JVM
would make such a large difference? Haskell can already interface
with C libraries; are there really so many commercially vital
libraries that are JVM-only?
Cheers,
Greg
On Oct 8, 2009, at 11:08 AM, John A. De Goes
Yes. C is the language of operating systems and browsers and low-level
system utilities -- not, by and large, the backbone of today's web
applications. Projects written in C/C++ tend to be ignored in favor of
those written in Java (Hypertable versus HBase, for example). There
are
Heinrich Apfelmus wrote:
Alternatively, you can use algebraic data types instead of type classes
to generalize one program to different implementations. For monads, this
can be achieved with
http://hackage.haskell.org/package/MonadPrompt
In particular, the idea is to turn every effect
On Thu, Oct 8, 2009 at 1:42 PM, Andrew Coppin
andrewcop...@btinternet.com wrote:
Heinrich Apfelmus wrote:
Alternatively, you can use algebraic data types instead of type classes
to generalize one program to different implementations. For monads, this
can be achieved with
I'm entering a new number to make a different seed for my generator each time
through the loop, but my resulting numbers are anything but random.
Where am I going wrong?
Michael
=
import System.Random
import Control.Monad(when)
main = do
numberString - getLine
2009/10/8 Andrew U. Frank fr...@geoinfo.tuwien.ac.at:
i have a strange error, which does not occur when i run
runghc Setup.lhs configure
but when i use cabal configure and then build, it occurs.
the error is
Type constructor Control.Exception.Exception used as a class
in the instance
interesting.
the sequences you get are random, but unless you enter a new number that is
really far from the previous one, the probability of getting the same first
random number seems high.
import System.Random
import Control.Monad(when)
main = do
numberString - getLine
when (not $ null
rss2irc is a small app using two communicating threads, and that much works
well. The error handling may be quite ideal.
___
Haskell-Cafe mailing list
Haskell-Cafe@haskell.org
http://www.haskell.org/mailman/listinfo/haskell-cafe
I briefly read about Hugs record system Trex, and at first sight this
was really nice!
I know this question was asked a long time ago already, but are there
any plans to add this extension to GHC?
What about the other compilers, like JHC, UHC, etc?
Is it possible to emulate Trex (lots of other
On Thu, Oct 8, 2009 at 1:15 PM, michael rice nowg...@yahoo.com wrote:
Where am I going wrong?
Your seeds are all extremely close together. The System.Random PRNG takes a
32-bit seed, but your seeds haven't even got a 17-bit range, so you're
supplying approximately 19 parts per million of the
I've put a simple GPipe example (including a screenshot) on the haskellwiki
now, showing off an animated spinning box.
You'll find the page here:
http://www.haskell.org/haskellwiki/GPipe
Later on, I will add more examples, and also some kind of GPipe-tutorial. Hang
in there...
Tobias Bexelius wrote:
I've put a simple GPipe example (including a screenshot) on the
haskellwiki now, showing off an animated spinning box.
Nice to see Data.Vec.LinAlg.Transform3D! That will be a big help. I'm
having fun with GPipe. Thanks for the library!
- Jake
58 matches
Mail list logo