Re: [Haskell-cafe] Alternative name for return

2013-08-07 Thread Richard A. O'Keefe

On 7/08/2013, at 2:10 PM, damodar kulkarni wrote:

 I bet you can find an abundance of C programmers who think that
 strcmp is an intuitive name for string comparison (rather than compression, 
 say).
 
 But at least, 'strcmp' is not a common English language term, to have 
 acquired some unintentional 'intuition' by being familiar with it even in our 
 daily life. The Haskell terms, say, 'return' and 'lift', on the other hand, 
 do have usage in common English, so even a person with _no_ programming 
 background would have acquired some unintentional 'intuition' by being 
 familiar with them.

Lift is - a brand of soft drink, the thing Americans call an elevator, 
a thing put in your shoes seem taller, and a free ride, amongst other things.
As a verb, it can mean to kick something.

To find lift intuitive, you have to be familiar with the *mathematical*
idiom of lifting a value from one space to another via some sort of
injection.  Fair enough, but this *still* counts as an example of
intuitive = familiar, because this is *not* a sense of lift that is
familiar to undergraduate and masters computing students unless they have
taken rather more mathematics papers than most of them have.

If you're familiar with *English* rather than, say, the C family of
programming languages, return isn't _that_ bad, there is certainly
nothing about the word that suggests providing a value.  I once tried
to propose a C-style 'return' statement to some people who were
designing a programming language, before I or they had ever heard of
C, and they flatly rejected it.  Months later I found out that this
was because they were looking for something that did not just resume
the caller but also provided a value, and when I protested that that's
exactly what 'return' did in the languages I proposed stealing from,
they -- being familiar with Fortran -- said that it had never occurred
to them that 'return' could have anything to with providing a value.

It is intuitive has no other discernable meaning than *I* am familiar with 
it,
or something very much like it.

_That's_ the point I want to make.  *Whatever* anyone uses for Haskell's
return, many people are bound to find it unintuitive.  Choose a name
on any grounds but that.



___
Haskell-Cafe mailing list
Haskell-Cafe@haskell.org
http://www.haskell.org/mailman/listinfo/haskell-cafe


Re: [Haskell-cafe] ANNOUNCE: tasty, a new testing framework

2013-08-07 Thread Jan Stolarek
I admit I haven't yet had the time to try out testy, but there's one thing I'm 
curious about. QuickCheck can classify tests:

___
Haskell-Cafe mailing list
Haskell-Cafe@haskell.org
http://www.haskell.org/mailman/listinfo/haskell-cafe


Re: [Haskell-cafe] ANNOUNCE: tasty, a new testing framework

2013-08-07 Thread Jan Stolarek
Sorry, my last email got sent too quickly. Anyway, continuing my thought. So 
QuickCheck can classify tests:

  +++ OK, passed 100 tests (29% Short)

Can tasty display this classification info? That was a thing I missed a lot in 
test-framework and would probably motivate me to switch to tasty.

Janek

- Oryginalna wiadomość -
Od: Roman Cheplyaka r...@ro-che.info
Do: haskell-cafe@haskell.org
Wysłane: wtorek, 6 sierpień 2013 22:51:57
Temat: Re: [Haskell-cafe] ANNOUNCE: tasty, a new testing framework

* John Wiegley jo...@fpcomplete.com [2013-08-06 13:40:50-0500]
  Roman Cheplyaka r...@ro-che.info writes:
 
  I am pleased to announce the first release of tasty, a new testing framework
  for Haskell. It is meant to be a successor to test-framework (which is
  unmaintained).
 
 It would be nice to see a comparison of the various test frameworks and why
 one might select one over another.  I use hspec currently (which also
 integrates with HUnit, QuickCheck, etc.), and couldn't tell at a glance what
 tasty might offer.  And I particularly dislike writing tests inside of a
 gigantic list; I much prefer the monadic style of hspec.

This has been discussed on reddit here:
http://www.reddit.com/r/haskell/comments/1jr8lb/tasty_a_new_testing_framework_successor_to/cbhiz40

Roman

___
Haskell-Cafe mailing list
Haskell-Cafe@haskell.org
http://www.haskell.org/mailman/listinfo/haskell-cafe


___
Haskell-Cafe mailing list
Haskell-Cafe@haskell.org
http://www.haskell.org/mailman/listinfo/haskell-cafe


Re: [Haskell-cafe] Alternative name for return

2013-08-07 Thread Jerzy Karczmarczuk

Richard A. O'Keefe :

Haskell has*trained*  my intuition to
see 'putStrLn Hi' as a pure value; it's not the thing itself that has effects,
but its interpretation by an outer engine, just as my magnetic card key has by
itself no power to open doors, but the magnetic reader that looks at the card
_does_.
I am the last here who would quarrel with Richard O'K., but I firmly 
believe that such reasoning is a Pandora box.


The King, the government, the Pope, etc. have no power, only the 
interpretation of their decrees by outer agents _does_ things.


Saying that the Justice of the country X is lousy is a harmful abuse. 
Our Justice is good, only its interpretation by some incompetent 
traitors gave rise to all these calamitous events.


You see what I mean?... Are we going to switch now to the Mind-Body dilemma?

==

BTW. Saying that 5 is a pure value means only that the whole of the 
underlying system treats it as such. The object 5 couldn't care less. 
It even doesn't know that in some programming language it is equivalent 
to an action which puts it on the evaluation stack.


That's why for me the purity (while teaching I try to avoid this word) 
means simply that whatever you do with the object, it won't fire a 
magic process. As Richard, I do not claim that this is right, but it 
surely facilitated my teaching of Haskell. My students have already more 
than enough of my /philosophie de pacotille/...


Jerzy Karczmarczuk

___
Haskell-Cafe mailing list
Haskell-Cafe@haskell.org
http://www.haskell.org/mailman/listinfo/haskell-cafe


Re: [Haskell-cafe] Alternative name for return

2013-08-07 Thread Alberto G. Corona
One of the surprising things of Haskell is how little effort is done in
order to confer meaning to the names. That happens also in the case of the
mathematical language. Often they have a single letter. The reason is that
their meaning is completely defined by their signature and their
properties. And this is possible because Haskell has a strong and
polymorphic type system. In other languages, either this is not possible or
the libraries have little polymorphism, so the names can be more concrete.


return :: (Monad m) = a - m a

The meaning is in the signature. We can opt between keeping the name as a
short mnemonic of the signature or else we can adhere to the C tradition:

return === monad_m___a__m_a

or the Java Tradition

return
=MonadFactory.liftSomethingSometimesPureButInSomeCasesTheResultIsAlsoPure


