This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
in chrome console: | |
JavaScript exception: ReferenceError: h$closeWebSocket is not defined | |
rts.js:9543 user error (If you can read this, shutdownHaskellAndExit did not exit.) | |
rts.js:9543 user error (If you can read this, shutdownHaskellAndExit did not exit.) | |
rts.js:9543 user error (If you can read this, shutdownHaskellAndExit did no | |
.... | |
.... |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#ifndef ghcjs_HOST_OS | |
static= id | |
dynamic= id | |
strip= id | |
inputInt :: Maybe Int -> TransIO Int | |
inputInt _ = empty | |
inputSubmit :: String -> TransIO String |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
module Main where | |
import Lib | |
import Model | |
import GHCJS.HPlay.View hiding (input, option, pack) | |
import qualified GHCJS.Perch as P (input) | |
import Transient.Base | |
import Transient.Move |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import Transient.Base | |
import Network | |
import System.IO | |
import Control.Monad.IO.Class | |
import Control.Applicative | |
-- taken from Pipes example | |
-- https://www.reddit.com/r/haskell/comments/2jvc78/simple_haskell_irc_client_in_two_lines_of_code/?st=iqj5yxg1&sh=0cb8cc11 | |
-- Simple Haskell IRC client in "two lines of code" |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
cb <- syncCallback1 ContinueAsync | |
(\r -> do | |
(x,y) <-fromJSValUnchecked r | |
stopPropagation r | |
print (x, y)) | |
js_addEventListener elem "mousemove" cb |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{-# LANGUAGE OverloadedStrings #-} | |
-- haskell-transient application for the websocket shootout | |
-- https://github.com/hashrocket/websocket-shootout | |
-- this is the implementation of the benchmark with the transient libraries | |
-- https://github.com/transient-haskell | |
import Transient.Internals |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env ./buildrun2.sh | |
{-# LANGUAGE CPP, NoMonomorphismRestriction, DeriveDataTypeable #-} | |
module Main where | |
import Prelude hiding (div,id) | |
import Transient.Internals |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
set -e | |
port=`echo ${3} | awk -F/ '{print $(3)}'` | |
docker run -it -p ${port}:${port} -v $(pwd):/work agocorona/transient:01-27-2017 bash -c "mkdir -p static && ghcjs --make /work/${1} -o static/out && runghc /work/${1} ${2} ${3}" |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
from agocorona/transient-0.4.4.1 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
-- hplayground by mark mann | |
-- identify user and record round by round results | |
{-# LANGUAGE DeriveDataTypeable, FlexibleInstances, UndecidableInstances #-} | |
module Main where | |
import Haste | |
import Haste.Foreign | |
import Haste.LocalStorage | |
import Haste.JSON (JSON(..)) |