Hatena::Grouphaskell

suztomoの日記

 | 

2012-02-06

because type variable XXX would escape its scope

23:57

because type variable `s' would escape its scope - suztomoの日記 - haskellがとりあえず解けた

Type declarationをしたら動いた。

    login :: forall s m. (Route Auth -> Route m) -> GWidget s m ()
    login tm = do
        render <- lift getUrlRender
        let oaUrl = render $ tm $ oauthUrl name
        addHtml $
          [shamlet| <a href=#{oaUrl}>Login with #{name} |]

参考にしたページ。

Haskell - Haskell-Cafe - Enabling GADTs breaks Rank2Types code compilation - Why?

 |