2013/8/7 Richard A. O'Keefe o...@cs.otago.ac.nz


 On 7/08/2013, at 2:10 PM, damodar kulkarni wrote:

  I bet you can find an abundance of C programmers who think that
  strcmp is an intuitive name for string comparison (rather than
 compression, say).
 
  But at least, 'strcmp' is not a common English language term, to have
 acquired some unintentional 'intuition' by being familiar with it even in
 our daily life. The Haskell terms, say, 'return' and 'lift', on the other
 hand, do have usage in common English, so even a person with _no_
 programming background would have acquired some unintentional 'intuition'
 by being familiar with them.

 Lift is - a brand of soft drink, the thing Americans call an elevator,
 a thing put in your shoes seem taller, and a free ride, amongst other
 things.
 As a verb, it can mean to kick something.

 To find lift intuitive, you have to be familiar with the *mathematical*
 idiom of lifting a value from one space to another via some sort of
 injection.  Fair enough, but this *still* counts as an example of
 intuitive = familiar, because this is *not* a sense of lift that is
 familiar to undergraduate and masters computing students unless they have
 taken rather more mathematics papers than most of them have.

 If you're familiar with *English* rather than, say, the C family of
 programming languages, return isn't _that_ bad, there is certainly
 nothing about the word that suggests providing a value.  I once tried
 to propose a C-style 'return' statement to some people who were
 designing a programming language, before I or they had ever heard of
 C, and they flatly rejected it.  Months later I found out that this
 was because they were looking for something that did not just resume
 the caller but also provided a value, and when I protested that that's
 exactly what 'return' did in the languages I proposed stealing from,
 they -- being familiar with Fortran -- said that it had never occurred
 to them that 'return' could have anything to with providing a value.

 It is intuitive has no other discernable meaning than *I* am familiar
 with it,
 or something very much like it.

 _That's_ the point I want to make.  *Whatever* anyone uses for Haskell's
 return, many people are bound to find it unintuitive.  Choose a name
 on any grounds but that.



 ___
 Haskell-Cafe mailing list
 Haskell-Cafe@haskell.org
 http://www.haskell.org/mailman/listinfo/haskell-cafe




-- 
Alberto.
___
Haskell-Cafe mailing list
Haskell-Cafe@haskell.org
http://www.haskell.org/mailman/listinfo/haskell-cafe


Re: [Haskell-cafe] Alternative name for return

2013-08-07 Thread Alberto G. Corona
Fine reasoning.

Pure means incorruptible. It means that a pure result can be reused again
and again -like the gold or silver- while an impure result must be
re-created whenever it must be used. The metaphor is natural and I guess
that the use of pure (rather than referential transparent) is informal, but
as unavoidable as useful.  By the way, there are deeper considerations
here: To deal with pure values, like incorruptible stuff, like gold implies
lower information costs and that´s one of the reasons why they are valuable.

In this sense, we can give a positive meaning to unsafePerformIO and change
its name to  purify or  even pasteurize or lyophilize ;)






2013/8/7 Jerzy Karczmarczuk jerzy.karczmarc...@unicaen.fr

  Richard A. O'Keefe :

 Haskell has **trained** my intuition to
 see 'putStrLn Hi' as a pure value; it's not the thing itself that has 
 effects,
 but its interpretation by an outer engine, just as my magnetic card key has by
 itself no power to open doors, but the magnetic reader that looks at the 
 card_does_.

  I am the last here who would quarrel with Richard O'K., but I firmly
 believe that such reasoning is a Pandora box.

 The King, the government, the Pope, etc. have no power, only the
 interpretation of their decrees by outer agents _does_ things.

 Saying that the Justice of the country X is lousy is a harmful abuse. Our
 Justice is good, only its interpretation by some incompetent traitors gave
 rise to all these calamitous events.

 You see what I mean?... Are we going to switch now to the Mind-Body
 dilemma?

 ==

 BTW. Saying that 5 is a pure value means only that the whole of the
 underlying system treats it as such. The object 5 couldn't care less. It
 even doesn't know that in some programming language it is equivalent to an
 action which puts it on the evaluation stack.

 That's why for me the purity (while teaching I try to avoid this word)
 means simply that whatever you do with the object, it won't fire a magic
 process. As Richard, I do not claim that this is right, but it surely
 facilitated my teaching of Haskell. My students have already more than
 enough of my /philosophie de pacotille/...

 Jerzy Karczmarczuk


 ___
 Haskell-Cafe mailing list
 Haskell-Cafe@haskell.org
 http://www.haskell.org/mailman/listinfo/haskell-cafe




-- 
Alberto.
___
Haskell-Cafe mailing list
Haskell-Cafe@haskell.org
http://www.haskell.org/mailman/listinfo/haskell-cafe


Re: [Haskell-cafe] ANNOUNCE: tasty, a new testing framework

2013-08-07 Thread Roman Cheplyaka
It certainly can, but it doesn't do that yet. Should be very easy to
fix, though. Patches are welcome.

Roman

* Jan Stolarek jan.stola...@p.lodz.pl [2013-08-07 10:00:36+0200]
 Sorry, my last email got sent too quickly. Anyway, continuing my thought. So 
 QuickCheck can classify tests:
 
   +++ OK, passed 100 tests (29% Short)
 
 Can tasty display this classification info? That was a thing I missed a lot 
 in test-framework and would probably motivate me to switch to tasty.
 
 Janek
 
 - Oryginalna wiadomość -
 Od: Roman Cheplyaka r...@ro-che.info
 Do: haskell-cafe@haskell.org
 Wysłane: wtorek, 6 sierpień 2013 22:51:57
 Temat: Re: [Haskell-cafe] ANNOUNCE: tasty, a new testing framework
 
 * John Wiegley jo...@fpcomplete.com [2013-08-06 13:40:50-0500]
   Roman Cheplyaka r...@ro-che.info writes:
  
   I am pleased to announce the first release of tasty, a new testing 
   framework
   for Haskell. It is meant to be a successor to test-framework (which is
   unmaintained).
  
  It would be nice to see a comparison of the various test frameworks and why
  one might select one over another.  I use hspec currently (which also
  integrates with HUnit, QuickCheck, etc.), and couldn't tell at a glance what
  tasty might offer.  And I particularly dislike writing tests inside of a
  gigantic list; I much prefer the monadic style of hspec.
 
 This has been discussed on reddit here:
 http://www.reddit.com/r/haskell/comments/1jr8lb/tasty_a_new_testing_framework_successor_to/cbhiz40
 
 Roman
 
 ___
 Haskell-Cafe mailing list
 Haskell-Cafe@haskell.org
 http://www.haskell.org/mailman/listinfo/haskell-cafe
 

___
Haskell-Cafe mailing list
Haskell-Cafe@haskell.org
http://www.haskell.org/mailman/listinfo/haskell-cafe


Re: [Haskell-cafe] ANNOUNCE: tasty, a new testing framework

2013-08-07 Thread Jan Stolarek
I'll add that as an issue on github then. I tried implementing this for 
test-framework and failed - the code was just too complicatd for me. It'll be 
intereseting to see whether tasty has simpler implementation :)

Janek

- Oryginalna wiadomość -
Od: Roman Cheplyaka r...@ro-che.info
Do: Jan Stolarek jan.stola...@p.lodz.pl
DW: haskell-cafe@haskell.org
Wysłane: środa, 7 sierpień 2013 10:56:21
Temat: Re: [Haskell-cafe] ANNOUNCE: tasty, a new testing framework

It certainly can, but it doesn't do that yet. Should be very easy to
fix, though. Patches are welcome.

Roman

