MARK P. JONES
Pacific Software Research Center
Department of Computer Science and Engineering
Oregon Graduate Institute of Science and Technology
| {-# LANGUAGE FlexibleContexts #-} | |
| {-# LANGUAGE UndecidableInstances #-} | |
| {-# LANGUAGE ScopedTypeVariables #-} | |
| module Main where | |
| import Data.Reflection | |
| newtype QDouble = QDouble Double | |
| newtype Step = Step Double |
| import { NgFor } from '@angular/common' | |
| import { Component, QueryList, TemplateRef, ViewChild, ViewChildren, ViewContainerRef } from '@angular/core' | |
| @Component({ | |
| directives: [ | |
| NgFor | |
| ], | |
| selector: 'component', | |
| template: ` | |
| <ul><li #item *ngFor="let number of list">{{number}}</li></ul> |
| // / / | |
| // /' .,,,, ./ | |
| // /';' ,/ | |
| // / / ,,//,`'` | |
| // ( ,, '_, ,,,' `` | |
| // | /@ ,,, ;" ` | |
| // / . ,''/' `,`` | |
| // / . ./, `,, ` ; | |
| // ,./ . ,-,',` ,,/''\,' | |
| // | /; ./,,'`,,'' | | |
| {-# LANGUAGE GADTs #-} | |
| module Yolo where | |
| import System.IO.Unsafe | |
| class Yolo f where | |
| yolo :: f a -> a | |
| instance Yolo Maybe where | |
| yolo (Just x) = x |
CSS and SVG recreation of the new Google material design loading spinner.
Forked from Fran Pérez's Pen Material Design Spinner.
A Pen by Casper Pascal on CodePen.
| {-# LANGUAGE OverloadedStrings, RecordWildCards, LambdaCase #-} | |
| import Conduit | |
| import Data.Conduit | |
| import Data.Conduit.Network | |
| import qualified Data.ByteString.Char8 as BS | |
| import Data.Conduit.TMChan | |
| import Text.Printf (printf) | |
| import Control.Concurrent.STM | |
| import qualified Data.Map as Map |
| {-# LANGUAGE OverloadedStrings, TemplateHaskell, QuasiQuotes #-} | |
| import Data.Aeson | |
| import Data.Monoid | |
| import Data.Text (Text, unpack) | |
| import Control.Monad.Writer | |
| import qualified Data.Map as M | |
| import qualified Data.Vector as V | |
| import qualified Data.HashMap.Strict as H | |
| import Language.Haskell.TH |
| -- in reply to http://www.reddit.com/r/haskell/comments/21mja6/make_lllegal_state_transitions_unrepresentable/ | |
| -- | |
| -- We implement a tiny language with three commands: Open, Close, and Get. | |
| -- The first Get after an Open returns 1, the second Get returns 2, and so on. | |
| -- | |
| -- Get is only valid while the state is open, and | |
| -- Open must always be matched by a Close. | |
| -- We enforce both restrictions via the type system. | |
| -- | |
| -- There are two valid states: Opened and Closed. |
| -- in reply to http://www.reddit.com/r/haskell/comments/21mja6/make_lllegal_state_transitions_unrepresentable/ | |
| -- | |
| -- We implement a tiny language with three commands: Open, Close, and Get. | |
| -- The first Get after an Open returns 1, the second Get returns 2, and so on. | |
| -- | |
| -- Get is only valid while the state is open, and | |
| -- Open must always be matched by a Close. | |
| -- We enforce both restrictions via the type system. | |
| -- | |
| -- There are two valid states: Opened and Closed. |