More haddock docs. (#131)

* More haddock docs.

* Remove unused imports.

* Replace '#' with '&' from Control.Lens
This commit is contained in:
David Himmelstrup 2020-08-07 11:09:15 +08:00 committed by GitHub
commit d1b0a50e51
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
36 changed files with 310 additions and 142 deletions

View file

@ -1,8 +1,8 @@
#!/usr/bin/env stack
-- stack runghc --package reanimate
{-# LANGUAGE ApplicativeDo #-}
{-# LANGUAGE OverloadedStrings #-}
{-# LANGUAGE QuasiQuotes #-}
{-# LANGUAGE ApplicativeDo #-}
module Main (main) where
import Reanimate
@ -10,13 +10,13 @@ import Reanimate.Povray (povraySlow')
import Codec.Picture
import Codec.Picture.Types
import Control.Lens ((^.))
import Control.Lens ((&), (^.))
import Control.Monad
import qualified Data.Text as T
import Data.Monoid
import NeatInterpolation
import Data.Text (Text)
import Graphics.SvgTree hiding (Text,text)
import qualified Data.Text as T
import Graphics.SvgTree hiding (Text, text)
import NeatInterpolation
import System.Random
import System.Random.Shuffle
@ -109,7 +109,7 @@ latexExample = sceneAnimation $ do
mapM_ destroySprite sprites
-- Undraw equations
play $ drawAnimation' (Just 0xdeadbeef) 1 0.1 strokedSvg
# reverseA
& reverseA
where
glyphs = svgGlyphs svg
strokedSvg =
@ -151,7 +151,7 @@ drawAnimation' mbSeed fillDur step svg = sceneAnimation $ do
fork $ do
wait (n*step)
play $ mapA fn $ (animate (\t -> withFillOpacity 0 $ partialSvg t tree)
# applyE (overEnding fillDur $ fadeLineOutE sWidth))
& applyE (overEnding fillDur $ fadeLineOutE sWidth))
fork $ do
wait (n*step+(1-fillDur))
newSprite $ do