Skip to content

Instantly share code, notes, and snippets.

View leftaroundabout's full-sized avatar

Justus Sagemüller leftaroundabout

  • KTH Royal Institute of Technology
  • Stockholm
View GitHub Profile
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.

Free (Const c) ~~ Either c

Given

data Const c a = Const c

we have

data Free (Const c) a

= Pure a

Cofree (Const c) ~~ Writer c

Given

data Const c a = Const c

we have

data Cofree (Const c) a

= a :< Const c

Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
module Main where
import Graphics.Text.PCF
import Data.Foldable (fold)
import System.Environment (getArgs)
main :: IO ()
main = do
args <- getArgs
let style = case ( any (`elem`["-b","--bold"]) args
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
{-# LANGUAGE TypeFamilies, FlexibleContexts #-}
import Math.LinearMap.Category
import Data.VectorSpace
import Linear.V3
import Data.AffineSpace
import Control.Arrow
import Data.Semigroup
import qualified Diagrams.Prelude as Dia
import Graphics.Dynamic.Plot.R2
#!/usr/bin/env stack
{- stack --resolver lts-12.0 runghc -}
{-# LANGUAGE TypeFamilies, FlexibleInstances #-}
{-# LANGUAGE DataKinds, PolyKinds, KindSignatures, TypeInType #-}
{-# LANGUAGE AllowAmbiguousTypes, TypeApplications, GADTs #-}
import Prelude hiding ((.), id)
import qualified Prelude
import Data.Kind