Roman Gonzalez will introduce Elm, an opinionated language that is inspired on a simplified Haskell syntax. Elm provides all the guarantees that good statically typed languages give, plus:
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
{-# START_FILE README.md #-} | |
# {{name}} | |
> Description of what this library does | |
## Table Of Contents | |
* [Raison d'etre](#raison-detre) | |
* [Library Usage](#library-usage) | |
* [Installation](#installation) | |
* [Development Notes](#development) |
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
import Control.Concurrent (forkIO, killThread, | |
threadDelay, newEmptyMVar, | |
tryTakeMVar, putMVar) | |
import Control.Monad (void, forever) | |
import Control.Concurrent.STM (atomically) | |
import Control.Monad.Trans (MonadIO(..)) | |
import Control.Monad.Trans.Resource (MonadResource, allocate) | |
import Data.Conduit (GInfConduit, awaitE) | |
throttle :: (MonadResource m) => Int -> GInfConduit a m a |
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
numbers :: [Int] | |
numbers = zip [1, 2, 3] [4, 5, 6] | |
main :: IO () | |
main = print numbers | |
-- Output: [(1,4), (2,5), (3,6)] |
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.List (foldl') | |
import qualified Data.Sequence as Seq | |
import qualified Data.Vector (freeze) | |
import qualified Data.Vector.Unboxed as V | |
import qualified Data.Vector.Unboxed.Mutable as VM |
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 Data.List (sort, sortBy) | |
import Control.Applicative | |
import Control.Monad (forM, replicateM_) | |
import Data.Set (Set) | |
import qualified Data.Set as Set | |
import qualified Data.Sequence as Seq | |
import qualified Data.Vector (freeze) | |
import qualified Data.Vector.Unboxed as V |
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 (forM, replicateM_) | |
import qualified Data.Vector (freeze) | |
import qualified Data.Vector.Unboxed as V | |
import qualified Data.Vector.Unboxed.Mutable as VM | |
mkPolygonVector :: IO (V.Vector Int) |
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 GlobRegex | |
( | |
globToRegex, | |
matchesGlob | |
) | |
where | |
import Text.Regex.Posix ((=~)) | |
import Data.Char (toLower) | |
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 TemplateHaskell #-} | |
{-# LANGUAGE ScopedTypeVariables #-} | |
{-# LANGUAGE FlexibleInstances #-} | |
{-# LANGUAGE OverloadedStrings #-} | |
module Main where | |
import Control.Applicative | |
import Control.Lens | |
import Control.Monad.Trans (MonadIO(..)) |
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 ScopedTypeVariables #-} | |
module CloudUtil | |
( module Control.Distributed.Process | |
, cloud | |
, cloudWithRemotable | |
, cloudWithRemotableAsync) | |
where | |
import Control.Exception (try, SomeException, bracket) | |
import Control.Concurrent (threadDelay) |