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 Prelude | |
import Effect (Effect) | |
import Data.Foldable (fold) | |
import TryPureScript (p, text, render) | |
import Data.Symbol (SProxy(..), reflectSymbol) | |
type T = SProxy "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
{ | |
"name": "xink", | |
"version": "0.1.0", | |
"description": "WIP", | |
"main": "index.js", | |
"directories": { | |
"test": "tests" | |
}, | |
"scripts": { | |
"clean": "rimraf ./docs ./public", |
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
"use strict"; | |
// -- stdlib -- | |
var pure = a=>_=>a // pure :: a -> IO a | |
var bind = m=>f=>_=>f(m())() // bind :: IO a -> (a -> IO b) -> IO b | |
var exec = m=>m() // exec :: IO a -> a | |
var wrap = f=>a=>_=>f(a) // wrap :: (a -> b) -> (a -> IO b) | |
var put = wrap(console.log.bind(console)) // put :: a -> IO () | |
var get = wrap(url=>{ // get :: string -> IO string | |
var xhr = new XMLHttpRequest() |
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 Prelude | |
import Effect (Effect) | |
import Effect.Console (logShow) | |
import Control.Monad.ST (run, for) | |
import Data.Array.ST.Partial (peek) | |
import Data.Array.ST (thaw, push) | |
import Partial.Unsafe (unsafePartial) |
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 exposing (Model, Msg(..), init, main, update, view) | |
import Browser exposing (UrlRequest(..)) | |
import Browser.Navigation exposing (Key, load, pushUrl) | |
import Html exposing (Html, a, div, h1, img, p, text) | |
import Html.Attributes exposing (href, src) | |
import Url as Url exposing (Url) | |
import Url.Parser exposing (Parser, map, oneOf, parse, s, top) | |
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
exports.objectToArray = function(xs){ | |
return Object.keys(xs).sort().map(function(key){ | |
debugger | |
return xs[key] | |
}) | |
} | |
exports.arrayToObject = function(xs){ | |
return function(values){ | |
const row = {} |
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 Control.IxMonad (ibind, (:>>=)) | |
import Control.Monad.Eff (Eff) | |
import Control.Monad.Eff.Console (CONSOLE) | |
import Data.MediaType.Common (textPlain) | |
import Hyper.Node.Server (defaultOptionsWithLogging, runServer) | |
import Hyper.Response (closeHeaders, contentType, end, send, toResponse, writeStatus) | |
import Hyper.Status (statusOK) | |
import Node.HTTP (HTTP) |
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 Control.Applicative (class Applicative, pure) | |
import Control.Bind (bind) | |
import Control.Category (id) | |
import Control.Monad (class Monad) | |
import Control.Monad.Aff (Aff, forkAff, later', makeAff, runAff) | |
import Control.Monad.Aff.Console (CONSOLE, log, logShow) | |
import Control.Monad.Eff (Eff) | |
import Control.Monad.Eff.Class (liftEff) |
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 Prelude (Unit) | |
import Control.Monad.Eff (Eff) | |
import Control.Monad.Eff.Console (CONSOLE, log) | |
import Data.Symbol (SProxy(SProxy), reflectSymbol) | |
data True | |
data False |
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 Control.Monad.Eff (Eff) | |
import Control.Monad.Eff.Console (CONSOLE, logShow) | |
import Data.Function (const) | |
import Prelude (Unit, (+)) | |
import Type.Proxy (Proxy(..)) | |
data Zero | |
data Succ a |
NewerOlder