* Jan Stolarek jan.stola...@p.lodz.pl [2013-08-07 10:00:36+0200]
 Sorry, my last email got sent too quickly. Anyway, continuing my thought. So 
 QuickCheck can classify tests:
 
   +++ OK, passed 100 tests (29% Short)
 
 Can tasty display this classification info? That was a thing I missed a lot 
 in test-framework and would probably motivate me to switch to tasty.
 
 Janek
 
 - Oryginalna wiadomość -
 Od: Roman Cheplyaka r...@ro-che.info
 Do: haskell-cafe@haskell.org
 Wysłane: wtorek, 6 sierpień 2013 22:51:57
 Temat: Re: [Haskell-cafe] ANNOUNCE: tasty, a new testing framework
 
 * John Wiegley jo...@fpcomplete.com [2013-08-06 13:40:50-0500]
   Roman Cheplyaka r...@ro-che.info writes:
  
   I am pleased to announce the first release of tasty, a new testing 
   framework
   for Haskell. It is meant to be a successor to test-framework (which is
   unmaintained).
  
  It would be nice to see a comparison of the various test frameworks and why
  one might select one over another.  I use hspec currently (which also
  integrates with HUnit, QuickCheck, etc.), and couldn't tell at a glance what
  tasty might offer.  And I particularly dislike writing tests inside of a
  gigantic list; I much prefer the monadic style of hspec.
 
 This has been discussed on reddit here:
 http://www.reddit.com/r/haskell/comments/1jr8lb/tasty_a_new_testing_framework_successor_to/cbhiz40
 
 Roman
 
 ___
 Haskell-Cafe mailing list
 Haskell-Cafe@haskell.org
 http://www.haskell.org/mailman/listinfo/haskell-cafe
 


___
Haskell-Cafe mailing list
Haskell-Cafe@haskell.org
http://www.haskell.org/mailman/listinfo/haskell-cafe


[Haskell-cafe] Hackage upload problem

2013-08-07 Thread Thomas Hallgren
Hi,

I get the following error when I try to upload gf-3.5.tar.gz [1] to Hackage.

400 Error in upload
could not extract gf-3.5 directory from gf-3.5.tar.gz


I get the same error when I try to Check the previous version, gf-3.4.tar.gz
[2], which was uploaded without problems 6 months ago [3], so it seems that
something has changed on the server.

Does anyone know what it could be that is going wrong? Is there a way to get a
more informative error message?

Thomas H


[1] http://www.grammaticalframework.org/download/gf-3.5.tar.gz
[2] http://www.grammaticalframework.org/download/gf-3.4.tar.gz
[3] http://hackage.haskell.org/package/gf-3.4


___
Haskell-Cafe mailing list
Haskell-Cafe@haskell.org
http://www.haskell.org/mailman/listinfo/haskell-cafe


Re: [Haskell-cafe] Alternative name for return

2013-08-07 Thread damodar kulkarni
 It is intuitive has no other discernable meaning than *I* am familiar
 with it, or something very much like it.


Thanks for pointing this out, I was not able to point my thoughts in this
direction.

But I still have a doubt: if my familiarity doesn't come in the form of
some analogy, then my acquired intuition about it would be of little
use. In fact, it may well be misleading. Am I correct?

If so, the best we can hope is the name-giver to describe, as explicitly as
possible, the analogy (sort of a thought process) he/she had had in
his/her mind while giving a particular name to a given concept?
It will help others to share *at least some amount of* of intuition
(analogy) the originator had had.

Are such thoughts documented in this case?

Thanks and regards,
-Damodar Kulkarni


On Wed, Aug 7, 2013 at 11:37 AM, Richard A. O'Keefe o...@cs.otago.ac.nzwrote:


 On 7/08/2013, at 2:10 PM, damodar kulkarni wrote:

  I bet you can find an abundance of C programmers who think that
  strcmp is an intuitive name for string comparison (rather than
 compression, say).
 
  But at least, 'strcmp' is not a common English language term, to have
 acquired some unintentional 'intuition' by being familiar with it even in
 our daily life. The Haskell terms, say, 'return' and 'lift', on the other
 hand, do have usage in common English, so even a person with _no_
 programming background would have acquired some unintentional 'intuition'
 by being familiar with them.

 Lift is - a brand of soft drink, the thing Americans call an elevator,
 a thing put in your shoes seem taller, and a free ride, amongst other
 things.
 As a verb, it can mean to kick something.

 To find lift intuitive, you have to be familiar with the *mathematical*
 idiom of lifting a value from one space to another via some sort of
 injection.  Fair enough, but this *still* counts as an example of
 intuitive = familiar, because this is *not* a sense of lift that is
 familiar to undergraduate and masters computing students unless they have
 taken rather more mathematics papers than most of them have.

 If you're familiar with *English* rather than, say, the C family of
 programming languages, return isn't _that_ bad, there is certainly
 nothing about the word that suggests providing a value.  I once tried
 to propose a C-style 'return' statement to some people who were
 designing a programming language, before I or they had ever heard of
 C, and they flatly rejected it.  Months later I found out that this
 was because they were looking for something that did not just resume
 the caller but also provided a value, and when I protested that that's
 exactly what 'return' did in the languages I proposed stealing from,
 they -- being familiar with Fortran -- said that it had never occurred
 to them that 'return' could have anything to with providing a value.

 It is intuitive has no other discernable meaning than *I* am familiar
 with it,
 or something very much like it.

 _That's_ the point I want to make.  *Whatever* anyone uses for Haskell's
 return, many people are bound to find it unintuitive.  Choose a name
 on any grounds but that.



___
Haskell-Cafe mailing list
Haskell-Cafe@haskell.org
http://www.haskell.org/mailman/listinfo/haskell-cafe


Re: [Haskell-cafe] Alternative name for return

2013-08-07 Thread Donn Cave
quoth Richard A. O'Keefe,
...
 If you're familiar with *English* rather than, say, the C family of
 programming languages, return isn't _that_ bad, there is certainly
 nothing about the word that suggests providing a value.

The RFC822 headers of your email suggest that you use a Macintosh computer,
so apart from the apparently disputable question of whether you're familiar
with English, you have the same online dictionary as mine.  Second definition:
give, put, or send (something) back to a place or person, with examples
she returned his kiss, usage from tennis and football, verdicts, etc.
Third definition:  yield or make a profit, fourth (re)elect a person or party.
Return is all about providing a value, in English.

When a term like return is used in a computer programming language in
a sense that confounds any prior expectation based on English or other
programming languages, that's the opposite of intuitive.  It is what
it is, and it's silly to talk about changing it at this point, but that
doesn't mean that we have to turn the notion of intuitive on its head.

Donn

___
Haskell-Cafe mailing list
Haskell-Cafe@haskell.org
http://www.haskell.org/mailman/listinfo/haskell-cafe


Re: [Haskell-cafe] Alternative name for return

2013-08-07 Thread David Thomas
 2. This is the only way you can evaluate your pure value, and because of
 the monadic chaining, you cannot do it twice, you cannot re-evaluate it.


I'm sure there is a sense in which this is true, but I'm not seeing it.
How would you describe what's going on here?

twice :: IO () - IO ()
twice x = x  x

main = twice $ putStrLn foo

I would call that evaluating x twice (incidentally creating two separate
evaluations of one pure action description), but I'd like to better see
your perspective here.



Regarding this issue generally, I feel like everyone's climbed on their
particular war horses when someone sounded the PURITY trumpet, when *I
don't think this is the kind of purity Applicative is talking about* -
different things can be pure in different ways.
___
Haskell-Cafe mailing list
Haskell-Cafe@haskell.org
http://www.haskell.org/mailman/listinfo/haskell-cafe


Re: [Haskell-cafe] Hackage upload problem

