Skip to content

Instantly share code, notes, and snippets.

@waynr
Last active August 29, 2015 14:04
Show Gist options
  • Save waynr/cbfa5bf5bad0ab30d246 to your computer and use it in GitHub Desktop.
Save waynr/cbfa5bf5bad0ab30d246 to your computer and use it in GitHub Desktop.
Potential group nesting problem in Diagrams?
Display the source blob
Display the rendered blob
Raw
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
\begin{code}
{-# LANGUAGE NoMonomorphismRestriction #-}
import Diagrams.Prelude
import Diagrams.Backend.SVG.CmdLine
blue_dotted :: Diagram B R2
blue_dotted = circle 1 # fc blue
# lw veryThick
# lc purple
# dashingG [0.2,0.05] 0
green_circle :: Diagram B R2
green_circle = circle 1 # fc green # lw none
red_circle :: Diagram B R2
red_circle = circle 1 # fc red # lw none
double_circle :: Diagram B R2
double_circle = green_circle ||| red_circle
square_one :: Diagram B R2
square_one = square 1 # fc aqua `atop` circle 1
example = square_one ||| double_circle ||| circle 1 # showOrigin
main = mainWith example
\end{code}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment