[Haskell-cafe] strange type mismatch when trying to use takusen

Taral taralx at gmail.com
Fri Nov 24 01:13:11 EST 2006


On 11/23/06, Seth Gordon <sethg at ropine.com> wrote:
> takusen-test.hs:11:57:
>      Couldn't match expected type `forall mark. DBM mark Session a'
>             against inferred type `DBM mark sess ()'
>      In the second argument of `($)', namely `main''
>      In the expression:
>            (withSession (connect [CAdbname "template1"])) $ main'
>      In the expression:
>          do (withSession (connect [CAdbname "template1"])) $ main'

Ah, the dreaded $ with existential types problem. $ is not quite
equivalent to application -- the type checker does something funny
with forall types. Just take out the $ and you'll be fine.

-- 
Taral <taralx at gmail.com>
"You can't prove anything."
    -- Gödel's Incompetence Theorem


More information about the Haskell-Cafe mailing list