2013-08-07 Thread Duncan Coutts
On Wed, 2013-08-07 at 14:32 +0200, Thomas Hallgren wrote:
 Hi,
 
 I get the following error when I try to upload gf-3.5.tar.gz [1] to Hackage.
 
   400 Error in upload
 could not extract gf-3.5 directory from gf-3.5.tar.gz
 
 
 I get the same error when I try to Check the previous version, gf-3.4.tar.gz
 [2], which was uploaded without problems 6 months ago [3], so it seems that
 something has changed on the server.
 
 Does anyone know what it could be that is going wrong? Is there a way to get a
 more informative error message?

You're welcome to try uploading it to the new-hackage.haskell.org and
see if that gives a more informative error message. If it's a poor error
message there then we can fix that.

Duncan


___
Haskell-Cafe mailing list
Haskell-Cafe@haskell.org
http://www.haskell.org/mailman/listinfo/haskell-cafe


Re: [Haskell-cafe] Alternative name for return

2013-08-07 Thread David Thomas
Return is all about providing a value *when used transitively*.  When used
intransitively, it's about moving yourself.  There's nothing about the
latter sense that implies providing a value.

Which is not to say Richard did not overstate the case - return needn't
necessarily (in English) suggest providing a value would be more correct,
but isn't that far from a charitable interpretation of what he'd said.


On Wed, Aug 7, 2013 at 7:56 AM, Donn Cave d...@avvanta.com wrote:

 quoth Richard A. O'Keefe,
 ...
  If you're familiar with *English* rather than, say, the C family of
  programming languages, return isn't _that_ bad, there is certainly
  nothing about the word that suggests providing a value.

 The RFC822 headers of your email suggest that you use a Macintosh computer,
 so apart from the apparently disputable question of whether you're familiar
 with English, you have the same online dictionary as mine.  Second
 definition:
 give, put, or send (something) back to a place or person, with examples
 she returned his kiss, usage from tennis and football, verdicts, etc.
 Third definition:  yield or make a profit, fourth (re)elect a person or
 party.
 Return is all about providing a value, in English.

 When a term like return is used in a computer programming language in
 a sense that confounds any prior expectation based on English or other
 programming languages, that's the opposite of intuitive.  It is what
 it is, and it's silly to talk about changing it at this point, but that
 doesn't mean that we have to turn the notion of intuitive on its head.

 Donn

 ___
 Haskell-Cafe mailing list
 Haskell-Cafe@haskell.org
 http://www.haskell.org/mailman/listinfo/haskell-cafe

___
Haskell-Cafe mailing list
Haskell-Cafe@haskell.org
http://www.haskell.org/mailman/listinfo/haskell-cafe


Re: [Haskell-cafe] Contracts

2013-08-07 Thread Duncan Coutts
On Mon, 2013-08-05 at 23:13 -0400, Julian Arni wrote:
 I've come across interesting papers - and old, sometimes inaccessible,
 repositories - related contracts in Haskell (Dana Xu and SPJ's papers;
 haskellcontracts and the Programatica Project). And then some newer,
 apparently not quite mature projects (Dan Rosen's repositories, for
 instance). Is there anything in between - mature, but not abandoned?

We did an implementation of the contracts idea for one of our customers
which is available (under AGPL or commercial license) on github:

https://github.com/netrium/Netrium

-- 
Duncan Coutts, Haskell Consultant
Well-Typed LLP, http://www.well-typed.com/


___
Haskell-Cafe mailing list
Haskell-Cafe@haskell.org
http://www.haskell.org/mailman/listinfo/haskell-cafe


Re: [Haskell-cafe] Hackage upload problem

2013-08-07 Thread Thomas Hallgren
On 2013-08-07 17:06 , Duncan Coutts wrote:
 On Wed, 2013-08-07 at 14:32 +0200, Thomas Hallgren wrote:
 Hi,

 I get the following error when I try to upload gf-3.5.tar.gz [1] to Hackage.

  400 Error in upload
 could not extract gf-3.5 directory from gf-3.5.tar.gz


 I get the same error when I try to Check the previous version, gf-3.4.tar.gz
 [2], which was uploaded without problems 6 months ago [3], so it seems that
 something has changed on the server.

 Does anyone know what it could be that is going wrong? Is there a way to get 
 a
 more informative error message?
 
 You're welcome to try uploading it to the new-hackage.haskell.org and
 see if that gives a more informative error message. If it's a poor error
 message there then we can fix that.
 
 Duncan
 


new-hackage.haskell.org didn't work either, it says:

Reached disk quota of 100 bytes.

gf-3.5.tar.gz is a lot bigger than 100 bytes. I am guessing this restriction
only applies on new-hackage, and that there is a different problem on old 
hackage...

Thomas H


___
Haskell-Cafe mailing list
Haskell-Cafe@haskell.org
http://www.haskell.org/mailman/listinfo/haskell-cafe


Re: [Haskell-cafe] Contracts

2013-08-07 Thread Colin Adams
I thought the OP was talking about software contracts (as in Eiffel /
Design By Contract ).

Liquid Haskell is interesting in this respect. Though I doubt if it
qualifies as mature.


On 7 August 2013 16:15, Duncan Coutts dun...@well-typed.com wrote:

 On Mon, 2013-08-05 at 23:13 -0400, Julian Arni wrote:
  I've come across interesting papers - and old, sometimes inaccessible,
  repositories - related contracts in Haskell (Dana Xu and SPJ's papers;
  haskellcontracts and the Programatica Project). And then some newer,
  apparently not quite mature projects (Dan Rosen's repositories, for
  instance). Is there anything in between - mature, but not abandoned?

 We did an implementation of the contracts idea for one of our customers
 which is available (under AGPL or commercial license) on github:

 https://github.com/netrium/Netrium

 --
 Duncan Coutts, Haskell Consultant
 Well-Typed LLP, http://www.well-typed.com/


 ___
 Haskell-Cafe mailing list
 Haskell-Cafe@haskell.org
 http://www.haskell.org/mailman/listinfo/haskell-cafe

___
Haskell-Cafe mailing list
Haskell-Cafe@haskell.org
http://www.haskell.org/mailman/listinfo/haskell-cafe


Re: [Haskell-cafe] Contracts

2013-08-07 Thread Duncan Coutts
On Wed, 2013-08-07 at 17:48 +0100, Colin Adams wrote:
 I thought the OP was talking about software contracts (as in Eiffel /
 Design By Contract ).

Oh oops, you're right. SPJ has too many papers about contracts! :-)

 On 7 August 2013 16:15, Duncan Coutts dun...@well-typed.com wrote:
 
  On Mon, 2013-08-05 at 23:13 -0400, Julian Arni wrote:
   I've come across interesting papers - and old, sometimes inaccessible,
   repositories - related contracts in Haskell (Dana Xu and SPJ's papers;
   haskellcontracts and the Programatica Project). And then some newer,
   apparently not quite mature projects (Dan Rosen's repositories, for
   instance). Is there anything in between - mature, but not abandoned?
 
  We did an implementation of the contracts idea for one of our customers
  which is available (under AGPL or commercial license) on github:
 
  https://github.com/netrium/Netrium
 
  --
  Duncan Coutts, Haskell Consultant
  Well-Typed LLP, http://www.well-typed.com/
 
 
  ___
  Haskell-Cafe mailing list
  Haskell-Cafe@haskell.org
  http://www.haskell.org/mailman/listinfo/haskell-cafe
 


