[Haskell-cafe] Type checking of partial programs

Roberto Zunino zunino at di.unipi.it
Thu Mar 20 16:36:43 EDT 2008


ac wrote:
> foo :: [Foo] -> <placeholder 1>
> foo xs = map <placeholder 2> xs
> 
> What are the possible type signatures for placeholder 1 and the possible
> expressions for placeholder 2?

A nice GHCi trick I learned from #haskell:

> :t let foo xs = map ?placeholder2 xs in foo

  forall a b. (?placeholder2::a -> b) => [a] -> [b]

Also, the djinn tool might provide some actual expression for placeholder 2.

Zun.


More information about the Haskell-Cafe mailing list