Delete enclosure, lambdaIcon, and lambdaRegion from Icons.hs.

This commit is contained in:
Robbie Gleichman 2016-12-22 19:14:28 -08:00
parent 961879049a
commit 5efcc62b96

View File

@ -9,8 +9,6 @@ module Icons
iconToDiagram,
textBox,
multilineComment,
enclosure,
lambdaRegion,
resultIcon,
guardIcon,
caseIcon,
@ -293,29 +291,6 @@ commentTextArea textColor t =
alignL $ fontSize (local textBoxFontSize) (font "freemono" $ fc textColor $ topLeftText t)
<> alignTL (lw none $ rectForText (length t))
-- ENCLOSING REGION --
enclosure :: SpecialBackend b n =>
SpecialQDiagram b n -> SpecialQDiagram b n
enclosure dia = dia <> lwG defaultLineWidth (lc (regionPerimC colorScheme) $ boundingRect (frame 0.5 dia))
-- LAMBDA ICON --
-- Don't use === here to put the port under the text box since mempty will stay
-- at the origin of the text box.
lambdaIcon ::
SpecialBackend b n =>
Int -> SpecialQDiagram b n
lambdaIcon x = alignB (coloredTextBox (lamArgResC colorScheme) transparent "λ") <> makePort (Port x)
-- LAMBDA REGION --
-- | lambdaRegion takes as an argument the numbers of parameters to the lambda,
-- and draws the diagram inside a region with the lambda icons on top.
lambdaRegion :: SpecialBackend b n =>
Int -> SpecialQDiagram b n -> SpecialQDiagram b n
lambdaRegion n dia =
centerXY $ centerX lambdaIcons === centerX (enclosure dia)
where lambdaIcons = hsep 0.4 (take n (map lambdaIcon [0,1..]))
-- RESULT ICON --
resultIcon :: SpecialBackend b n => SpecialQDiagram b n
resultIcon = lw none $ fc (lamArgResC colorScheme) unitSquare