-- 
Duncan Coutts, Haskell Consultant
Well-Typed LLP, http://www.well-typed.com/


___
Haskell-Cafe mailing list
Haskell-Cafe@haskell.org
http://www.haskell.org/mailman/listinfo/haskell-cafe


[Haskell-cafe] Installing wxHaskel on Snow Leopard

2013-08-07 Thread Eduardo Sato
Hello, guys. Has anybody tried to install wxhaskell on Snow Leopard?

I followed these instructions: http://www.haskell.org/haskellwiki/WxHaskell/Mac 
, but got an error: 

src/haskell/Graphics/UI/WXCore/WxcClassesAL.hs:13085:1:
Unacceptable argument type in foreign declaration: CInt
When checking declaration:
  foreign import ccall safe static wxLogWindow_Create wxLogWindow_Create
:: Ptr (TWindow a)
   - CWString - CBool - CBool - IO (Ptr (TLogWindow ()))

src/haskell/Graphics/UI/WXCore/WxcClassesAL.hs:13085:1:
Unacceptable argument type in foreign declaration: CInt
When checking declaration:
  foreign import ccall safe static wxLogWindow_Create wxLogWindow_Create
:: Ptr (TWindow a)
   - CWString - CBool - CBool - IO (Ptr (TLogWindow ()))
Failed to install wxcore-0.90.0.3
cabal: Error: some packages failed to install:
wx-0.90.0.1 depends on wxcore-0.90.0.3 which failed to install.
wxcore-0.90.0.3 failed during the building phase. The exception was:
ExitFailure 1

http://lpaste.net/91634

I'm using ghc 7.6.3. I've heard the above problems are related to GHC 7.6.3 
being more pedantic about FFI declarations. Is there any way around it?

Thanks 

-- 
Eduardo Sato

___
Haskell-Cafe mailing list
Haskell-Cafe@haskell.org
http://www.haskell.org/mailman/listinfo/haskell-cafe


Re: [Haskell-cafe] Alternative name for return

2013-08-07 Thread Joe Quinn

On 8/7/2013 11:00 AM, David Thomas wrote:

twice :: IO () - IO ()
twice x = x  x

I would call that evaluating x twice (incidentally creating two 
separate evaluations of one pure action description), but I'd like to 
better see your perspective here.


x is only evaluated once, but /executed/ twice. For IO, that means 
magic. For other types, it means different things. For Identity, twice = id!
___
Haskell-Cafe mailing list
Haskell-Cafe@haskell.org
http://www.haskell.org/mailman/listinfo/haskell-cafe


Re: [Haskell-cafe] Alternative name for return

2013-08-07 Thread Bardur Arantsson
On 2013-08-07 22:38, Joe Quinn wrote:
 On 8/7/2013 11:00 AM, David Thomas wrote:
 twice :: IO () - IO ()
 twice x = x  x

 I would call that evaluating x twice (incidentally creating two
 separate evaluations of one pure action description), but I'd like to
 better see your perspective here.
 
 x is only evaluated once, but /executed/ twice. For IO, that means
 magic. For other types, it means different things. For Identity, twice =
 id!
 

Your point being? x is the same thing regardless of how many times you
run it.




___
Haskell-Cafe mailing list
Haskell-Cafe@haskell.org
http://www.haskell.org/mailman/listinfo/haskell-cafe


Re: [Haskell-cafe] Haskell Platform and Leksah on Windows

2013-08-07 Thread Albert Y. C. Lai

On 13-08-07 01:18 AM, Mihai Maruseac wrote:

Anyway, he blogged about his problems at
http://dorinlazar.ro/haskell-platform-windows-crippled/ and I'm sure
that we can work on fixing some of them.


To learn Haskell on Windows, and with Haskell Platform already 
installed, it is very easy and KISS to just add a text editor (even 
notepad will do for a while), and start experimenting using ghci. 
Haskell Platform is not cripplied. The next Windows user may find it 
just fine.


___
Haskell-Cafe mailing list
Haskell-Cafe@haskell.org
http://www.haskell.org/mailman/listinfo/haskell-cafe


Re: [Haskell-cafe] Alternative name for return

2013-08-07 Thread Jerzy Karczmarczuk

Bardur Arantsson comments the comment of Joe Quinn:

On 8/7/2013 11:00 AM, David Thomas wrote:

twice :: IO () - IO ()
twice x = x  x

I would call that evaluating x twice (incidentally creating two
separate evaluations of one pure action description), but I'd like to
better see your perspective here.


x is only evaluated once, but/executed/  twice. For IO, that means
magic. For other types, it means different things. For Identity, twice =
id!


Your point being? x is the same thing regardless of how many times you
run it.


What do you mean by the same thing? You cannot compare 'them' in any 
reasonable sense.


This, the impossibility to check putStr c == putStr c, is btw, a 
refutation of the claim by Tom Ellis that you can do even less with (). 
The void object is an instance of the Eq and Ord classes. And of Show as 
well.


You make the distinction between evaluate, and  execute or run, 
etc. This is not functional. Your program doesn't run anything, it 
applies (=) (or equivalent) to an IO (...) object. This is the only 
practical evaluation of it, otherwise it can  be passed (or duplicated 
as above). But you cannot apply bind twice to the same instance of it 
(in fact, as I said above, the same instance  is a bit suspicious 
concept...).


The running or execution takes place outside of your program. In 
such a way Richard O'Keefe and I converge... That's why I say that the 
concept of purity is meaningless in the discussed context. It is a kind 
of counterfeit notion, inherited from pure functions to something 
which belongs to two different worlds.


Jerzy Karczmarczuk

PS. I believe that some impure remarks about the familiarity of X or Y 
with English do not belong to this forum.



___
Haskell-Cafe mailing list
Haskell-Cafe@haskell.org
http://www.haskell.org/mailman/listinfo/haskell-cafe


Re: [Haskell-cafe] Alternative name for return

2013-08-07 Thread Richard A. O'Keefe

On 7/08/2013, at 9:17 PM, Jerzy Karczmarczuk wrote:
 I am the last here who would quarrel with Richard O'K., but I firmly believe 
 that such reasoning is a Pandora box. 
 
 The King, the government, the Pope, etc. have no power, only the 
 interpretation of their decrees by outer agents _does_ things.

I regard the analogy as flawed because my sovereign
[Her Majesty Elizabeth the Second, by the Grace of God Queen of New Zealand
 and Her Other Realms and Territories, Head of the Commonwealth, Defender
 of the Faith/Her Majesty Elizabeth the Second, by the Grace of God, Queen
 of Australia and Her other Realms and Territories, Head of the Commonwealth
 (I have dual citizenship, so she gets to be my Queen twice)
] is a moral agent, so is the Bishop of Rome, and so are my Prime Ministers
John Key and Kevin Rudd.  These people are agents in their own right; they
and the people who follow their orders are _things of the same kind_.

Maybe the analogy isn't that flawed. Julia Gillard found out that when
enough people stopped saying yes to her, her power disappeared like
morning dew.  The official teaching of the Roman church is that
contraception is not OK, yet the 2013 birth rates for Spain and Portugal
were about 1.5.  It really does look as though the Pope's power does rest
on the consent of the people: if people don't like what he tells them,
they don't do it.

I leave it to other readers with a misspent youth to supply the name and title
of the Science Fiction story in which FIW is the political key.

