Well that makes sense, but for a learner, how is he/she supposed to
know that 'i' could be '(i,i)' or for that matter a tuple of n of
those i's?
"STUArray s i e"
Could you also have a tuple of states?
Obviosly, 'e' could be a tuple, for instance (Int,Char)
--
Regards,
Casey
___
2009/9/25 Casey Hawthorne :
> Well that makes sense, but for a learner, how is he/she supposed to
> know that 'i' could be '(i,i)' or for that matter a tuple of n of
> those i's?
>
> "STUArray s i e"
>
> Could you also have a tuple of states?
>
> Obviosly, 'e' could be a tuple, for instance (Int,C
2009/9/25 minh thu :
> 2009/9/25 Casey Hawthorne :
>> Well that makes sense, but for a learner, how is he/she supposed to
>> know that 'i' could be '(i,i)' or for that matter a tuple of n of
>> those i's?
>>
>> "STUArray s i e"
>>
>> Could you also have a tuple of states?
>>
>> Obviosly, 'e' could
> From: haskell-cafe-boun...@haskell.org
> [mailto:haskell-cafe-boun...@haskell.org] On Behalf Of Andy Gimblett
> Sent: 24 September 2009 20:19
>
> On 24 Sep 2009, at 20:10, Duncan Coutts wrote:
>
> > On Thu, 2009-09-24 at 19:48 +0100, Andy Gimblett wrote:
> >
> >> That's great news for me, exce
Am Freitag 25 September 2009 09:22:25 schrieb Casey Hawthorne:
> Well that makes sense, but for a learner, how is he/she supposed to
> know that 'i' could be '(i,i)' or for that matter a tuple of n of
> those i's?
minh thu already explained this very well.
>
> "STUArray s i e"
>
> Could you also
Hello Casey,
Friday, September 25, 2009, 11:22:25 AM, you wrote:
> Well that makes sense, but for a learner, how is he/she supposed to
> know that 'i' could be '(i,i)' or for that matter a tuple of n of
> those i's?
look at Ix class instances:
http://www.haskell.org/ghc/docs/latest/html/librari
Hi,
Below is a function that returns a mirror of a tree, originally from:
http://www.nijoruj.org/~as/2009/04/20/A-little-fun.html
where it was used to demonstrate the use of Haskabelle(1) which converts
Haskell programs to the Isabelle theorem prover. Isabelle was used to
show that the Haskell im
It is not possible at the value level, because Haskell does not
support dependent types and thus cannot express the type of the
proposition "forall a . forall x:Tree a, mirror (mirror x) = x", and
therefore a proof term also cannot be constructed.
However, if you manage to express those trees at t
Haskell's records are a bit annoying, and type-classes often group together
too many methods, which means you make early decisions about future unknown
requirements, and IMO you always get it wrong :-)
After having read an email in the cafe about the Noop language & Self
language, I realized that w
Hi, I am pleased to announce the release of epoll bindings 0.2 available from:
http://hackage.haskell.org/package/epoll
Epoll is an I/O event notification facility for Linux similar to poll
but with good scaling characteristics. This release adds a buffer
abstraction on top of the existing low-le
One alternative approach is to use QuickCheck to test many trees and
look for counter-examples. You can also use SmallCheck to do an
exhaustive check up to a chosen size of tree.
To do this with QuickCheck you would write a function such as
prop_mirror :: Node a -> Bool
prop_mirror x =
Short answer: There is no good way of doing what you want.
This is actually one of my biggest annoyances with haskell (right up there
with disallowing infinite types). They are many techniques that work better
or worse depending on the application, but non are very satisfactory IMO.
Your typeclass
I've dabbled in haskell, but am by no means an expert. I was hoping
someone here could help me settle this debate so that we can more
seriously consider haskell for a next version of an application we're
building
I would like to understand better what its capabilities are for
directly
warrensomebody:
> I've dabbled in haskell, but am by no means an expert. I was hoping
> someone here could help me settle this debate so that we can more
> seriously consider haskell for a next version of an application we're
> building
>
> I would like to understand better what its capab
On Sep 25, 2009, at 12:14 PM, Don Stewart wrote:
It is entirely possible to use mmap to map structures into memory.
Thanks to the foreign function interface, there are well-defined
semantics for calling to and from C.
The key questions would be:
* what is the type and representation of the d
warrensomebody:
>
> On Sep 25, 2009, at 12:14 PM, Don Stewart wrote:
>
>>
>> It is entirely possible to use mmap to map structures into memory.
>> Thanks to the foreign function interface, there are well-defined
>> semantics for calling to and from C.
>>
>> The key questions would be:
>>
>> * what
On Fri, Sep 25, 2009 at 8:14 PM, Job Vranish wrote:
> Supposedly OCaml has an OO feature that does this but I haven't tried it
> out.
>
Indeed, OCaml has stuctural polymorphism, it's a wonderful feature.
*# let f myobj = myobj#foo "Hi !";;
val f : < foo : string -> 'a; .. > -> 'a = *
IIRC, the
On Fri, 25 Sep 2009 23:25:21 +0200, you wrote:
>On Fri, Sep 25, 2009 at 8:14 PM, Job Vranish wrote:
>
>> Supposedly OCaml has an OO feature that does this but I haven't tried it
>> out.
>>
>
>Indeed, OCaml has stuctural polymorphism, it's a wonderful feature.
>
>*# let f myobj = myobj#foo "Hi !";
Oleg,
On Thu, Sep 24, 2009 at 1:54 AM, wrote:
>
> The topic of an extensible, modular interpreter in the tagless final
> style has come up before. A bit more than a year ago, on a flight from
> Frankfurt to San Francisco I wrote two interpreters for a trivial
> subset of Haskell or ML (PCF actua
On Fri, 25 Sep 2009 23:25:21 +0200, you wrote:
>On Fri, Sep 25, 2009 at 8:14 PM, Job Vranish wrote:
>
>> Supposedly OCaml has an OO feature that does this but I haven't tried it
>> out.
>>
>
>Indeed, OCaml has stuctural polymorphism, it's a wonderful feature.
>
>*# let f myobj = myobj#foo "Hi !";
Brad Larsen wrote:
On Thu, Sep 24, 2009 at 8:36 PM, wren ng thornton wrote:
The reason this is unsatisfying is [...] if you need to lift
more than one variable in the same class then it can be tricky to do the
encoding right. For instance, when converting Monad into this form (e.g. so
we can de
Peter Verswyvelen wrote:
After having read an email in the cafe about the Noop language & Self
language, I realized that what I really would like to have is "strong duck
typing" on records (or is it called structural subtyping? or
prototype-based-objects? or something like that)
The common name
On Fri, Sep 25, 2009 at 10:55 PM, Casey Hawthorne wrote:
> On Fri, 25 Sep 2009 23:25:21 +0200, you wrote:
>
> >On Fri, Sep 25, 2009 at 8:14 PM, Job Vranish wrote:
> >
> >> Supposedly OCaml has an OO feature that does this but I haven't tried it
> >> out.
> >>
> >
> >Indeed, OCaml has stuctural p
23 matches
Mail list logo