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 Control.Applicative | |
import Control.Monad.State | |
import Control.Monad.Trans.Maybe | |
import Data.Function | |
import System.Environment | |
import Debug.Trace | |
type Input = 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
data Country = US | |
deriving (Eq, Generic, Read, Show, Typeable) | |
instance ToJSON Country where | |
toEncoding = genericToEncoding $ defaultOptions { | |
constructorTagModifier = fmap toLower | |
} | |
instance FromJSON Country where | |
parseJSON = genericParseJSON $ defaultOptions { |
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
$ stack build | |
Error: No such object: fpco/stack-build:lts-12.17 | |
Received ExitFailure 1 when running | |
Raw command: /usr/bin/docker inspect fpco/stack-build:lts-12.17 | |
Standard output: | |
[] |
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
enum ItemType { | |
BunBottom, | |
BunTop, | |
Burger | |
} | |
type Cooked = [ number, number ] | |
type Item = { | |
type: ItemType.BunBottom |
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 { Stream } from 'most'; | |
import * as most from 'most'; | |
type Maybe<T> = null | T | |
type Position = [number, number] | |
export function dragPositionStream( | |
touchStart$: Stream<TouchEvent>, | |
touchMove$: Stream<TouchEvent>, | |
touchEnd$: Stream<TouchEvent> |