Analogies are helpful if they help.  Comparing IO 'actions' to plain old data
like a magnetic card key and the Haskell environment to the reader helped _me_;
if it helps no-one else, forget it.


___
Haskell-Cafe mailing list
Haskell-Cafe@haskell.org
http://www.haskell.org/mailman/listinfo/haskell-cafe


Re: [Haskell-cafe] Alternative name for return

2013-08-07 Thread Richard A. O'Keefe

On 8/08/2013, at 2:09 AM, damodar kulkarni wrote:
 Thanks for pointing this out, I was not able to point my thoughts in this 
 direction.
 
 But I still have a doubt: if my familiarity doesn't come in the form of some 
 analogy, then my acquired intuition about it would be of little use. In 
 fact, it may well be misleading. Am I correct?

Very much so.  This is why I despise, detest, and loathe as abominations
programming languages in which string concatenation is written +.
(If you want a binary operation which is associative and has an identity
but doesn't commute, the product lies ready to hand, and the repeated
product (exponentiation) is actually _useful_ for strings.  It's still
better to use a non-arithmetic operator, as PL/I, Fortran, Ada, and Haskell do.)

 If so, the best we can hope is the name-giver to describe, as explicitly as 
 possible, the analogy (sort of a thought process) he/she had had in his/her 
 mind while giving a particular name to a given concept?

Complete agreement from me.

For what it's worth, return can mean to shift back to a previous topic,
so it's not _that_ crazy for when you've switched from a monadic context
to a pure context and are now switching back.


___
Haskell-Cafe mailing list
Haskell-Cafe@haskell.org
http://www.haskell.org/mailman/listinfo/haskell-cafe


Re: [Haskell-cafe] Alternative name for return

2013-08-07 Thread Timon Gehr

On 08/08/2013 01:19 AM, Jerzy Karczmarczuk wrote:

Bardur Arantsson comments the comment of Joe Quinn:

On 8/7/2013 11:00 AM, David Thomas wrote:

twice :: IO () - IO ()
twice x = x  x

I would call that evaluating x twice (incidentally creating two
separate evaluations of one pure action description), but I'd like to
better see your perspective here.


x is only evaluated once, but/executed/  twice. For IO, that means
magic. For other types, it means different things. For Identity, twice =
id!


Your point being? x is the same thing regardless of how many times you
run it.


What do you mean by the same thing? You cannot compare 'them' in any
reasonable sense.
...


http://en.wikipedia.org/wiki/Identity_of_indiscernibles

(He is reasoning _about_ the language and not _within_ the language 
because Haskell does not support very powerful reasoning internally.)



...
You make the distinction between evaluate,


Which essentially means applying reduction rules to an expression until 
the result is a value.



and  execute or run, etc. This is not functional.


How would you know?


Your program doesn't run anything, it
applies (=) (or equivalent) to an IO (...) object. This is the only
practical evaluation of it, otherwise it can  be passed (or duplicated
as above). But you cannot apply bind twice to the same instance of it
(in fact, as I said above, the same instance  is a bit suspicious
concept...).
...


Indeed, but you didn't say that above.


The running or execution takes place outside of your program. In
such a way Richard O'Keefe and I converge... That's why I say that the
concept of purity is meaningless in the discussed context.


Not meaningless, but redundant. The point of having a purely functional 
programming language is to have reasoning based on purity be universally 
applicable.



It is a kind of counterfeit notion, inherited from pure functions to something
which belongs to two different worlds.
...


'putStr c' is a pure value.

On the other hand:

'unsafePerformIO (putStr c)' is not a pure value.

(But this expression does not exist in standard Haskell. unsafePerformIO 
unquotes the action. You may be confusing the quoted and unquoted 
versions.)



___
Haskell-Cafe mailing list
Haskell-Cafe@haskell.org
http://www.haskell.org/mailman/listinfo/haskell-cafe


Re: [Haskell-cafe] Alternative name for return

2013-08-07 Thread Richard A. O'Keefe

On 8/08/2013, at 2:56 AM, Donn Cave wrote:
 The RFC822 headers of your email suggest that you use a Macintosh computer,
 so apart from the apparently disputable question of whether you're familiar
 with English, you have the same online dictionary as mine.

My department has an electronic subscription to the OED.

 Second definition:
 give, put, or send (something) back to a place or person, with examples
 she returned his kiss, usage from tennis and football, verdicts, etc.
 Third definition:  yield or make a profit, fourth (re)elect a person or 
 party.
 Return is all about providing a value, in English.

Check the OED.  Most of its meaning are about _turning back_,
_resuming_, _reverting_.  Yielding or making a profit is not at
all about providing a value, but about money going out AND
COMING BACK.  It's the coming back part that makes it a return.

value occurs twice in OED 'return, v.1, in neither case
referring to providing a value.
OED re-turn, v.2 has value once, again not referring to
providing a value (in fact, to detecting possible theft).
OED return, n has the fact or an instance of bringing value
in exchange for effort or investment, where the salient part
is IN EXCHANGE FOR:  effort going out, value COMING BACK.
There are two other similar senses, out of I don't know how
many senses (because I lost count after 80).

