purescript

    1熱度

    1回答

    我一直在尋找使用purescript和purescript-thermite的一個簡單的電子應用程序,但我遇到了一個障礙,需要找不到通過涼亭安裝的反應庫。下面是我得到的錯誤信息: Uncaught Error: Cannot find module 'react' at Module._resolveFilename (module.js:470:15) at Function

    1熱度

    1回答

    我試圖對稱爲Token的自定義類型實現show函數。我曾嘗試下面的代碼: type Token = { identifier :: String , value :: String } instance showToken :: Show Token where show t = "(Token " <> t.identifier <> ", " <>

    0熱度

    1回答

    試圖調用Eff從Aff內: import Prelude import Control.Monad.Aff (Aff, launchAff) import Control.Monad.Eff (Eff) import Control.Monad.Eff.Class (liftEff) import Control.Monad.Eff.Console (CONSOLE, log) impo

    1熱度

    1回答

    我有得到一個問題,下面來編譯: module ContrivedExample where import Prelude import Data.Either (Either(..)) import Control.Monad.Eff (Eff) import Control.Monad.Eff.Exception (EXCEPTION, throw) import Control.M

    2熱度

    1回答

    在purescript,具有循環依賴記錄可以聲明如下 newtype User = User { name :: String , organization :: Organization } newtype Organization = Organization { name :: String , users :: List Use

    2熱度

    1回答

    我使用鹵素來控制我的應用程序的菜單系統,我想知道如何「銷燬」鹵素組件。現在,我有一個函數可以在具有特定ID的div上創建子菜單組件。在應用程序的整個生命週期中,可以多次訪問子菜單,因此當調用visitSubMenu函數時,當前會創建該組件的多個實例。 import Halogen.Aff as HA import Halogen.VDom.Driver (runUI) visitSubMen

    1熱度

    1回答

    我已經定義了一個單子變壓器UlffT如下。 我正在與Halogen,但這不是Halogen -question - 我只是提供上下文。 UlffT意味着堆疊在Aff上,並在HalogenM中使用。 newtype UlffT m a = UlffT (ExceptT Error (ReaderT Env m) a) unUlffT :: forall m. UlffT m ~> ExceptT

    0熱度

    2回答

    我編寫了一個非常簡單的解析器組合器庫,它似乎可以正常工作(https://github.com/mukeshsoni/tinyparsec)。 然後我試着用庫爲json編寫解析器。對於JSON解析器的代碼是在這裏 - https://github.com/mukeshsoni/tinyparsec/blob/master/src/example_parsers/JsonParser.purs 對J

    1熱度

    1回答

    在purescript-free包,有一個代碼示例定義這個解釋: teletypeN :: forall eff. NaturalTransformation TeletypeF (Eff (console :: CONSOLE | eff)) teletypeN (PutStrLn s a) = const a <$> log s teletypeN (GetLine k) = pure (

    1熱度

    1回答

    在以下代碼中,如何讓cataM自上而下遍歷樹(而不是像現在這樣是自下而上的)? 我想我應該實現foldMap不同,但因爲branch如何給孩子之前處理branch節點本身沒有t實例,它兒都沒有? module Catatree where import Data.Foldable import Data.Traversable import Data.Monoid import Data