Created
July 10, 2018 03:30
-
-
Save silky/7388f1e01c5ae4671bad40a7f7be3a74 to your computer and use it in GitHub Desktop.
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 FlexibleContexts #-} | |
{-# LANGUAGE GADTs #-} | |
{-# LANGUAGE NoMonomorphismRestriction #-} | |
{-# LANGUAGE ViewPatterns #-} | |
{-# LANGUAGE ScopedTypeVariables #-} | |
module Main where | |
import Diagrams.Prelude | |
import Diagrams.Backend.Cairo.CmdLine | |
import Data.List.Split (chunksOf) | |
main :: IO () | |
main = mainWith ( d # frame 0.1 ) >> putStrLn "Done" | |
d1 :: [Diagram B] | |
d1 = map (\d -> d # lw 0 # centerXY <> square 1.2 # lw 0) | |
[ square 1 # fc red | |
, circle 0.5 # fc blue | |
, triangle 1 # fc orange | |
] | |
d :: Diagram B | |
d = vcat $ map hcat dss | |
where | |
ds = take 300 $ cycle d1 | |
dss = chunksOf 11 ds | |
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
name: Five-Minute-Dots | |
version: 0.1.0.0 | |
license: BSD3 | |
author: Noon van der Silk | |
maintainer: noonsilk@gmail.com | |
copyright: Noon van der Silk | |
category: Web | |
extra-source-files: | |
- README.md | |
dependencies: | |
- base >= 4.7 && < 5 | |
- diagrams | |
- diagrams-cairo | |
- diagrams-contrib | |
- diagrams-lib | |
- random | |
- split | |
executables: | |
Five-Minute-Dots: | |
source-dirs: src | |
main: Main.hs |
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 Distribution.Simple | |
main = defaultMain |
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
resolver: lts-10.7 | |
packages: | |
- . | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment