[Haskell-cafe] Need some help figuring out how to use the repl with reflex using only stack
Magnus Therning
magnus at therning.org
Fri Aug 3 15:16:16 UTC 2018
Michael Litchard <litchard.michael at gmail.com> writes:
> I've found a solution. I'm sure your answer helps someone with a
> different
> problem.
And your solution was?
/M
> On Fri, Jul 27, 2018 at 7:47 AM, Sridhar Ratnakumar <
> pervasiveproximity at gmail.com> wrote:
>
>> This doesn't directly answer your question, however in the case
>> that all
>> you want is to get started with a simple Reflex-DOM app, I'd
>> suggest
>> starting with obelisk:
>> - https://github.com/obsidiansystems/obelisk
>> - https://youtu.be/riJuXDIUMA0?t=30m15s
>>
>> Then you can just run `ob repl` to get into the repl.
>>
>> cheers,
>> -srid
>> https://www.srid.ca/
>>
>>
>> On Tue, 24 Jul 2018 at 14:04, Michael Litchard
>> <litchard.michael at gmail.com>
>> wrote:
>>
>>> I've created a minimal example to show you what I've tried.
>>> Below is also
>>> a truncated error log. Could someone help me figure out how to
>>> get ghci
>>> working with this example?
>>>
>>> https://github.com/mlitchard/reflex-todo
>>>
>>> stack repl --stack-yaml=stack-ghc.yaml
>>>
>>> Truncated error log
>>>
>>> Error: -- While building custom Setup.hs for package
>>> jsaddle-dom-0.9.2.0
>>> using:
>>> /home/mlitchard/.stack/setup-exe-cache/x86_64-linux/Cabal-
>>> simple_mPHDZzAJ_1.24.2.0_ghc-8.0.2
>>> --builddir=.stack-work/dist/x86_64-linux/Cabal-1.24.2.0
>>> build lib:jsaddle-dom --ghc-options " -ddump-hi
>>> -ddump-to-file" Process
>>> exited with code: ExitFailure 1 Logs have been written to:
>>> /home/mlitchard/projects/git/reflex-todo/.stack-work/logs/
>>> jsaddle-dom-0.9.2.0.log
>>>
>>> Preprocessing library jsaddle-dom-0.9.2.0... [587 of 599]
>>> Compiling
>>> JSDOM.Custom.XMLHttpRequest (
>>> src/JSDOM/Custom/XMLHttpRequest.hs,
>>> .stack-work/dist/x86_64-linux/Cabal-1.24.2.0/build/JSDOM/Custom/XMLHttpRequest.o
>>> ) /home/mlitchard/projects/git/reflex-todo/.stack-work/
>>> downloaded/Vheiln5kqwE0/src/JSDOM/Custom/XMLHttpRequest.hs:39:46:
>>> error:
>>> • Could not deduce (Control.Monad.Catch.MonadThrow
>>> Language.Javascript.JSaddle.Types.JSM) arising from a use of
>>> ‘throwM’
>>> from the context: MonadDOM m bound by the type signature for:
>>> throwXHRError
>>> :: MonadDOM m => Maybe XHRError -> m () at
>>> src/JSDOM/Custom/XMLHttpRequest.hs:38:1-53
>>> • In the second argument of ‘(.)’, namely ‘throwM’ In the
>>> second argument
>>> of ‘maybe’, namely ‘(liftDOM . throwM)’ In the expression:
>>> maybe (return
>>> ()) (liftDOM . throwM) /home/mlitchard/projects/git/
>>> reflex-todo/.stack-work/downloaded/Vheiln5kqwE0/src/
>>> JSDOM/Custom/XMLHttpRequest.hs:42:20: error: • No instance for
>>> (Control.Monad.Catch.MonadMask
>>> Language.Javascript.JSaddle.Types.JSM)
>>> arising from a use of ‘bracket’ • In the first argument of
>>> ‘(.)’, namely
>>> ‘bracket aquire id’ In the expression: bracket aquire id .
>>> const In an
>>> equation for ‘withEvent’: withEvent aquire = bracket aquire id
>>> . const
>>> /home/mlitchard/projects/git/reflex-todo/.stack-work/
>>> downloaded/Vheiln5kqwE0/src/JSDOM/Custom/XMLHttpRequest.hs:45:31:
>>> error:
>>> • Could not deduce (Control.Monad.Catch.MonadCatch
>>> Language.Javascript.JSaddle.Types.JSM) arising from an
>>> operator section
>>> from the context: MonadDOM m bound by the type signature for:
>>> send' ::
>>> MonadDOM m => XMLHttpRequest -> Maybe JSVal -> m () at
>>> src/JSDOM/Custom/XMLHttpRequest.hs:44:1-62
>>> • In the expression: (`onException` abort self) In the second
>>> argument of
>>> ‘($)’, namely ‘(`onException` abort self) $ do { result <-
>>> liftIO
>>> newEmptyMVar; r <- withEvent (onAsync self Generated.error .
>>> liftIO $
>>> putMVar result (Just XHRError)) $ withEvent (onAsync self
>>> abortEvent .
>>> liftIO $ putMVar result (Just XHRAborted)) $ withEvent
>>> (onAsync self load .
>>> liftIO $ putMVar result Nothing) $ do { void $ case mbVal of {
>>> Nothing ->
>>> ... Just val -> ... }; liftIO $ takeMVar result };
>>> throwXHRError r }’ In
>>> the expression: liftDOM $ (`onException` abort self) $ do {
>>> result <-
>>> liftIO newEmptyMVar; r <- withEvent (onAsync self
>>> Generated.error . liftIO
>>> $ putMVar result (Just XHRError)) $ withEvent (onAsync self
>>> abortEvent .
>>> liftIO $ putMVar result (Just XHRAborted)) $ withEvent
>>> (onAsync self load .
>>> liftIO $ putMVar result Nothing) $ do { void $ case mbVal of {
>>> Nothing ->
>>> ... Just val -> ... }; liftIO $ takeMVar result };
>>> throwXHRError r }
>>> _______________________________________________
>>> Haskell-Cafe mailing list
>>> To (un)subscribe, modify options or view archives go to:
>>> http://mail.haskell.org/cgi-bin/mailman/listinfo/haskell-cafe
>>> Only members subscribed via the mailman list are allowed to
>>> post.
>>
>>
> _______________________________________________
> Haskell-Cafe mailing list
> To (un)subscribe, modify options or view archives go to:
> http://mail.haskell.org/cgi-bin/mailman/listinfo/haskell-cafe
> Only members subscribed via the mailman list are allowed to
> post.
--
Magnus Therning OpenPGP: 0x927912051716CE39
email: magnus at therning.org jabber: magnus at therning.org
twitter: magthe http://therning.org/magnus
Computers are useless. They can only give you answers.
— Pablo Picasso
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 832 bytes
Desc: not available
URL: <http://mail.haskell.org/pipermail/haskell-cafe/attachments/20180803/d27bb8be/attachment.sig>
More information about the Haskell-Cafe
mailing list