作爲練習,我試圖定義一個NEWTYPE作爲功能的持有者,可以轉換Show -able值Eff學分,即: newtype ShEff a = ShEff (forall eff. Show a => a -> Eff eff Unit)
然而,這樣的: f :: forall a. ShEff a
f = ShEff logShow
失敗,此錯誤編譯: Could not match ty
我認爲我得到了錯誤的術語 - 讓我知道我應該用什麼來代替下面的內容。 在PureScript by Example, section 8.17 Mutable State,還有的runST類型的討論: runST :: forall a eff. (forall h. Eff (st :: ST h | eff) a) -> Eff eff a
這裏需要注意的一點是,區域類型h的括號內量化的功
我試圖從Read PureScript by Example book複製一個示例。 我收到此錯誤: Could not match type
Error
with type
ErrorEvent
這是我一直在使用,試圖讓這個例子的POC代碼。 import Prelude
import Control.Monad.Eff
import Control.Mona