[Haskell-cafe] [] == []

Yuji Yamamoto whosekiteneverfly at gmail.com
Tue Mar 10 02:48:30 UTC 2015


> And my main question is the second one :
For pedagogic purposes I want to get the error -- Whats the (family of)
related options?

This feature is called "type holes" introduced by GHC 7.8.1.
see https://wiki.haskell.org/GHC/Typed_holes in details.

2015-03-10 11:42 GMT+09:00 Rustom Mody <rustompmody at gmail.com>:

>
>
> On Tue, Mar 10, 2015 at 8:07 AM, Lyndon Maydwell <maydwell at gmail.com>
> wrote:
>
>> This looks like a great opportunity to try out the new holes
>> functionality:
>>
>> [Prelude] λ [] == _what
>>
>> <interactive>:3:7:
>>     Found hole ‘_what’ with type: [t0]
>>     Where: ‘t0’ is an ambiguous type variable
>>     Relevant bindings include it :: Bool (bound at <interactive>:3:1)
>>     In the second argument of ‘(==)’, namely ‘_what’
>>     In the expression: [] == _what
>>     In an equation for ‘it’: it = [] == _what
>>
>>
>> Looks like it defaults to [Bool]!
>>
>> Correct me if I'm wrong :)
>>
>
> Thanks Lyndon.
> But on my (debian testing) ghc I get:
>
> Prelude> [] == _what
>
> <interactive>:2:7: Not in scope: `_what'
>
> [ghc 7.6.3]
>
> And my main question is the second one :
> For pedagogic purposes I want to get the error -- Whats the (family of)
> related options?
>
>
> _______________________________________________
> Haskell-Cafe mailing list
> Haskell-Cafe at haskell.org
> http://mail.haskell.org/cgi-bin/mailman/listinfo/haskell-cafe
>
>


-- 
山本悠滋
twitter: @igrep
Facebook: http://www.facebook.com/igrep
Google+: https://plus.google.com/u/0/+YujiYamamoto_igrep
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.haskell.org/pipermail/haskell-cafe/attachments/20150310/7f8edbba/attachment.html>


More information about the Haskell-Cafe mailing list