Project now compiles.

master
Philippe Pittoli 2023-05-19 23:50:24 +02:00
parent 618998cd68
commit c94a509f0d
3 changed files with 10 additions and 2 deletions

View File

@ -1,4 +1,5 @@
let upstream =
https://github.com/purescript/package-sets/releases/download/psc-0.15.4-20220816/packages.dhall sha256:8b4467b4b5041914f9b765779c8936d6d4c230b1f60eb64f6269c71812fd7e98
https://github.com/purescript/package-sets/releases/download/psc-0.15.8-20230517/packages.dhall
sha256:8b94a0cd7f86589a6bd06d48cb9a61d69b66a94b668657b2f10c8b14c16e028c
in upstream

View File

@ -6,16 +6,20 @@
, "arraybuffer-builder"
, "arraybuffer-types"
, "arrays"
, "bifunctors"
, "codec-argonaut"
, "console"
, "const"
, "effect"
, "either"
, "exceptions"
, "foreign"
, "halogen"
, "halogen-subscriptions"
, "lists"
, "maybe"
, "parsing"
, "parsing-dataview"
, "prelude"
, "strings"
, "transformers"

View File

@ -18,9 +18,11 @@ import Data.ArrayBuffer.Builder as Builder
import Data.ArrayBuffer.Cast as Cast
import Control.Monad.Trans.Class (lift)
import Control.Monad.Except (ExceptT(ExceptT), withExceptT)
import Data.ArrayBuffer.Typed as Typed
import Data.ArrayBuffer.DataView as DataView
import Parsing.DataView as Parsing.DataView
import Parsing as Parsing
import Parsing (ParserT(..), ParseError(..), runParserT)
import Data.String.CodeUnits as CU
@ -34,6 +36,7 @@ import Data.Char (fromCharCode)
import Data.ArrayBuffer.DataView as DV
import Effect.Unsafe
import Data.Either (Either(Left, Right), either, note, hush)
import Effect.Exception as Exception
utf8ToArrayBuffer :: String -> Effect ArrayBuffer
utf8ToArrayBuffer s = Builder.execPutM do
@ -50,7 +53,7 @@ toIPC = utf8ToArrayBuffer
fromIPC :: ArrayBuffer -> Effect String
fromIPC ab = arrayBufferToUtf8 ab >>= case _ of
Left parseError -> do
pure parseError
pure $ show parseError
Right string -> do
pure string