Holes in GHC

Twan van Laarhoven twanvl at gmail.com
Thu Jan 26 17:26:18 CET 2012


On 25/01/12 16:21, Thijs Alkemade wrote:
> Hello!
>
> ...
>
> Examples:
>
> *Main>  :t [__, ()]
> tcRnExpr2: [(<interactive>:1:2-3, ())]
> [__, ()] :: [()]
>
> *Main>  :t map __ __
> tcRnExpr2: [(<interactive>:1:5-6, a0 ->  b), (<interactive>:1:8-9, [a0])]
> map __ __ :: [b]
>

You can do something similar right now with implicit parameters:

     Prelude> :set -XImplicitParams
     Prelude> :t [?a, ()]
     [?a, ()] :: (?a::()) => [()]
     Prelude> :t map ?a ?b
     map ?a ?b :: (?b::[a], ?a::a -> b) => [b]



Twan



More information about the Glasgow-haskell-users mailing list