This file contains 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 std::time::Duration; | |
pub use OpF::*; | |
// Simple operation, with open recursion | |
#[derive(Debug, Clone)] | |
pub enum OpF<R> { | |
Once(String, Duration), | |
Par(Vec<R>), | |
Seq(Vec<R>), | |
Repeat { times: u32, cmd: Box<R> }, |
This file contains 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
class MouseDir extends ReactishHook<number> { | |
cur = this.useState({ x: 0, y: 0 }) | |
prev = this.useState({ x: 0, y: 0 }) | |
init () { | |
document.addEventListener('mousemove', this.handle) | |
} | |
dispose () { | |
document.removeEventListener('mousemove', this.handle) |
This file contains 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 | |
DeriveFunctor | |
, DeriveFoldable | |
, DeriveTraversable | |
, StandaloneDeriving | |
, ViewPatterns | |
, PatternSynonyms | |
#-} | |
-- AST independent |
This file contains 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 | |
import Control.Monad | |
import Data.Time.Clock | |
import Data.List | |
import Network.HTTP.Client | |
import System.IO | |
import qualified Data.ByteString.Lazy as Lazy |
This file contains 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 GADTs, RankNTypes, TypeOperators, TupleSections #-} | |
module Algebra where | |
import Control.Category | |
import Control.Arrow | |
import Control.Applicative | |
import Label.Simple (get) | |
import Prelude hiding ((.), id) | |
import Generics.Combinator |
This file contains 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
var user = | |
{ username : "foo bar" | |
, password : "super secret" | |
, sessionHistory : [ "Tue Aug 26 2014 16:58:14 GMT+0200 (CEST)" | |
, "Wed Aug 27 2014 16:58:14 GMT+0200 (CEST)" | |
, "Fri Aug 29 2014 16:58:14 GMT+0200 (CEST)" | |
] | |
, moneys : { amount : "-12" | |
, currency : "EUR" | |
} |
This file contains 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 | |
RebindableSyntax | |
, GADTs | |
, MultiParamTypeClasses | |
, FlexibleContexts | |
, FlexibleInstances | |
, FunctionalDependencies | |
, TypeFamilies | |
, UndecidableInstances | |
#-} |
This file contains 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
{- | The Label data type which generalizes the different lenses. -} | |
{-# LANGUAGE GADTs, FlexibleInstances #-} | |
module Data.Label.Label | |
( | |
-- * The point data type that generalizes lens. | |
Label | |
, get | |
, modify | |
, set |
This file contains 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 | |
Arrows | |
, FlexibleInstances | |
, MultiParamTypeClasses | |
, TypeOperators | |
#-} | |
module Path where | |
import Control.Arrow | |
import Control.Category |
This file contains 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 | |
DeriveFunctor | |
, GADTs | |
, GeneralizedNewtypeDeriving | |
, TypeOperators | |
, TypeFamilies | |
, RankNTypes | |
#-} | |
module HigherOrder where |
NewerOlder