wren ng thornton wrote:
Since GHC 6.12 ships with QC2 it looks like it's finally time to get
around to converting some old testing scripts. Unfortunately, one of the
things I couldn't figure out last time I looked (and hence why I haven't
switched) is how to reconfigure the configuration
Ivan Lazar Miljenovic wrote:
wren ng thornton w...@freegeek.org writes:
Since GHC 6.12 ships with QC2 it looks like it's finally time to get
around to converting some old testing scripts.
Well, the Haskell Platform does, not GHC...
Fair enough (it was one of the two :)
Unfortunately
-- bytestring-trie 0.2.2 (major bugfix)
Another release for efficient finite maps from (byte)strings to values.
This version corrects a major bug affecting all users who merge tries.
Gabriel Riba wrote:
New proposal draft:
Proposal: Type supplement for constructor specific uses of sum types
Purpose: Avoid error clauses (runtime errors), exception control or Maybe
types in partially defined (constructor specific) functions on sum types.
As an example, with
data List a
James Andrew Cook wrote:
In particular, functions such as 'uniform' and 'normal' which directly construct RVars are very useful in
defining the rvar implementation of other types. I have been reluctant to drop the rvar function from the
Distribution class because it is very useful to be able
R J wrote:
Can someone provide a hand calculation of:
span ( 0) [-1, -2, -3, 0, 1, 2, -3, -4, -5]?
I know the result is ([-1, -2, -3], [0, 1, 2, -3, -4, -5]), but the recursion
flummoxes me.
Here's the Prelude definition:
First, let's simplify the definition.
span _ [] = ([],
Jake McArthur wrote:
On 06/03/2010 10:14 AM, Gabriel Riba wrote:
No need for runtime errors or exception control
hd :: List!Cons a - a
hd (Cons x _) = x
This is already doable using GADTs:
data Z
data S n
data List a n where
Nil :: List a Z
Cons :: a -
Richard O'Keefe wrote:
There's something in that package that I don't understand,
and I feel really stupid about this.
data RVarT m a
type RVar = RVarT Identity
class Distribution d t where
rvar :: d t - RVar t
rvarT :: d t - RVarT n t
Where does n come from?
Presumably from
-- list-extras 0.4.0
A minor (but interface-changing) release for common not-so-common
functions for lists.
-- Changes (since 0.3.0)
Jason Dagit wrote:
In Church's λ-calc the types are ignored,
Not so. Church-style lambda calculus is the one where types matter;
Curry-style is the one that ignores types and evaluates as if it were
the untyped lambda calculus.
Church encodings are based on the untyped LC rather than
Lennart Augustsson wrote:
So what would you consider a proof that there are no total Haskell
functions of that type?
Or, using Curry-Howard, a proof that the corresponding logical formula
is unprovable in intuitionistic logic?
It depends on what kind of proof I'm looking for. If I'm looking
Ivan Miljenovic wrote:
On 28 May 2010 15:18, wren ng thornton w...@freegeek.org wrote:
Stefan Monnier wrote:
churchedBool :: t - t - t
Important detail: the precise type is ∀t. t → t → t.
encodeBool x = \t e - if x then t else e
So the type of encodeBool should be:
Bool → ∀t. t → t → t
Lennart Augustsson wrote:
Yes, of course you have to trust Djinn to believe its proof.
That's no different from having to trust me if I had done the proof by hand.
Our you would have to trust yourself if you did the proof.
True, though I think I didn't make my point clearly.
The question is,
David Sankel wrote:
keep :: ((t - b) - u - b) - ((t1 - t) - b) - (t1 - u) - b
On Wed, May 26, 2010 at 12:49 PM, Lennart Augustsson lenn...@augustsson.net
wrote:
There are no interesting (i.e. total) functions of that type.
I wonder how one would prove that to be the case. I tried and
wren ng thornton wrote:
David Sankel wrote:
keep :: ((t - b) - u - b) - ((t1 - t) - b) - (t1 - u) - b
Lennart Augustsson wrote:
There are no interesting (i.e. total) functions of that type.
I wonder how one would prove that to be the case. I tried and didn't
come up with anything
Dan Doel wrote:
On Thursday 27 May 2010 3:27:58 am wren ng thornton wrote:
By parametricty, presumably.
Actually, I imagine the way he proved it was to use djinn, which uses a
complete decision procedure for intuitionistic propositional logic. The proofs
of theorems for that logic
Stefan Monnier wrote:
churchedBool :: t - t - t
Important detail: the precise type is ∀t. t → t → t.
encodeBool x = \t e - if x then t else e
So the type of encodeBool should be:
Bool → ∀t. t → t → t
whereas Haskell will infer it to be
∀t. Bool → t → t → t
Those are the same type.
Dan Doel wrote:
On Thursday 27 May 2010 1:49:36 pm wren ng thornton wrote:
Sure, that's another option. But the failure of exhaustive search isn't
a constructive/intuitionistic technique, so not everyone would accept
the proof. Djinn is essentially an implementation of reasoning
Daniel Fischer wrote:
There are more rules elsewhere. If you compile with optimisations, GHC
turns your realToFrac into double2Float# nicely, so it's okay to use
realToFrac.
However, without optimisations, no rules fire, so you'll get
(fromRational . toRational).
That must be new, because it
Andrea Vezzosi wrote:
wren ng thornton wrote:
With this change [1] I can't notice any difference for your benchmark[2].
Then again, all the runTest calls take 0 msec and I've had no luck making
the computation take much time; perhaps your computer can detect a
difference.
On my machine
Antoine Latter wrote:
While I also offer a transformer version of MaybeCPS, the transformer *does*
suffer from significant slowdown. Also, for MaybeCPS it's better to leave
the handlers inline in client code rather than to abstract them out; that
helps to keep things concrete. So perhaps you
Andrea Vezzosi wrote:
On Thu, May 13, 2010 at 10:51 AM, wren ng thornton w...@freegeek.org wrote:
Andrea Vezzosi wrote:
wren ng thornton wrote:
With this change [1] I can't notice any difference for your benchmark[2].
Then again, all the runTest calls take 0 msec and I've had no luck making
Max Cantor wrote:
Based on some discussions in #haskell, it seemed to be a consensus
that using a modified continuation monad for Error handling instead
of Eithers would be a significant optimization since it would
eliminate a lot of conditional branching (everytime = is called
in the Either
wren ng thornton wrote:
Here's one big difference:
newtype ErrCPS e m a = ErrCPS { runErrCPS ::
forall r . (e - m r) -- error handler
- (a - m r) -- success handler
- m r }
The analogous version I use is:
newtype MaybeCPS a = MaybeCPS
(forall r. (a - Maybe r
Brandon S. Allbery KF8NH wrote:
It's not a call, it's a definition as shown above. The simpler
translation is:
x - y
becomes
y = \x -
(note incomplete expression; the next line must complete it) and the
refutable pattern match takes place in the lambda binding. But because
of the
Rafael Cunha de Almeida wrote:
I don't think that safeSecondElement is worse than secondElement. I think it's
better for the program to crash right away when you try to do something that
doesn't make sense.
Getting the secondElement of a list with one or less elements doesn't make
sense, so you
Gregory Crosswhite wrote:
Yes, but I think that it is also important to distinguish between cases
where an error is expected to be able to occur at runtime, and cases
where an error could only occur at runtime *if the programmer screwed up*.
Well sure, but how can you demonstrate that you (the
Pierre-Etienne Meunier wrote:
This way :
do
times-mapM PF.getFileStatus filenames = return.(map
PF.modificationTime)
Or also :
do
times-mapM (PF.getFileStatus = (return.(PF.modificationTime)))
filenames
let sorted=...
I do not know exactly how ghc compiles the IO
Peter Gammie wrote:
Alice/ML is the place to look for this technology.
http://www.ps.uni-saarland.de/alice/
The project may be dead (I don't know), but they did have the most
sophisticated take on pickling that I've seen. It's an ML variant,
with futures, running on top of the same platform
Casey McCann wrote:
The only correct solution would be to strip floating point types of
their instances for Ord, Eq, and--therefore, by extension--Num. For
some reason, no one else seems to like that idea. I can't imagine
why...
I'm not terribly opposed to it. But then, I've also defined
Anders Kaseorg wrote:
Isaac Dupree wrote:
Do you see the difference? The effects are sequenced in different places.
The return/join pair moves all the effects *outside* the operations such
as catch... thus defeating the entire purpose of morphIO.
Yes; my question is more whether Wren has a
wren ng thornton wrote:
Anders Kaseorg wrote:
Isaac Dupree wrote:
Do you see the difference? The effects are sequenced in different
places.
The return/join pair moves all the effects *outside* the operations such
as catch... thus defeating the entire purpose of morphIO.
Yes; my question
This bounced because I have different emails registered for cafe@ and
libraries@, so forwarding it along to the cafe.
wren ng thornton wrote:
wren ng thornton wrote:
Heinrich Apfelmus wrote:
Anders Kaseorg wrote:
This concept can also be generalized to monad transformers:
class MonadTrans
Ivan Lazar Miljenovic wrote:
Why are people suddenly using the term morally when they mean why
doesn't this do what I think it should? None of its definitions seem
to match what you mean:
The usage on this thread seems a bit nonstandard, but I'm assuming it's
based off the more general idiom
Duncan Coutts wrote:
On Sun, 2010-04-11 at 18:43 +0200, Maciej Piechotka wrote:
- Privacy problem. I don't want the software to call home with data
without asking.
Obviously it is important that the data be anonymous and that we do not
send stuff without the user's knowledge. While there is
Ketil Malde wrote:
Perhaps it would also be possible to suggest library upgrades likely to
remedy the problem in case of a build failure?
+1 for good error messages.
+2 for should I try upgrading libfoo? [yn] integration (if
configurable as AlwaysYes, AlwaysAsk, or AlwaysNo).
--
Live
Ivan Lazar Miljenovic wrote:
Thomas Schilling nomin...@googlemail.com writes:
http://i.imgur.com/kFqP3.png Didn't know about CSS's rgba to
describe transparency. Very useful.
It's a vely nice!! (in a Borat voice)
+1. Both for the design, and for the content.
--
Live well,
~wren
Gregory Crosswhite wrote:
On Apr 8, 2010, at 12:25 PM, Casey McCann wrote:
Seriously, floating point so-called numbers don't even have
reflexive equality!
They don't? I am pretty sure that a floating point number is always equal to
itself, with possibly a strange corner case for things
Ertugrul Soeylemez wrote:
Human identity is much more than just a file descriptor or a map key,
and people from academia often don't get this, because they don't have
to fear using their real names. Particularly in economically illiberal
countries being known as the author of a certain Haskell
Jason Dusek wrote:
2010/04/03 Casey Hawthorne cas...@istar.ca:
Apparently, Erlang does not have a static type system, since with hot
code loading, this is intrinsically difficult.
It is doubtless hard to statically check a program that is
not statically available :)
Well, so long as you
Nathan Hunter wrote:
Hello.
I am hoping to take on the Data Structures project proposed two years ago by
Don Stewart herehttp://hackage.haskell.org/trac/summer-of-code/ticket/1549,
this summer.
Before I write up my proposal to Google, I wanted to gauge the reaction of
the Haskell community to
-- logfloat 0.12.1
This package provides a type for storing numbers in the log-domain,
primarily useful for preventing underflow when multiplying many
probabilities as in HMMs and other probabilistic
Stephen Tetley wrote:
Much of the behaviour of CPP is not defined and
often inaccurately described, certainly it wouldn't appear to make an
ideal one summer, student project.
But to give Language.C integrated support for preprocessing, one needn't
implement CPP. They only need to implement the
Jon Fairbairn wrote:
Another (provocative) observation is that most of the women
programmers I've known were good at it and thought they might
not be, but most of the men claimed to be good at it but
were not.
I've observed this too, but it's a bit droll. Let:
p = proportion of people who
Günther Schmidt wrote:
One thing that I keep hearing is I'm not trying to be offensive. I
think it's easy to get caught up on not being offensive so that we
don't make any progress. It's impossible not to offend people -- but
it is possible to take the time to listen and correct problematic
Jason Dagit wrote:
On Sun, Mar 28, 2010 at 8:29 PM, wren ng thornton w...@freegeek.org wrote:
Jon Fairbairn wrote:
Another (provocative) observation is that most of the women
programmers I've known were good at it and thought they might
not be, but most of the men claimed to be good
David Menendez wrote:
On Sat, Mar 27, 2010 at 12:56 AM, Thomas DuBuisson
thomas.dubuis...@gmail.com wrote:
Using bang patterns didn't help almost anything here. Using rem
instead of mod made the time go from 45s to 40s. Now, using -fvia-C
really helped (when I used rem but not using mod). It
Alberto G. Corona wrote:
because math abilities are not a -primary- reason for survival.
Tools engineering and mastering is.
I don't see the difference. Being able to use a lever, wheel, pulley,
fire,... is obviously helpful for survival. But intellectual tools
like mathematics, logic, and
wren ng thornton wrote:
Alberto G. Corona wrote:
because math abilities are not a -primary- reason for survival.
Tools engineering and mastering is.
I don't see the difference.
(That is, the difference between CS and mathematics. Conversely, I don't
see the similarity between physical
Gregory Collins wrote:
wren ng thornton w...@freegeek.org writes:
w...@semiramis:~ $ ls /usr/local
ls: /usr/local: No such file or directory
w...@semiramis:~ $ ls /usr/bin/cabal
ls: /usr/bin/cabal: No such file or directory
But http://hackage.haskell.org/platform/new/contents.html tells me
Don Stewart wrote:
You should file a bug on the Haskell Platform bug tracker.
http://haskell.org/haskellwiki/Haskell_Platform#Trouble_shooting
And I'm CC'ing the dmg maintainer -- it may also be a GHC issue as well.
-- Don
warrensomebody:
I downloaded the new
Gregory Collins wrote:
wren ng thornton w...@freegeek.org writes:
I'm still on 10.5.8. I don't have cabal-install installed yet, but I just
installed GHC-6.12.1/HP-2010.1.0.0. I can verify that ghci works fine so
far. I'll check out cabal-install in the next couple days.
If there is an issue
Gregory Collins wrote:
Warren Harris warrensomeb...@gmail.com writes:
I downloaded the new haskell-platform-2010.1.0.0-i386.dmg today... ran the
uninstaller, ghc installer and the platform installer. When I run ghci, it
seems to work fine, but when I try cabal, I get this crash:
$ cabal
Stephen Tetley wrote:
hi wren
Where I've used it, random access does seem conceptual more
satisfactory than trying to avoid it.
I was thinking more about performance issues (avoiding disk seeks) which
would also alleviate the problem of needing random access when it's not
available.
For
david fries wrote:
My my concern was how you would perform random access in a functional
parser. You're points are interesting too. I guess if we really had
wanted to work with parsed objects, retaining the shared references
would have been a must.
Out of curiosity, was there *really* a need
Ben Millwood wrote:
In general, laziness behaviour can
get complicated quickly and so I'm not convinced that the type
signature is a good home for that information.
Certainly it can. A lot of the same problems arise in the logic
programming community under the topic of modes, i.e. whether a
Wolfgang Jeltsch wrote:
Am Donnerstag, 11. März 2010 00:37:18 schrieb wren ng thornton:
Wolfgang Jeltsch wrote:
Hello,
some time ago, it was pointed out that generalized newtype deriving could
be used to circumvent module borders. Now, I found out that generalized
newtype deriving can even
Ketil Malde wrote:
What should the type look like? If memory serves, Clean allows bangs in
type signatures, something like:
foldl' :: (a - b - a) - !a - [b] - a
but I thought it just added a seq under the hood, much like bang
patterns like
foldl' f !z xs = ...
do in Haskell, so it's
David Leimbach wrote:
Note that foldl' has a ' to indicate that it's not the same as foldl
exactly. I would propose that sum' exist as well as sum, and that sum be
lazy.
I wish Haskell allowed ! to occur (non-initially) in alphanum_'
identifiers as well as in symbolic ones. Then we could be
Wolfgang Jeltsch wrote:
Hello,
some time ago, it was pointed out that generalized newtype deriving could be
used to circumvent module borders. Now, I found out that generalized newtype
deriving can even be used to define functions that would be impossible to define
otherwise. To me, this is
Simon Marlow wrote:
So it would be pretty easy to provide something like
disableMajorGC, enableMajorGC :: IO ()
Of course leaving it disabled too long could be bad, but that's your
responsibility.
It seems like it'd be preferable to have an interface like:
withMajorGCDisabled :: IO()
Matt Hellige wrote:
Thanks! I'm glad to know that people have found this approach useful.
In cases where it works, I find it somewhat cleaner than families of
combinators with (what I find to be) rather obscure names, or much
worse, impenetrable sections of (.). We can write the original example
Sean Leather wrote:
The second option approaches the ideal pointfreeness (or pointlessness if
you prefer), but I'd like to go farther:
(...) :: (c - d) - (a - b - c) - a - b - d
(...) f g x y = f (g x y)
infixr 9 ...
I go with infixl 8 personally. It seems to play better with some of the
Alexander Solla wrote:
On Jan 27, 2010, at 4:57 PM, Conor McBride wrote:
Yes, the separation is not clear in Haskell. (I consider this
unfortunate.) I was thinking of Paul Levy's call-by-push-value
calculus, where the distinction is clear, but perhaps not as fluid as
one might like.
What,
Michael Lesniak wrote:
elegance of Haskell. Whether Haskell becomes an easy choice for
commercial work or remains a boutique language depends on how easy it
is to build today's applications.
Do you (or anyone reading this thread) know of some kind of wishlist
of missing features and/or
Stephen Tetley wrote:
Also binding to a C library is easier than binding to a C++ one, if
you can think of another library rather than SRILM that will meet your
needs...
Alas, SRILM really is the standard tool for this so there aren't other
(worthwhile) options AFAIK. But it's pretty standard
Sebastian Fischer wrote:
What reasons do people have to use a BSD license over a Public Domain
license, for example with the license text from:
http://www.lemur.com/pd-disclaimers.html ? Is the only difference
that, with a BSD license, the copyright notice must be maintained?
One important
Thomas DuBuisson wrote:
- Michael Snoyman mich...@snoyman.com:
- Ivan Miljenovic ivan.miljeno...@gmail.com:
- Michael Snoyman mich...@snoyman.com:
Some of us prefer not to look at that kind of material. I'd appreciate
if, in the future, you could either refrain from sending such
Tom Tobin wrote:
- Heinrich Apfelmus apfel...@quantentunnel.de wrote:
Since the name Ring is already taken by an ubiquitous mathematical
structure, and thus already in hackage for example as Algebra.Ring in
the numeric-prelude , I suggest to call the data structure Necklace
instead.
Graham Klyne wrote:
Mark Lentczner wrote:
[*] The Apple guidelines for the /Library and ~/Library files are
here:http://developer.apple.com/mac/library/documentation/MacOSX/Conceptual/BPFileSystem/Articles/LibraryDirectory.html#//apple_ref/doc/uid/20002282-BAJHCHJI
Thanks for the link. I
Mark Lentczner wrote:
First, we must look at how Apple intends the various Library directories to be
used. Please see the Apple docs on it[* link below]. Essentially, /Library is
the Mac OS X equivalent of /usr/local.
However, I would be opposed to storing anything in /Library or /System.
Aaron Tomb wrote:
I've come across the issue with iconv, as well.
The problem seems to be that some versions of iconv define iconv_open
and some related functions as macros (that then call libiconv_open,
etc.), and some versions of iconv have exported functions for
everything. In particular,
Mark Lentczner wrote:
Taking a cue from the various preinstalled language systems on Mac OS X, up
over in /Library might be a better place:
Python puts installed packages in:
/Library/Python/version/site-packages
Ruby puts installed packages in:
Tom Tobin wrote:
On Tue, Dec 22, 2009 at 4:49 AM, Heinrich Apfelmus
apfel...@quantentunnel.de wrote:
Likewise, ~/Library/Haskell seems to be the best place for user installs.
While I don't mind the /Library/Haskell path for global installs, I'm
not sure how I feel about this for local
Mark Lentczner wrote:
On Dec 22, 2009, at 12:35 PM, Duncan Coutts wrote:
One thing I think I've seen said before however is that things in /Library and
~/Library are supposed to be app bundles or frameworks or some other special
OSX packaging thing, rather than traditional Unix-style
Ketil Malde wrote:
András Mocsáry amo...@gmail.com writes:
Now we have a problem, which is most generally fixed in these ways:
C-like:
switch ( x )
{
Case 0:
Unchecked
Case 1:
Checked
Case 2:
Unknown
Default:
Nothing
}
This is not a fix, this is a workaround for a design bug, namely
Sean Leather wrote:
I can see what's going on: it can't tell that the a I am writing there
is the same a that's in the type specification, but is there any way that
I can make it identify a with the a in the specification for nextPtr?
Lexically scoped type variables:
Richard O'Keefe wrote:
(Why do people call
baStudly syle camel? Is there somewhere in the world a
species of camel with three or four humps, like
XmlNodeSansChildren?)
camelCase differs from StudlyCaps in the case of the first character
(that is, XmlNodeSansChildren is *not* camelCase). The
Ketil Malde wrote:
wren ng thornton w...@freegeek.org writes:
Using a wiki page for each project enables anybody to add comments.[...]
I think this is a great idea.
Because of Duncan's concerns about imposing too much burden on
authors, and because there are many mature projects which
Marc Weber marco-owe...@gmx.de wrote:
Hackage is missing one feature:
It is very static. I mean if you have a patch or a question or a comment
you have to lookup the darcs repository, write the patch then contact
the author and wait.. If the author replies everything is fine.
If he doesn't you
John D. Earle wrote:
This is a matter that I genuinely at the present time do not grasp and I am hoping that
some of you who are more familiar with the Haskell language may be able to help enlighten
me. I feel the question to be an important one. What material benefit does Haskell derive
from
Andrew Coppin wrote:
What we're really trying to do here is attach additional information to
a value - information which exists only in the type checker's head, but
has no effect on runtime behaviour (other than determining whether we
*get* to runtime). As far as I can tell, Haskell does not
John D. Earle wrote:
Is Parsec capable of parsing a mildly context sensitive language? In particular
does it parse a combinatory categorial grammar? Does Haskell have such tools in
its shed? What sort of facilities does Haskell have for natural language
processing?
If you come back at the
Nicolas Pouillard wrote:
Excerpts from Henning Thielemann's message of Mon Dec 07 20:36:27 +0100 2009:
@Apfelmus:
For practical purposes I think Train should have swapped type parameters
in order to make Functor act on the type of the list elements.
data Train b a = Wagon a (Train b a)
Andrew Coppin wrote:
Unfortunately, I've yet to find a single Haskell package that binds to C
which will actually compile on Windows. :-(
Take a look at logfloat[1], it builds cleanly on Windows XP using GHC
6.10.1 without needing Cygwin nor Mingw/Msys (however GHCi has some DLL
errors[2]).
wren ng thornton wrote:
One of the nice things about not having a Nil is that it lets you easily
be polymorphic over things ending in () ---a normal list---, (Maybe a)
---a fallible list---, (Either a b) ---your progress type---, etc.
Whereas the version that has both Nil and End forces us
Jason McCarty wrote:
wren ng thornton wrote:
concat1 :: T a b - (b - T a b) - T a b
This could just as easily be
concat :: T a b - (b - T a c) - T a c
right? It's a little weird to call this concatenation, but I bet it
could come in handy.
Er right, that's what I meant. (Again
Luke Palmer wrote:
On Fri, Dec 4, 2009 at 9:44 AM, Mark Lentczner ma...@glyphic.com wrote:
On Dec 4, 2009, at 2:43 AM, Luke Palmer wrote:
So GHC leaves it to the user to specify sharing. If you want an
expression shared, let bind it and reuse.
Does GHC treat where and let the same in this
Duncan Coutts wrote:
I've got an open mind on the suggestion to amalgamate the two ways the
list could end. I'm not especially in favour of generalising for the
sake of generalising, especially if it looses the connection to the
notion of annotating your ordinary data structure with extra
David Menendez wrote:
Alec Berryman wrote:
I don't know of a library to intern strings, but it's not too hard to
implement. I couldn't find the code I wrote to do this, but I looked
around a bit and this is about what I remember doing:
Nicolas Pouillard wrote:
Excerpts from Heinrich Apfelmus's message of Tue Dec 01 11:29:24 +0100 2009:
I propose to (trivially) generalize this type to list with an end
data ListEnd a b = Cons a (ListEnd a b)
| End b
because it may have other uses than just lazy error
vishnu wrote:
I always thought lazyness was automatic and
seq made strictness possible.
Laziness is the default, but that doesn't mean it's everywhere. For
example, every time you do pattern matching you enforce strictness:
foo (x:xs) = 5
==
foo _|_ == _|_
However, there's also
vishnu wrote:
wow ok, I'm not even able to see why they're different in the desugared
version
They're different because case is strict binding (see caveat below)
whereas let is lazy binding. If we say,
let foo = big ugly computation in bar
Then if foo isn't used in bar, it'll never be
Twan van Laarhoven wrote:
My point is that desugaring x.f to (f x) and treating some instances
of (f x) as (ModuleToGuess.f x) are two separate things. In the
current proposal these two are combined, but I see no reason to do so.
To be a bit more concrete, I would propose:
* General Type
Neil Brown wrote:
Having skimmed the page, it seems like the re-use of . is one of the
major difficulties of the proposal. Would it be possible to use -?
It has been used for accessing members in C and C++, so it is not too
unusual a choice.
It's also the one that Perl went with.
It is
Stephen Tetley wrote:
Hello Mike
A pitch class set represents Z12 numbers so I'd define a Z12 number
type then store it in a list (if you have need a multiset -
duplicates) or Data.Set (if you need uniqueness).
If you want an efficient implementation for *sets* of Z12 numbers I'd
recommend
Mark Lentczner wrote:
I also think I understand that the implicit 'forall' inherent in Haskell falls
at different places in various constructs, which also had me confused. For
example, while the above two function type declarations are equivalent, these
two data declarations aren't:
Magicloud Magiclouds wrote:
Hum... simple like that. So you meant the Monoid just
abstracts/represents the ability to build a stack, right?
The key idea behind monoids is that they define sequence. To get a
handle on what that means, it helps to think first about the free
monoid. If we have
Stephen Tetley wrote:
Hi Edward
Many thanks.
I've mostly used groupoid for 'string concatenation' on types that I
don't consider to have useful empty (e.g PostScript paths, bars of
music...), as string concatenation is associative it would have been
better if I'd used semigroup in the first
Nicolas Pouillard wrote:
Excerpts from jean-christophe mincke's message of Tue Nov 10 21:18:34 +0100
2009:
do acc - get
put (acc+1)
...
Since this pattern occurs often 'modify' is a combination of get and put:
do modify (+1)
...
Though the caveat about laziness applies here as
601 - 700 of 1018 matches
Mail list logo