A return can be a reply, answer or retort (as in the Fool's
Marry, it was a sharp retort in one of the Discworld novels,
when an alchemist's vessel exploded), a summary of a [cricket]
play's bowling or batting performance, a response to a demand,
a wing or side of a building, or a side street, among many
other things.

In all of the senses, the underlying idea is not provision of a
value, but going, turning, or bending back.

 When a term like return is used in a computer programming language in
 a sense that confounds any prior expectation based on English or other
 programming languages, that's the opposite of intuitive.

OK, so when in the past someone met RETURN in their second programming
language, what had their experience taught them to expect?

ISO/IEC 1989:20xx CD 1.2 (E)

14.9.32 RETURN statement

The RETURN statement obtains either sorted records from the final
phase of a sort operation or merged records during a merge operation.

14.9.32.1 General format

RETURN file-name-1 RECORD [ INTO identifier-1 ]
   AT END imperative-statement-1
[ NOT AT END imperative-statement-2 ]
  [ END-RETURN ]

This is a somewhat more elaborate form of a statement which has been
present in COBOL since at least 1974 and probably longer.  The latest
estimate I've seen is that four thousand million lines of new COBOL
are added every year.

Operationally, the COBOL RETURN statement is more like a READ than
anything else.




___
Haskell-Cafe mailing list
Haskell-Cafe@haskell.org
http://www.haskell.org/mailman/listinfo/haskell-cafe


[Haskell-cafe] ANN: Monad.Reader Issue 22

2013-08-07 Thread Edward Z. Yang
I am pleased to announce that Issue 22 of the Monad Reader is now available.

http://themonadreader.files.wordpress.com/2013/08/issue22.pdf

Issue 22 consists of the following two articles:

  * Generalized Algebraic Data Types in Haskell by Anton Dergunov
  * Error Reporting Parsers: a Monad Transformer Approach by Matt Fenwick and 
Jay Vyas
  * Two Monoids for Approximating NP-Complete Problems by Mike Izbicki

Feel free to browse the source files. You can check out the entire repository 
using Git:

git clone https://github.com/ezyang/tmr-issue22.git

If you’d like to write something for Issue 23, please get in touch!

Cheers,
Edward

___
Haskell-Cafe mailing list
Haskell-Cafe@haskell.org
http://www.haskell.org/mailman/listinfo/haskell-cafe


[Haskell-cafe] Haskell Weekly News: Issue 275

2013-08-07 Thread Daniel Santa Cruz
Welcome to issue 275 of the HWN, an issue covering crowd-sourced bits
of information about Haskell from around the web. This issue covers the
week of July 28 to August 3, 2013.

Quotes of the Week

   * littlecalculist: combinatorics. n. math's way of punishing you for
 failing to use abstraction.

   * dmwit: ?let instance Num Bool where (+) = (/=); (*) = ();
 negate = id; abs = id; signum = id; fromInteger = odd

   * edwardk: clearly it should be \x - x $ do f . g $ x. do is a
 magical () killing machine

   * dmwit: Type families are not injective. Your first three
 inscrutable error messages with type families in them will be
 because you don't understand this rule.

   * elliott: halting problem, n. the property which makes stating
 anything about programs impossible, according to at least one
 person in any room

   * carmack: Everything that is syntactically legal that the compiler
 will accept will eventually wind up in your codebase.

Top Reddit Stories

   * John Carmack talking at length about Haskell in his
 QuakeCon Keynote speech (live)
 Domain: twitch.tv, Score: 105, Comments: 47
 On Reddit: [1] http://goo.gl/1g1zqD
 Original: [2] http://goo.gl/C17ci8

   * SPJ: GHC's Glorious future
 Domain: haskell.org, Score: 79, Comments: 16
 On Reddit: [3] http://goo.gl/97DGuc
 Original: [4] http://goo.gl/YAY6wC

   * There's a massive gap between the average and expert Haskeller.
 How do I bridge that gap?
 Domain: self.haskell, Score: 73, Comments: 53
 On Reddit: [5] http://goo.gl/Y3jEoa
 Original: [6] http://goo.gl/Y3jEoa

   * Getting Started With GHC Hacking
 Domain: dagit.github.io, Score: 64, Comments: 2
 On Reddit: [7] http://goo.gl/ZwHVpm
 Original: [8] http://goo.gl/ljhyff

   * Extensible Effects: An Alternative to Monad Transformers
 Domain: cs.indiana.edu, Score: 63, Comments: 47
 On Reddit: [9] http://goo.gl/2JqImi
 Original: [10] http://goo.gl/zq5klw

   * The Intel Labs Haskell Research Compiler [pdf]
 Domain: leafpetersen.com, Score: 55, Comments: 19
 On Reddit: [11] http://goo.gl/wRQs7E
 Original: [12] http://goo.gl/2eZhEX

   * Goto in Haskell
 Domain: self.haskell, Score: 36, Comments: 34
 On Reddit: [13] http://goo.gl/pelEJo
 Original: [14] http://goo.gl/pelEJo

   * The Algebra of Algebraic Data Type
 Domain: chris-taylor.github.io, Score: 35, Comments: 3
 On Reddit: [15] http://goo.gl/PPi0M1
 Original: [16] http://goo.gl/xE78Ko

   * Functors and monads for analyzing data
 Domain: izbicki.me, Score: 32, Comments: 16
 On Reddit: [17] http://goo.gl/42ux1T
 Original: [18] http://goo.gl/LAJ7ti

   * Why use _ -?
 Domain: self.haskell, Score: 31, Comments: 24
 On Reddit: [19] http://goo.gl/QpGPP1
 Original: [20] http://goo.gl/QpGPP1

   * CIS 194: Introduction to Haskell (Spring 2013)
 Domain: cis.upenn.edu, Score: 30, Comments: 3
 On Reddit: [21] http://goo.gl/9zHuXb
 Original: [22] http://goo.gl/cNyEOT

   * The Commutative monad
 Domain: gelisam.blogspot.ca, Score: 30, Comments: 41
 On Reddit: [23] http://goo.gl/kDVTrl
 Original: [24] http://goo.gl/mTCHL0

   * FRP GUI - reactive-banana + threepenny-gui = awesome
 Domain: apfelmus.nfshost.com, Score: 30, Comments: 11
 On Reddit: [25] http://goo.gl/xu91UA
 Original: [26] http://goo.gl/9Vu6ng


Top StackOverflow Questions

   * Monad Stack Penetration Classes with Free/Operational Monad
Transformers?
 votes: 16, answers: 1
 Read on SO: [27] http://goo.gl/t4F6kd

   * Haskell reexport everything
 votes: 12, answers: 1
 Read on SO: [28] http://goo.gl/7HQCVC

   * What are the main differences between Scala and Frege
 (in programming paradigms)?
 votes: 11, answers: 2
 Read on SO: [29] http://goo.gl/TRhjDB

   * If a thunk results in an exception, is the exception kept as the
 result of the thunk?
 votes: 10, answers: 1
 Read on SO: [30] http://goo.gl/rPSd6J

   * Check if import is redundant
 votes: 9, answers: 1
 Read on SO: [31] http://goo.gl/jEqBnt

   * Haskell Parser Combinators
 votes: 9, answers: 1
 Read on SO: [32] http://goo.gl/YCrsX3

   * A library implementation of a recursion scheme
 votes: 8, answers: 1
 Read on SO: [33] http://goo.gl/DdYPtw

Until next time,
[34]+Daniel Santa Cruz

References

   1.
http://www.twitch.tv/bethesda?utm_campaign=live_embed_clickutm_source=www.quakecon.org
   2.
http://www.reddit.com/r/haskell/comments/1jj40p/john_carmack_talking_at_length_about_haskell_in/
   3. http://www.haskell.org/pipermail/ghc-devs/2013-August/001818.html
   4.
http://www.reddit.com/r/haskell/comments/1jky60/spj_ghcs_glorious_future/
   5.
http://www.reddit.com/r/haskell/comments/1jeo0p/theres_a_massive_gap_between_the_average_and/
   6.
http://www.reddit.com/r/haskell/comments/1jeo0p/theres_a_massive_gap_between_the_average_and/
   7.

[Haskell-cafe] Importing more modules by default

2013-08-07 Thread aditya bhargava
Hi there,
It seems like every Haskell program I write imports the following modules:

Control.Monad
Control.Applicative
Data.Maybe
Data.List

Is there a good reason why these modules aren't imported by default? When I
write a simple script usually a 1/4th of the script is just imports, and my
code just looks uglier.

Adit
___
Haskell-Cafe mailing list
Haskell-Cafe@haskell.org
http://www.haskell.org/mailman/listinfo/haskell-cafe


[Haskell-cafe] Module names from a function name

2013-08-07 Thread Jong-won Choi

Hi,

I asked this question to beginner mailing list and no luck so far, so 
I'm trying here.


How can I get all the module names which (re-)export a given function name?

I'd like to fix Emacs Haskell mode - interactive documentation browser 
and I need the list of such module names.


Thanks!

- Jong-won

___
Haskell-Cafe mailing list
Haskell-Cafe@haskell.org
http://www.haskell.org/mailman/listinfo/haskell-cafe


Re: [Haskell-cafe] Module names from a function name

2013-08-07 Thread Jong-won Choi

Thanks for the suggestion, but I am looking for a programmatic way.

Is module in Haskell first class object? Does it maintain function names 
which are exported?


On 08/08/13 12:41, Patrick Mylund Nielsen wrote:


hoogle function name after running cabal install hoogle and hoogle data

On Aug 7, 2013 10:35 PM, Jong-won Choi oz.jongwon.c...@gmail.com 
mailto:oz.jongwon.c...@gmail.com wrote:


Hi,

I asked this question to beginner mailing list and no luck so far,
so I'm trying here.

How can I get all the module names which (re-)export a given
function name?

I'd like to fix Emacs Haskell mode - interactive documentation
browser and I need the list of such module names.

Thanks!

- Jong-won

___
Haskell-Cafe mailing list
Haskell-Cafe@haskell.org mailto:Haskell-Cafe@haskell.org
http://www.haskell.org/mailman/listinfo/haskell-cafe



___
Haskell-Cafe mailing list
Haskell-Cafe@haskell.org
http://www.haskell.org/mailman/listinfo/haskell-cafe


Re: [Haskell-cafe] Haskell Platform and Leksah on Windows

2013-08-07 Thread Carter Schonwald
Hello Mihai,

you bring up 2 unrelated questions, i'll address them seperately


1)

