Send Beginners mailing list submissions to
[email protected]
To subscribe or unsubscribe via the World Wide Web, visit
http://www.haskell.org/mailman/listinfo/beginners
or, via email, send a message with subject or body 'help' to
[email protected]
You can reach the person managing the list at
[email protected]
When replying, please edit your Subject line so it is more specific
than "Re: Contents of Beginners digest..."
Today's Topics:
1. Re: Heterogeneous Lists (Mike Ledger)
2. haskell solution for assignment (Arthur Vard)
----------------------------------------------------------------------
Message: 1
Date: Tue, 28 May 2013 20:31:08 +1000
From: Mike Ledger <[email protected]>
Subject: Re: [Haskell-beginners] Heterogeneous Lists
To: The Haskell-Beginners Mailing List - Discussion of primarily
beginner-level topics related to Haskell <[email protected]>
Message-ID:
<calq6zwyu4gqvxyx1thzszckk4kyhtz5pmdgxnkvnszhpc8u...@mail.gmail.com>
Content-Type: text/plain; charset="iso-8859-1"
With ConstraintKinds, ExistentialQuantification, StandaloneDeriving and
FlexibleInstances, this works:
>>> data Some f = forall a. f a => Some a
>>> deriving instance Show (Some Show)
>>> show ([Some [0..10], Some (), Some Nothing, Some "asdf"] :: [Some Show])
"[Some [0,1,2,3,4,5,6,7,8,9,10],Some (),Some Nothing,Some \"asdf\"]"
On Tue, May 28, 2013 at 6:04 PM, Magnus Therning <[email protected]>wrote:
> On Tue, May 28, 2013 at 9:36 AM, harry <[email protected]> wrote:
> > Every OO language which supports generics allows a declaration such as
> > List<Show> alist, where Show is an interface. Any type implementing Show
> can
> > be put in alist, and any Show operation can be performed on the alist's
> > members. No casts, wrappers, or other special types and plumbing are
> needed.
> >
> > Why isn't it possible to do this directly in Haskell?
>
> Just to make sure... I guess you've already read
> http://www.haskell.org/haskellwiki/Heterogenous_collections right?
>
> /M
>
> --
> Magnus Therning OpenPGP: 0xAB4DFBA4
> email: [email protected] jabber: [email protected]
> twitter: magthe http://therning.org/magnus
>
> _______________________________________________
> Beginners mailing list
> [email protected]
> http://www.haskell.org/mailman/listinfo/beginners
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL:
<http://www.haskell.org/pipermail/beginners/attachments/20130528/3fa1a1cc/attachment-0001.htm>
------------------------------
Message: 2
Date: Tue, 28 May 2013 17:34:58 +0400
From: Arthur Vard <[email protected]>
Subject: [Haskell-beginners] haskell solution for assignment
To: [email protected]
Message-ID:
<CACu31AQ5nkWpiZy5=6-7m-r6rkuhypgfvwgckkr-njdomut...@mail.gmail.com>
Content-Type: text/plain; charset="iso-8859-1"
HI,
i am new in Haskell my thinking mostly fit in OOP languages I attached and
post link to assignement which i done using C# (can post source if
anyone interested in), now i am want to implement it using Haskell.
I need feel true Haskell style, for this I think will help i I have the
haskell solution for this assignment as well and compare.
Does anybody have similar solution in haskell?
Assignment 3: Managing
a<http://www.cs.cornell.edu/Info/Courses/Spring-98/CS211/assgts/assgt3/assgt3.pdf>
Component Dependency
Database<http://www.cs.cornell.edu/Info/Courses/Spring-98/CS211/assgts/assgt3/assgt3.pdf>
thank you in advance
---------------------------------
Arthur Vardanyan
Yerevan, Armenia
Tel: +374(10)647301
Mobile : +374(93) 184646
-------------- next part --------------
An HTML attachment was scrubbed...
URL:
<http://www.haskell.org/pipermail/beginners/attachments/20130528/d8f055ba/attachment.htm>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: Problem A..doc
Type: application/msword
Size: 35840 bytes
Desc: not available
URL:
<http://www.haskell.org/pipermail/beginners/attachments/20130528/d8f055ba/attachment.doc>
------------------------------
_______________________________________________
Beginners mailing list
[email protected]
http://www.haskell.org/mailman/listinfo/beginners
End of Beginners Digest, Vol 59, Issue 36
*****************************************