On 30 May 2011 05:27, Anupam Jain wrote:
> Why doesn't Haskell have built in syntactic sugar for atoms?
Because they don't have a functional interpretation? (i.e. they're
really a hack)
___
Haskell-Cafe mailing list
Haskell-Cafe@haskell.org
http://www
> Why doesn't Haskell have built in syntactic sugar for atoms?
> -- Anupam
I think because of deriving Enum.
___
Haskell-Cafe mailing list
Haskell-Cafe@haskell.org
http://www.haskell.org/mailman/listinfo/haskell-cafe
On Thu, May 26, 2011 at 7:26 PM, Gregory Collins wrote:
> Based on the description it looks like you could be looking for:
>
>http://hackage.haskell.org/package/simple-atom
>
> G
>
>
Coincidentally, I put up a question at stackoverflow for this just yesterday
-
http://stackoverflow.com/questio
On 26/05/2011 07:56 PM, Andrew Coppin wrote:
On 26/05/2011 10:59 AM, Jacek Generowicz wrote:
Any comments on the relative efficiency of the above as compared to
A == B in the context of
data Foo = A | B | C | D | ... lots more ...
?
(I imagine that a Sufficiently Smart Compiler could reduce
On Thu, May 26, 2011 at 14:56, Andrew Coppin
wrote:
> My understanding is that if you have a constructor with no fields, it gets
> allocated as a compile-time constant. In other words, "C" is just a pointer
> to a static data structure somewhere in the program binary, and (==)
> effectively become
On 26/05/2011 10:59 AM, Jacek Generowicz wrote:
Any comments on the relative efficiency of the above as compared to
A == B in the context of
data Foo = A | B | C | D | ... lots more ...
?
(I imagine that a Sufficiently Smart Compiler could reduce (==) ::
Person Person to just integer compari
2011/5/26 Jacek Generowicz :
>
> On 2011 May 26, at 11:16, Christopher Done wrote:
>
>> On 26 May 2011 10:45, Jacek Generowicz wrote:
>>>
>>> What is the Haskell approach to efficient comparison and lookup of
>>> objects
>>> by their identity?
>>
>> Often you just provide your own and implement Eq
Based on the description it looks like you could be looking for:
http://hackage.haskell.org/package/simple-atom
G
On Thu, May 26, 2011 at 10:45 AM, Jacek Generowicz
wrote:
> [ TLDR: How do you do Lisp symbols in Haskell? ]
>
>
> What is the Haskell approach to efficient comparison and looku
On 2011 May 26, at 11:59, Jacek Generowicz wrote:
(I imagine that a Sufficiently Smart Compiler could reduce (==) ::
Person Person to just integer comparison.)
Sorry, I meant
(==) :: Person -> Person -> Bool
in the above.
___
Haskell-Cafe maili
On 2011 May 26, at 11:59, Brandon Allbery wrote:
On Thu, May 26, 2011 at 05:41, Jacek Generowicz > wrote:
On 2011 May 26, at 11:12, Brandon Allbery wrote:
(Think gensym. Hm, except last time I did anything serious with
Lisp, it was Maclisp... does gensym even still exist, or did CL do
some
On Thu, May 26, 2011 at 05:41, Jacek Generowicz wrote:
> On 2011 May 26, at 11:12, Brandon Allbery wrote:
>
>> (Think gensym. Hm, except last time I did anything serious with Lisp, it
>> was Maclisp... does gensym even still exist, or did CL do something
>> inscrutable with it?)
>
>
> But gensym
On 2011 May 26, at 11:16, Christopher Done wrote:
On 26 May 2011 10:45, Jacek Generowicz
wrote:
What is the Haskell approach to efficient comparison and lookup of
objects
by their identity?
Often you just provide your own and implement Eq.
I should be able to run the program on data tha
On 2011 May 26, at 11:12, Brandon Allbery wrote:
On Thu, May 26, 2011 at 04:45, Jacek Generowicz > wrote:
What is the Haskell approach to efficient comparison and lookup of
objects by their identity?
ghc uses Data.Unique to generate unique internal identifiers to
associate with things.
A
On 26 May 2011 10:45, Jacek Generowicz wrote:
> What is the Haskell approach to efficient comparison and lookup of objects
> by their identity?
Often you just provide your own and implement Eq.
> I should be able to run the program on data that becomes available at run
> time.
Typically you def
On Thu, May 26, 2011 at 04:45, Jacek Generowicz wrote:
> What is the Haskell approach to efficient comparison and lookup of objects
> by their identity?
>
ghc uses Data.Unique to generate unique internal identifiers to associate
with things. (Think gensym. Hm, except last time I did anything se
[ TLDR: How do you do Lisp symbols in Haskell? ]
What is the Haskell approach to efficient comparison and lookup of
objects by their identity?
Maybe a toy example would help to explain what I mean.
Imagine that I want to use Haskell to maximize happiness in a
situation where a bunch of pe
16 matches
Mail list logo