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 JavaScriptFFI #-} | |
module XhrB (xhr) where | |
import GHCJS.Types | |
import Control.Exception (onException) | |
data XHR_ | |
type XHR = JSRef XHR_ |
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 ForeignFunctionInterface, ScopedTypeVariables, Rank2Types, JavaScriptFFI, OverloadedStrings #-} | |
module Main where | |
import Control.Applicative | |
import Control.Concurrent | |
import Control.Exception | |
import Control.Monad | |
import GHCJS.Types |
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 ForeignFunctionInterface, JavaScriptFFI, InterruptibleFFI, EmptyDataDecls, LambdaCase, ScopedTypeVariables, DeriveDataTypeable, BangPatterns #-} | |
{-| | |
XMLHttpRequest bindings using lightweight threads and GHCJS | |
These bindings are incomplete and serve as an illustration for | |
implementing asynchronous IO on GHCJS. | |
author: Luite Stegeman | |
-} |
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
#!/bin/bash | |
install_src_pkg() { | |
wget -q "http://ghcjs.github.io/packages/cabal-src/$1/$2/$1-$2.tar.gz" | |
tar -xzf "$1-$2.tar.gz" | |
cd "$1-$2" | |
cabal-src-install --src-only | |
cd .. | |
} |
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 TypeFamilies, | |
MultiParamTypeClasses, | |
FlexibleInstances, | |
UndecidableInstances, | |
FunctionalDependencies #-} | |
import Control.Concurrent | |
import Control.Monad | |
import Control.Monad.Fix |
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 ForeignFunctionInterface, QuasiQuotes #-} | |
module Main where | |
import Text.Blaze | |
import Text.Blaze.Renderer.String | |
import Text.Hamlet -- provided by hamlet package | |
foreign import ccall safe "sin" c_testImport :: Double -> IO Double |
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 ForeignFunctionInterface, QuasiQuotes #-} | |
module Main where | |
import Text.Blaze | |
import Text.Blaze.Renderer.String | |
import Text.Hamlet -- provided by hamlet package | |
foreign import ccall safe "sin" c_testImport :: Double -> IO Double |
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 ForeignFunctionInterface, QuasiQuotes #-} | |
module Main where | |
import Text.Blaze | |
import Text.Blaze.Renderer.String | |
import Text.Hamlet -- provided by hamlet package | |
foreign import ccall safe "sin" c_testImport :: Double -> IO Double |
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 QuasiQuotes #-} | |
module B where | |
import Text.Hamlet | |
import Text.Blaze | |
f :: Markup | |
f = [shamlet| <h1>Hello | |
<p>world |
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 ScopedTypeVariables #-} | |
module Main where | |
import Control.Applicative | |
import Control.Concurrent | |
import Control.Monad | |
import Data.Time.Clock | |
import Diagrams.Prelude | |
import Diagrams.Backend.Cairo | |
import System.Posix.Process |
NewerOlder