Leksah should not be considered an official haskell ide, but merely one
of many community supported editing tools. And frankly one of the less
widely used ones at that! Leksah is not used much at all by anyone, though
theres probably a handful of folks who do use it.

 Many folks use editors like Sublime Tex (2/3), Emacs, Vi(m), textmate, and
many more.  Its worth noting that the sublime-haskell plugin for sublime
text, and analogous packages for many other editors, provide haskell
IDE-like powers, or at least a nice subset thereof.


2) There are people working on building better easily portable native gui
toolkits, but in many respects, a nice haskelly gui toolkit is still
something people are experimetning with how to do well. theres lots of
great tools out as of the past year or two, many more in progress on
various time scales, and gtk2hs is great for linux (and thats fine).

cheers
-Carter





On Wed, Aug 7, 2013 at 1:18 AM, Mihai Maruseac mihai.marus...@gmail.comwrote:

 Hello,

 A friend of mine tried to install Haskell Platform and Leksah on
 Windows and was troubled by the amount of problems he encountered as a
 beginner in this. I've told him to ask over IRC and mailing list but
 it seems he has some problems with registration.

 Anyway, he blogged about his problems at
 http://dorinlazar.ro/haskell-platform-windows-crippled/ and I'm sure
 that we can work on fixing some of them.
 --
 MM
 All we have to decide is what we do with the time that is given to us

 ___
 Haskell-Cafe mailing list
 Haskell-Cafe@haskell.org
 http://www.haskell.org/mailman/listinfo/haskell-cafe

___
Haskell-Cafe mailing list
Haskell-Cafe@haskell.org
http://www.haskell.org/mailman/listinfo/haskell-cafe


Re: [Haskell-cafe] Alternative name for return

2013-08-07 Thread Donn Cave
quoth Richard A. O'Keefe

 Check the OED.  Most of its meaning are about _turning back_,
 _resuming_, _reverting_.  Yielding or making a profit is not at
 all about providing a value, but about money going out AND
 COMING BACK.  It's the coming back part that makes it a return.

Yes.  Return means 'go/come back';  used transitively, it means
'go/come back with _'.

 value occurs twice in OED 'return, v.1, in neither case
 referring to providing a value.

But of course, the word value as we use it is specific to our
application, i.e. it's computer jargon, with an English meaning
that's more like thing, object, datum.  Wouldn't look for
value to convey this meaning in an OED definition of return.

 In all of the senses, the underlying idea is not provision of a
 value, but going, turning, or bending back.

[Which is actually what the Haskell return fails to do.]

What goes/turns/bends back?  When used intransitively, the subject;
used transitively, the object, our value.

I'll give you the COBOL example, it's no better the Haskell
return.  FORTRAN makes a good deal more sense for an English
speaker but uses indirect object semantically - RETURN 2
means return to the second alternate return specified by the
caller.  (I never used that feature, so don't take my word
for it, check your manual before using it!)

Donn

___
Haskell-Cafe mailing list
Haskell-Cafe@haskell.org
http://www.haskell.org/mailman/listinfo/haskell-cafe


Re: [Haskell-cafe] Importing more modules by default

2013-08-07 Thread Carter Schonwald
Hello Aditya,
you could write a script to generate a starter file for yourself. I do
something like that with my own latex documents. Or have your own special
module that reexports all of those that you import for you own projects.
Its very easy to write your own module that reExports other modules. try it
out. many libraries that you use, such as containers, do that

theres enough variety and complexity to nontrivial  projects that such a
enforced import would end badly


On Wed, Aug 7, 2013 at 10:23 PM, aditya bhargava
bluemangrou...@gmail.comwrote:

 Hi there,
 It seems like every Haskell program I write imports the following modules:

 Control.Monad
 Control.Applicative
 Data.Maybe
 Data.List

 Is there a good reason why these modules aren't imported by default? When
 I write a simple script usually a 1/4th of the script is just imports, and
 my code just looks uglier.

 Adit

 ___
 Haskell-Cafe mailing list
 Haskell-Cafe@haskell.org
 http://www.haskell.org/mailman/listinfo/haskell-cafe


___
Haskell-Cafe mailing list
Haskell-Cafe@haskell.org
http://www.haskell.org/mailman/listinfo/haskell-cafe


Re: [Haskell-cafe] Haskell Platform and Leksah on Windows

2013-08-07 Thread Mihai Maruseac
Hello all,

Thanks for your replies, I've relayed them to my acquaintance. Though
he still doesn't understand that he's at fault for demanding the
unreasonable.

On Thu, Aug 8, 2013 at 6:28 AM, Carter Schonwald
carter.schonw...@gmail.com wrote:
 Hello Mihai,

 you bring up 2 unrelated questions, i'll address them seperately


 1)

 Leksah should not be considered an official haskell ide, but merely one of
 many community supported editing tools. And frankly one of the less widely
 used ones at that! Leksah is not used much at all by anyone, though theres
 probably a handful of folks who do use it.

  Many folks use editors like Sublime Tex (2/3), Emacs, Vi(m), textmate, and
 many more.  Its worth noting that the sublime-haskell plugin for sublime
 text, and analogous packages for many other editors, provide haskell
 IDE-like powers, or at least a nice subset thereof.


 2) There are people working on building better easily portable native gui
 toolkits, but in many respects, a nice haskelly gui toolkit is still
 something people are experimetning with how to do well. theres lots of great
 tools out as of the past year or two, many more in progress on various time
 scales, and gtk2hs is great for linux (and thats fine).

 cheers
 -Carter





 On Wed, Aug 7, 2013 at 1:18 AM, Mihai Maruseac mihai.marus...@gmail.com
 wrote:

 Hello,

 A friend of mine tried to install Haskell Platform and Leksah on
 Windows and was troubled by the amount of problems he encountered as a
 beginner in this. I've told him to ask over IRC and mailing list but
 it seems he has some problems with registration.

 Anyway, he blogged about his problems at
 http://dorinlazar.ro/haskell-platform-windows-crippled/ and I'm sure
 that we can work on fixing some of them.
 --
 MM
 All we have to decide is what we do with the time that is given to us

 ___
 Haskell-Cafe mailing list
 Haskell-Cafe@haskell.org
 http://www.haskell.org/mailman/listinfo/haskell-cafe





-- 
MM
All we have to decide is what we do with the time that is given to us

___
Haskell-Cafe mailing list
Haskell-Cafe@haskell.org
http://www.haskell.org/mailman/listinfo/haskell-cafe