[Haskell-cafe] Rank-2-polymorphism problem

Ian Lynagh igloo at earth.li
Fri Mar 23 14:46:16 EDT 2007


On Fri, Mar 23, 2007 at 02:18:50PM +0100, Martin Huschenbett wrote:
> 
> -- The type I want to get.
> readValue' :: Field -> (forall s. SqlBind s => Maybe s) -> Value
> 
> -- First trial:
> readValue' fld s =
>   if isJust s then readValue fld (fromJust s) else emptyValue fld

Is there a reason you don't want this?:

readValue' :: Field -> Maybe (forall s. SqlBind s => s) -> Value
readValue' fld s =
    if isJust s then readValue fld (fromJust s) else emptyValue fld


Thanks
Ian



More information about the Haskell-Cafe mailing list