Message from discussion
<:< versus HKT
Received: by 10.180.95.2 with SMTP id dg2mr949257wib.2.1348067341752;
Wed, 19 Sep 2012 08:09:01 -0700 (PDT)
X-BeenThere: scala-user@googlegroups.com
Received: by 10.216.204.33 with SMTP id g33ls1595127weo.9.gmail; Wed, 19 Sep
2012 08:08:57 -0700 (PDT)
Received: by 10.180.103.37 with SMTP id ft5mr1005862wib.0.1348067337701;
Wed, 19 Sep 2012 08:08:57 -0700 (PDT)
Received: by 10.180.103.37 with SMTP id ft5mr1005861wib.0.1348067337692;
Wed, 19 Sep 2012 08:08:57 -0700 (PDT)
Return-Path: <alan.burli...@gmail.com>
Received: from mail-we0-f172.google.com (mail-we0-f172.google.com [74.125.82.172])
by gmr-mx.google.com with ESMTPS id i17si3312848wiw.0.2012.09.19.08.08.57
(version=TLSv1/SSLv3 cipher=OTHER);
Wed, 19 Sep 2012 08:08:57 -0700 (PDT)
Received-SPF: pass (google.com: domain of alan.burli...@gmail.com designates 74.125.82.172 as permitted sender) client-ip=74.125.82.172;
Authentication-Results: gmr-mx.google.com; spf=pass (google.com: domain of alan.burli...@gmail.com designates 74.125.82.172 as permitted sender) smtp.mail=alan.burli...@gmail.com; dkim=pass header...@gmail.com
Received: by mail-we0-f172.google.com with SMTP id x48so810076wey.17
for <scala-user@googlegroups.com>; Wed, 19 Sep 2012 08:08:57 -0700 (PDT)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
d=gmail.com; s=20120113;
h=message-id:date:from:user-agent:mime-version:to:cc:subject
:references:in-reply-to:content-type:content-transfer-encoding;
bh=VA3WVd3vY8BSW4G47kmn9Ui/gL/Oniq3Y0oUyXT7z/s=;
b=ZlJGnOJkEF/zPF6quggP2b4C1CEybJ/Np17QaSLbyeJNQCgnzimZmfdLOG29fNyuqe
wKexmDUT5KvFSePzdL26JH2OiqOe+KXGi87/g3HCdLU43PHm3+u3DHeJcTrOc7ilZnOl
arzxzglmqGvqclq/kfXR0GGmSO/pBVKNzlgnIRrue/U1f0RdrM+kMrqag7Q1eI0OrIHX
uae5mOuAd6JBa++Njoc0T/813a/uGfxfD28hyJr717woEvHTAHXhULIxl3DKiHf0Raqa
hcX2LhsGQiqFUM3TPUO17CDGOl9rrF/P2+oEoLM+TIu+eFxUXdum1yg+DJa6BG8h8zBc
Pblw==
Received: by 10.216.145.88 with SMTP id o66mr1926455wej.169.1348067337493;
Wed, 19 Sep 2012 08:08:57 -0700 (PDT)
Return-Path: <alan.burli...@gmail.com>
Received: from [192.168.2.3] (host81-149-45-14.in-addr.btopenworld.com. [81.149.45.14])
by mx.google.com with ESMTPS id t7sm5421636wix.6.2012.09.19.08.08.55
(version=TLSv1/SSLv3 cipher=OTHER);
Wed, 19 Sep 2012 08:08:56 -0700 (PDT)
Message-ID: <5059E006.1080...@gmail.com>
Date: Wed, 19 Sep 2012 16:08:54 +0100
From: Alan Burlison <alan.burli...@gmail.com>
User-Agent: Mozilla/5.0 (X11; SunOS i86pc; rv:6.0.2) Gecko/20111003 Thunderbird/6.0.2
MIME-Version: 1.0
To: missingfaktor <rahul.phulore....@gmail.com>
CC: Ken Scambler <ken.scamb...@gmail.com>, scala-user@googlegroups.com
Subject: Re: [scala-user] <:< versus HKT
References: <5058380A.1040...@gmail.com> <CAD0r2UxXLx62pA88p7SpEZpa4QOzO7RyLnyoYH=391nD3gq...@mail.gmail.com> <5058B89D.9060...@gmail.com> <CAB4BcKh5yvh6238waEDGMrFUOkPWNFG0oB=yBSSEVZ3TQud...@mail.gmail.com>
In-Reply-To: <CAB4BcKh5yvh6238waEDGMrFUOkPWNFG0oB=yBSSEVZ3TQud...@mail.gmail.com>
Content-Type: text/plain; charset=ISO-8859-1; format=flowed
Content-Transfer-Encoding: 7bit
On 19/09/2012 13:10, missingfaktor wrote:
> This thread might help too.
> https://groups.google.com/forum/#!topic/scala-user/s38hv6culCw
A bit. I'm still not 100% clear when you *must* use implicit evidence
parameters because nothing else will work. For example, in the toMap
example, if you need the supplied list to consist of 2-tuples, why can't
you just say that directly using the Tuple2 type?
In the example you give in the thread
(https://groups.google.com/d/msg/scala-user/s38hv6culCw/ssVM5X0ewbMJ) I
can see that you are using 'implicit ev: A =:= Int' to in effect defer
the check that A is an Int until that method is actually used.
However, I'm not clear in the toMap case why implicit evidence
parameters are necessary and a use of Tuple2 won't work, although I'm
struggling to come up with something that the Scala compiler actually likes.
Thanks for the link though, it did help some :-)
--
Alan Burlison
--