-- Hoogle documentation, generated by Haddock -- See Hoogle, http://www.haskell.org/hoogle/ -- | Please see the README on GitHub at -- https://github.com/pdlla/tinytools#readme @package tinytools @version 0.1.0.3 -- | TextZipper is designed to be help manipulate the contents of a -- text input field. It keeps track of the logical lines of text (i.e., -- lines separated by user-entered newlines) and the current cursor -- position. Several functions are defined in this module to navigate and -- edit the TextZipper from the cursor position. -- -- TextZippers can be converted into DisplayLines, which -- describe how the contents of the zipper will be displayed when wrapped -- to fit within a container of a certain width. It also provides some -- convenience facilities for converting interactions with the rendered -- DisplayLines back into manipulations of the underlying TextZipper. module Potato.Data.Text.Zipper -- | A zipper of the logical text input contents (the "document"). The -- lines before the line containing the cursor are stored in reverse -- order. The cursor is logically between the "before" and "after" text. -- A "logical" line of input is a line of input up until a user-entered -- newline character (as compared to a "display" line, which is wrapped -- to fit within a given viewport width). data TextZipper TextZipper :: [Text] -> Text -> Text -> [Text] -> TextZipper [_textZipper_linesBefore] :: TextZipper -> [Text] [_textZipper_before] :: TextZipper -> Text [_textZipper_after] :: TextZipper -> Text [_textZipper_linesAfter] :: TextZipper -> [Text] -- | Map a replacement function over the characters in a TextZipper mapZipper :: (Char -> Char) -> TextZipper -> TextZipper -- | Move the cursor left one character, if possible left :: TextZipper -> TextZipper -- | Move the cursor left by the given number of characters, or, if the -- document isn't long enough, to the beginning of the document leftN :: Int -> TextZipper -> TextZipper -- | Move the cursor right one character, if possible right :: TextZipper -> TextZipper -- | Move the character right by the given number of characters, or, if the -- document isn't long enough, to the end of the document rightN :: Int -> TextZipper -> TextZipper -- | Move the cursor up one logical line, if possible up :: TextZipper -> TextZipper -- | Move the cursor down one logical line, if possible down :: TextZipper -> TextZipper -- | Move the cursor up by the given number of lines pageUp :: Int -> TextZipper -> TextZipper -- | Move the cursor down by the given number of lines pageDown :: Int -> TextZipper -> TextZipper -- | Move the cursor to the beginning of the current logical line home :: TextZipper -> TextZipper -- | Move the cursor to the end of the current logical line end :: TextZipper -> TextZipper -- | Move the cursor to the top of the document top :: TextZipper -> TextZipper -- | Insert a character at the current cursor position insertChar :: Char -> TextZipper -> TextZipper -- | Insert text at the current cursor position insert :: Text -> TextZipper -> TextZipper -- | Delete the character to the left of the cursor deleteLeft :: TextZipper -> TextZipper -- | Delete the character under/to the right of the cursor deleteRight :: TextZipper -> TextZipper -- | Delete a word to the left of the cursor. Deletes all whitespace until -- it finds a non-whitespace character, and then deletes contiguous -- non-whitespace characters. deleteLeftWord :: TextZipper -> TextZipper -- | Insert up to n spaces to get to the next logical column that is a -- multiple of n tab :: Int -> TextZipper -> TextZipper -- | The plain text contents of the zipper value :: TextZipper -> Text -- | The empty zipper empty :: TextZipper -- | Constructs a zipper with the given contents. The cursor is placed -- after the contents. fromText :: Text -> TextZipper -- | A span of text tagged with some metadata that makes up part of a -- display line. data Span tag Span :: tag -> Text -> Span tag -- | Text alignment type data TextAlignment TextAlignment_Left :: TextAlignment TextAlignment_Right :: TextAlignment TextAlignment_Center :: TextAlignment type OffsetMapWithAlignment = Map Int (Int, Int) data WrappedLine WrappedLine :: Text -> Bool -> Int -> WrappedLine [_wrappedLines_text] :: WrappedLine -> Text -- | True if this line ends with a deleted whitespace character [_wrappedLines_hiddenWhitespace] :: WrappedLine -> Bool -- | offset from beginning of line [_wrappedLines_offset] :: WrappedLine -> Int -- | Information about the document as it is displayed (i.e., -- post-wrapping) data DisplayLines tag DisplayLines :: [[Span tag]] -> OffsetMapWithAlignment -> (Int, Int) -> DisplayLines tag [_displayLines_spans] :: DisplayLines tag -> [[Span tag]] [_displayLines_offsetMap] :: DisplayLines tag -> OffsetMapWithAlignment [_displayLines_cursorPos] :: DisplayLines tag -> (Int, Int) -- | Split a Text at the given column index. For example -- --
-- splitAtWidth 3 "ᄀabc" == ("ᄀa", "bc")
--
--
-- because the first character has a width of two (see charWidth
-- for more on that).
splitAtWidth :: Int -> Text -> (Text, Text)
toLogicalIndex :: Int -> Text -> Int
-- | Takes the given number of columns of characters. For example
--
-- -- takeWidth 3 "ᄀabc" == "ᄀa" ---- -- because the first character has a width of 2 (see charWidth for -- more on that). This function will not take a character if its width -- exceeds the width it seeks to take. takeWidth :: Int -> Text -> Text -- | Drops the given number of columns of characters. For example -- --
-- dropWidth 2 "ᄀabc" == "abc" ---- -- because the first character has a width of 2 (see charWidth for -- more on that). This function will not drop a character if its width -- exceeds the width it seeks to drop. dropWidth :: Int -> Text -> Text -- | Get the display width of a Char. "Full width" and "wide" -- characters take two columns and everything else takes a single column. -- See https://www.unicode.org/reports/tr11/ for more information -- This is implemented using wcwidth from Vty such that it matches what -- will be displayed on the terminal. Note that this method can change -- depending on how vty is configed. Please see vty documentation for -- details. charWidth :: Char -> Int -- | Get the width of the text in a set of Spans, taking into -- account unicode character widths spansWidth :: [Span tag] -> Int -- | Get the length (number of characters) of the text in a set of -- Spans spansLength :: [Span tag] -> Int -- | Compute the width of some Text, taking into account fullwidth -- unicode forms. textWidth :: Text -> Int -- | Compute the width of a stream of characters, taking into account -- fullwidth unicode forms. widthI :: Stream Char -> Int -- | Compute the logical index position of a stream of characters from a -- visual position taking into account fullwidth unicode forms. charIndexAt :: Int -> Stream Char -> Int -- | Same as T.words except whitespace characters are included at end (i.e. -- ["line1 ", ...]) Chars representing white space. wordsWithWhitespace :: Text -> [Text] -- | Split words into logical lines, True in the tuple indicates -- line ends with a whitespace character that got deleted splitWordsAtDisplayWidth :: Int -> [Text] -> [(Text, Bool)] -- | Wraps a logical line of text to fit within the given width. The first -- wrapped line is offset by the number of columns provided. Subsequent -- wrapped lines are not. wrapWithOffsetAndAlignment :: TextAlignment -> Int -> Int -> Text -> [WrappedLine] eolSpacesToLogicalLines :: [[WrappedLine]] -> [[(Text, Int)]] offsetMapWithAlignmentInternal :: [[WrappedLine]] -> OffsetMapWithAlignment offsetMapWithAlignment :: [[(Text, Int)]] -> OffsetMapWithAlignment -- | Given a width and a TextZipper, produce a list of display lines -- (i.e., lines of wrapped text) with special attributes applied to -- certain segments (e.g., the cursor). Additionally, produce the current -- y-coordinate of the cursor and a mapping from display line number to -- text offset displayLinesWithAlignment :: TextAlignment -> Int -> tag -> tag -> TextZipper -> DisplayLines tag -- | Move the cursor of the given TextZipper to the logical position -- indicated by the given display line coordinates, using the provided -- DisplayLinesWithAlignment information. If the x coordinate is -- beyond the end of a line, the cursor is moved to the end of the line. goToDisplayLinePosition :: Int -> Int -> DisplayLines tag -> TextZipper -> TextZipper -- | Given a width and a TextZipper, produce a list of display lines -- (i.e., lines of wrapped text) with special attributes applied to -- certain segments (e.g., the cursor). Additionally, produce the current -- y-coordinate of the cursor and a mapping from display line number to -- text offset displayLines :: Int -> tag -> tag -> TextZipper -> DisplayLines tag -- | Wraps a logical line of text to fit within the given width. The first -- wrapped line is offset by the number of columns provided. Subsequent -- wrapped lines are not. wrapWithOffset :: Int -> Int -> Text -> [Text] instance GHC.Classes.Eq Potato.Data.Text.Zipper.TextZipper instance GHC.Show.Show Potato.Data.Text.Zipper.TextZipper instance GHC.Show.Show tag => GHC.Show.Show (Potato.Data.Text.Zipper.Span tag) instance GHC.Classes.Eq tag => GHC.Classes.Eq (Potato.Data.Text.Zipper.Span tag) instance GHC.Show.Show Potato.Data.Text.Zipper.TextAlignment instance GHC.Classes.Eq Potato.Data.Text.Zipper.TextAlignment instance GHC.Show.Show Potato.Data.Text.Zipper.WrappedLine instance GHC.Classes.Eq Potato.Data.Text.Zipper.WrappedLine instance GHC.Show.Show tag => GHC.Show.Show (Potato.Data.Text.Zipper.DisplayLines tag) instance GHC.Classes.Eq tag => GHC.Classes.Eq (Potato.Data.Text.Zipper.DisplayLines tag) instance Data.String.IsString Potato.Data.Text.Zipper.TextZipper module Potato.Data.Text.Unicode getCharWidth :: Char -> Int8 removeWideChars :: Text -> Text internal_getCharacterBreaks :: Text -> [Break ()] zwidge :: Char -- | True if the Text is a single grapheme cluster, False otherwise isSingleGraphemeCluster :: Text -> Bool -- | True if the last character in the text is a single grapheme cluster, -- False otherwise endsInGraphemeCluster :: Text -> Bool -- | removes grapheme clusters from the text and replaces them with the -- first character in the cluster removeGraphemeCluster :: Text -> Text -- | True if the input text contains a grapheme cluster containsGraphemeCluster :: Text -> Bool module Potato.Data.Text.Zipper2 -- | Get the display width of a Char. "Full width" and "wide" -- characters take two columns and everything else takes a single column. -- See https://www.unicode.org/reports/tr11/ for more information -- This is implemented using wcwidth from Vty such that it matches what -- will be displayed on the terminal. Note that this method can change -- depending on how vty is configed. Please see vty documentation for -- details. charWidth :: Char -> Int data TextZipper TextZipper :: [Text] -> Text -> [Text] -> Text -> [Text] -> TextZipper [_textZipper_linesBefore] :: TextZipper -> [Text] [_textZipper_before] :: TextZipper -> Text [_textZipper_selected] :: TextZipper -> [Text] [_textZipper_after] :: TextZipper -> Text [_textZipper_linesAfter] :: TextZipper -> [Text] -- | Map a replacement function over the characters in a TextZipper mapZipper :: (Char -> Char) -> TextZipper -> TextZipper appendEnd :: [Text] -> Text -> [Text] -- | Move the cursor left one character (clearing the selection) left :: TextZipper -> TextZipper -- | Move the cursor left by the given number of characters (clearing the -- selection) leftN :: Int -> TextZipper -> TextZipper -- | expand the selection to the left the given number of characters shiftLeftN :: TextZipper -> TextZipper -- | Move the cursor to the left one word (clearing the selection) leftWord :: TextZipper -> TextZipper -- | Expand the selection to the left by one word shiftLeftWord :: TextZipper -> TextZipper -- | Move the cursor right one character (clearing the selection) right :: TextZipper -> TextZipper -- | Move the character right by the given number of characters (clearing -- the selection) rightN :: Int -> TextZipper -> TextZipper -- | expand the selection to the right the given number of characters shiftRightN :: TextZipper -> TextZipper -- | Move the cursor to the right one word (clearing the selection) rightWord :: TextZipper -> TextZipper -- | Expand the selection to the right by one word rightLeftWord :: TextZipper -> TextZipper -- | Clear the selection and move the cursor to the end of selection deselect :: TextZipper -> TextZipper -- | Move the cursor up one logical line (clearing the selection) up :: TextZipper -> TextZipper -- | Move the cursor down one logical line (clearing the selection) down :: TextZipper -> TextZipper -- | Move the cursor up by the given number of lines (clearing the -- selection) pageUp :: Int -> TextZipper -> TextZipper -- | Move the cursor down by the given number of lines (clearing the -- selection) pageDown :: Int -> TextZipper -> TextZipper -- | Move the cursor to the beginning of the current logical line (clearing -- the selection) home :: TextZipper -> TextZipper -- | Move the cursor to the end of the current logical line (clearing the -- selection) end :: TextZipper -> TextZipper -- | Move the cursor to the top of the document (clearing the selection) top :: TextZipper -> TextZipper -- | Insert a character at the current cursor position (overwriting the -- selection) insertChar :: Char -> TextZipper -> TextZipper -- | Insert text at the current cursor position (overwriting the selection) insert :: Text -> TextZipper -> TextZipper -- | Delete the selection deleteSelection :: TextZipper -> TextZipper -- | Delete the selection or the character to the left of the cursor if -- there was no selection deleteLeft :: TextZipper -> TextZipper -- | Delete the selection to the character to the right of the cursor if -- there was no selection deleteRight :: TextZipper -> TextZipper -- | Delete the selection and the word to the left of the cursor and the -- selection. When deleting the word to the left of the selection, -- deletes all whitespace until it finds a non-whitespace character, and -- then deletes contiguous non-whitespace characters. deleteLeftWord :: TextZipper -> TextZipper -- | Insert up to n spaces to get to the next logical column that is a -- multiple of n tab :: Int -> TextZipper -> TextZipper -- | The plain text contents of the zipper value :: TextZipper -> Text -- | The empty zipper empty :: TextZipper -- | Constructs a zipper with the given contents. The cursor is placed -- after the contents. fromText :: Text -> TextZipper -- | Text alignment type data TextAlignment TextAlignment_Left :: TextAlignment TextAlignment_Right :: TextAlignment TextAlignment_Center :: TextAlignment type OffsetMapWithAlignment = Map Int (Int, Int) -- | Information about the document as it is displayed (i.e., -- post-wrapping) data DisplayLines DisplayLines :: [[Text]] -> OffsetMapWithAlignment -> (Int, Int) -> Int -> DisplayLines [_displayLines_text] :: DisplayLines -> [[Text]] [_displayLines_offsetMap] :: DisplayLines -> OffsetMapWithAlignment [_displayLines_cursorPos] :: DisplayLines -> (Int, Int) [_displayLines_selectionCount] :: DisplayLines -> Int -- | Adjust the cursor and/or selection of the TextZipper by the -- given display line coordinates If the x coordinate is beyond the -- startend of a line, the cursor is moved to the startend of that -- line respectively if add is true, the selection is expanded -- to the given position if add is false, the selection is -- cleared and the cursor is moved to the given position goToDisplayLinePosition :: Bool -> Int -> Int -> DisplayLines -> TextZipper -> TextZipper -- | Given a TextAlignment, a width and a TextZipper, produce -- a DisplayLines wrapping happens at word boundaries such that -- the most possible words fit into each display line if a line can not -- be wrapped (i.e. it contains a word longer than the display width) -- then the line is cropped in the middle of the word as necessary displayLinesWithAlignment :: TextAlignment -> Int -> TextZipper -> DisplayLines instance GHC.Classes.Eq Potato.Data.Text.Zipper2.TextZipper instance GHC.Show.Show Potato.Data.Text.Zipper2.TextZipper instance GHC.Show.Show Potato.Data.Text.Zipper2.TextAlignment instance GHC.Classes.Eq Potato.Data.Text.Zipper2.TextAlignment instance GHC.Show.Show Potato.Data.Text.Zipper2.DisplayLines instance GHC.Classes.Eq Potato.Data.Text.Zipper2.DisplayLines instance Data.String.IsString Potato.Data.Text.Zipper2.TextZipper module Potato.Flow.Configuration data PotatoConfiguration PotatoConfiguration :: Bool -> Maybe (Maybe Char) -> (Char -> Int8) -> PotatoConfiguration [_potatoConfiguration_allowGraphemeClusters] :: PotatoConfiguration -> Bool [_potatoConfiguration_allowOrReplaceUnicodeWideChars] :: PotatoConfiguration -> Maybe (Maybe Char) [_potatoConfiguration_unicodeWideCharFn] :: PotatoConfiguration -> Char -> Int8 instance GHC.Show.Show Potato.Flow.Configuration.PotatoConfiguration instance Data.Default.Class.Default Potato.Flow.Configuration.PotatoConfiguration module Potato.Flow.DebugHelpers class PotatoShow a potatoShow :: PotatoShow a => a -> Text showFoldable :: (Foldable f, Show a) => f a -> Text assertShowAndDump :: (HasCallStack, Show a) => a -> Bool -> b -> b assertPotatoShowAndDump :: (HasCallStack, PotatoShow a) => a -> Bool -> b -> b traceWith :: (a -> String) -> a -> a traceShowIdWithLabel :: Show a => String -> a -> a data PotatoLoggerLevel PLL_Debug :: PotatoLoggerLevel PLL_Info :: PotatoLoggerLevel PLL_Warn :: PotatoLoggerLevel PLL_Error :: PotatoLoggerLevel data PotatoLoggerComponent PLC_None :: PotatoLoggerComponent PLC_Goat :: PotatoLoggerComponent class MonadPotatoLogger m potatoLog :: MonadPotatoLogger m => PotatoLoggerLevel -> PotatoLoggerComponent -> Text -> m () data PotatoLoggerObject PotatoLoggerObject :: PotatoLoggerLevel -> PotatoLoggerComponent -> Text -> PotatoLoggerObject type PotatoLogger = Writer [PotatoLoggerObject] debugBangBang :: HasCallStack => [a] -> Int -> a instance Potato.Flow.DebugHelpers.MonadPotatoLogger Potato.Flow.DebugHelpers.PotatoLogger module Potato.Flow.Math type XY = V2 Int -- | a point in screen space should only be used by VC, so does not belong -- here newtype VPoint = VPoint (Int, Int) deriving (Generic, Show, -- FromJSON, ToJSON) -- -- a box in logical space note size is non inclusive e.g. an LBox with -- size (1,1) is exactly 1 point at ul e.g. an LBox with size (0,0) -- contains nothing data LBox LBox :: XY -> XY -> LBox [_lBox_tl] :: LBox -> XY [_lBox_size] :: LBox -> XY nilLBox :: LBox -- | returns a 0 area LBox make_0area_lBox_from_XY :: XY -> LBox -- | returns a 1 area LBox make_1area_lBox_from_XY :: XY -> LBox -- | always returns a canonical LBox make_lBox_from_XYs :: XY -> XY -> LBox -- | always returns a canonical LBox make_lBox_from_XYlist :: [XY] -> LBox does_lBox_contains_XY :: LBox -> XY -> Bool lBox_tl :: LBox -> XY lBox_area :: LBox -> Int -- | (left, right, top, bottom) right and bottom are non-inclusive lBox_to_axis :: LBox -> (Int, Int, Int, Int) translate_lBox :: XY -> LBox -> LBox -- | always returns a canonical LBox bottom/right XYs cells are not -- included in add_XY_to_lBox :: XY -> LBox -> LBox -- | right and bottom axis are non-inclusive make_lBox_from_axis :: (Int, Int, Int, Int) -> LBox -- | inverted LBox are treated as if not inverted union_lBox :: LBox -> LBox -> LBox lBox_expand :: LBox -> (Int, Int, Int, Int) -> LBox -- | inverted LBox are treated as if not inverted intersect_lBox :: LBox -> LBox -> Maybe LBox intersect_lBox_include_zero_area :: LBox -> LBox -> Maybe LBox does_lBox_intersect :: LBox -> LBox -> Bool does_lBox_intersect_include_zero_area :: LBox -> LBox -> Bool -- | substract lb2 from lb1 and return [LBox] representing the difference substract_lBox :: LBox -> LBox -> [LBox] -- | CanonicalLBox is always has non-negative width/height and tracks which -- axis are flipped to return back to original LBox first Bool is if x -- values are flipped, second is for y data CanonicalLBox CanonicalLBox :: Bool -> Bool -> LBox -> CanonicalLBox canonicalLBox_from_lBox :: LBox -> CanonicalLBox -- | same as canonicalLBox_from_lBox but returns just the canonical LBox canonicalLBox_from_lBox_ :: LBox -> LBox lBox_from_canonicalLBox :: CanonicalLBox -> LBox deltaLBox_via_canonicalLBox :: CanonicalLBox -> DeltaLBox -> DeltaLBox lBox_isCanonicalLBox :: LBox -> Bool class Delta x dx plusDelta :: Delta x dx => x -> dx -> x minusDelta :: Delta x dx => x -> dx -> x newtype DeltaXY DeltaXY :: XY -> DeltaXY data DeltaLBox DeltaLBox :: XY -> XY -> DeltaLBox [_deltaLBox_translate] :: DeltaLBox -> XY [_deltaLBox_resizeBy] :: DeltaLBox -> XY instance GHC.Generics.Generic Potato.Flow.Math.LBox instance GHC.Classes.Eq Potato.Flow.Math.LBox instance GHC.Show.Show Potato.Flow.Math.DeltaXY instance GHC.Generics.Generic Potato.Flow.Math.DeltaXY instance GHC.Classes.Eq Potato.Flow.Math.DeltaXY instance GHC.Show.Show Potato.Flow.Math.DeltaLBox instance GHC.Generics.Generic Potato.Flow.Math.DeltaLBox instance GHC.Classes.Eq Potato.Flow.Math.DeltaLBox instance Control.DeepSeq.NFData Potato.Flow.Math.DeltaLBox instance Potato.Flow.Math.Delta Potato.Flow.Math.LBox Potato.Flow.Math.DeltaLBox instance Control.DeepSeq.NFData Potato.Flow.Math.DeltaXY instance Potato.Flow.Math.Delta Potato.Flow.Math.XY Potato.Flow.Math.DeltaXY instance Potato.Flow.Math.Delta Potato.Flow.Math.XY Potato.Flow.Math.XY instance (GHC.Show.Show a, GHC.Classes.Eq a) => Potato.Flow.Math.Delta a (a, a) instance (Potato.Flow.Math.Delta a c, Potato.Flow.Math.Delta b d) => Potato.Flow.Math.Delta (a, b) (c, d) instance GHC.Show.Show Potato.Flow.Math.LBox instance Data.Aeson.Types.FromJSON.FromJSON Potato.Flow.Math.LBox instance Data.Aeson.Types.ToJSON.ToJSON Potato.Flow.Math.LBox instance Data.Binary.Class.Binary Potato.Flow.Math.LBox instance Control.DeepSeq.NFData Potato.Flow.Math.LBox instance Data.Aeson.Types.FromJSON.FromJSON Potato.Flow.Math.XY instance Data.Aeson.Types.ToJSON.ToJSON Potato.Flow.Math.XY instance Data.Aeson.Types.FromJSON.FromJSONKey Potato.Flow.Math.XY instance Data.Aeson.Types.ToJSON.ToJSONKey Potato.Flow.Math.XY module Potato.Flow.Reflex.GoatSwitcher module Potato.Flow.SElts type REltId = Int type PChar = Char type MPChar = Maybe PChar getPCharWidth :: Char -> Int8 data FillStyle FillStyle_Blank :: FillStyle FillStyle_Simple :: PChar -> FillStyle data SuperStyle SuperStyle :: MPChar -> MPChar -> MPChar -> MPChar -> MPChar -> MPChar -> MPChar -> FillStyle -> SuperStyle [_superStyle_tl] :: SuperStyle -> MPChar [_superStyle_tr] :: SuperStyle -> MPChar [_superStyle_bl] :: SuperStyle -> MPChar [_superStyle_br] :: SuperStyle -> MPChar [_superStyle_vertical] :: SuperStyle -> MPChar [_superStyle_horizontal] :: SuperStyle -> MPChar [_superStyle_point] :: SuperStyle -> MPChar [_superStyle_fill] :: SuperStyle -> FillStyle superStyle_fromListFormat :: [PChar] -> SuperStyle superStyle_toListFormat :: SuperStyle -> [PChar] data TextAlign TextAlign_Left :: TextAlign TextAlign_Right :: TextAlign TextAlign_Center :: TextAlign convertTextAlignToTextZipperTextAlignment :: TextAlign -> TextAlignment data TextStyle TextStyle :: TextAlign -> TextStyle [_textStyle_alignment] :: TextStyle -> TextAlign data AttachmentLocation AL_Top :: AttachmentLocation AL_Bot :: AttachmentLocation AL_Left :: AttachmentLocation AL_Right :: AttachmentLocation AL_Any :: AttachmentLocation type AttachmentOffsetRatio = Ratio Int data Attachment Attachment :: REltId -> AttachmentLocation -> AttachmentOffsetRatio -> Attachment [_attachment_target] :: Attachment -> REltId [_attachment_location] :: Attachment -> AttachmentLocation [_attachment_offset_rel] :: Attachment -> AttachmentOffsetRatio attachment_offset_rel_default :: Ratio Int attachment_create_default :: REltId -> AttachmentLocation -> Attachment data SBoxTitle SBoxTitle :: Maybe Text -> TextAlign -> SBoxTitle [_sBoxTitle_title] :: SBoxTitle -> Maybe Text [_sBoxTitle_align] :: SBoxTitle -> TextAlign data SBoxText SBoxText :: Text -> TextStyle -> SBoxText [_sBoxText_text] :: SBoxText -> Text [_sBoxText_style] :: SBoxText -> TextStyle data SBoxType SBoxType_Box :: SBoxType SBoxType_NoBox :: SBoxType SBoxType_BoxText :: SBoxType SBoxType_NoBoxText :: SBoxType sBoxType_isText :: SBoxType -> Bool sBoxType_hasBorder :: SBoxType -> Bool make_sBoxType :: Bool -> Bool -> SBoxType data SBox SBox :: LBox -> SuperStyle -> SBoxTitle -> SBoxText -> SBoxType -> SBox [_sBox_box] :: SBox -> LBox [_sBox_superStyle] :: SBox -> SuperStyle [_sBox_title] :: SBox -> SBoxTitle [_sBox_text] :: SBox -> SBoxText [_sBox_boxType] :: SBox -> SBoxType sBox_hasLabel :: SBox -> Bool data LineAutoStyle LineAutoStyle_Auto :: LineAutoStyle LineAutoStyle_AutoStraight :: LineAutoStyle LineAutoStyle_StraightAlwaysHorizontal :: LineAutoStyle LineAutoStyle_StraightAlwaysVertical :: LineAutoStyle data LineStyle LineStyle :: Text -> Text -> Text -> Text -> LineStyle [_lineStyle_leftArrows] :: LineStyle -> Text [_lineStyle_rightArrows] :: LineStyle -> Text [_lineStyle_upArrows] :: LineStyle -> Text [_lineStyle_downArrows] :: LineStyle -> Text lineStyle_fromListFormat :: ([PChar], [PChar], [PChar], [PChar]) -> LineStyle lineStyle_toListFormat :: LineStyle -> ([PChar], [PChar], [PChar], [PChar]) data SAutoLineConstraint SAutoLineConstraintFixed :: XY -> SAutoLineConstraint data SAutoLineLabelPosition SAutoLineLabelPositionRelative :: Float -> SAutoLineLabelPosition data SAutoLineLabel SAutoLineLabel :: Int -> SAutoLineLabelPosition -> Text -> SAutoLineLabel [_sAutoLineLabel_index] :: SAutoLineLabel -> Int [_sAutoLineLabel_position] :: SAutoLineLabel -> SAutoLineLabelPosition [_sAutoLineLabel_text] :: SAutoLineLabel -> Text data SAutoLine SAutoLine :: XY -> XY -> SuperStyle -> LineStyle -> LineStyle -> Maybe Attachment -> Maybe Attachment -> [SAutoLineConstraint] -> [SAutoLineLabel] -> SAutoLine [_sAutoLine_start] :: SAutoLine -> XY [_sAutoLine_end] :: SAutoLine -> XY [_sAutoLine_superStyle] :: SAutoLine -> SuperStyle [_sAutoLine_lineStyle] :: SAutoLine -> LineStyle [_sAutoLine_lineStyleEnd] :: SAutoLine -> LineStyle [_sAutoLine_attachStart] :: SAutoLine -> Maybe Attachment [_sAutoLine_attachEnd] :: SAutoLine -> Maybe Attachment [_sAutoLine_midpoints] :: SAutoLine -> [SAutoLineConstraint] [_sAutoLine_labels] :: SAutoLine -> [SAutoLineLabel] data SCartLines SCartLines :: XY -> NonEmpty (Either Int Int) -> SuperStyle -> SCartLines [_sCartLines_start] :: SCartLines -> XY [_sCartLines_ends] :: SCartLines -> NonEmpty (Either Int Int) [_sCartLines_style] :: SCartLines -> SuperStyle type TextAreaMapping = Map XY PChar -- | abitrary text confined to a box data STextArea STextArea :: LBox -> TextAreaMapping -> Bool -> STextArea [_sTextArea_box] :: STextArea -> LBox [_sTextArea_text] :: STextArea -> TextAreaMapping [_sTextArea_transparent] :: STextArea -> Bool data SElt SEltNone :: SElt SEltFolderStart :: SElt SEltFolderEnd :: SElt SEltBox :: SBox -> SElt SEltLine :: SAutoLine -> SElt SEltTextArea :: STextArea -> SElt data SEltLabel SEltLabel :: Text -> SElt -> SEltLabel [_sEltLabel_name] :: SEltLabel -> Text [_sEltLabel_sElt] :: SEltLabel -> SElt instance GHC.Show.Show Potato.Flow.SElts.FillStyle instance GHC.Generics.Generic Potato.Flow.SElts.FillStyle instance GHC.Classes.Eq Potato.Flow.SElts.FillStyle instance GHC.Generics.Generic Potato.Flow.SElts.SuperStyle instance GHC.Classes.Eq Potato.Flow.SElts.SuperStyle instance GHC.Show.Show Potato.Flow.SElts.TextAlign instance GHC.Generics.Generic Potato.Flow.SElts.TextAlign instance GHC.Classes.Eq Potato.Flow.SElts.TextAlign instance GHC.Generics.Generic Potato.Flow.SElts.TextStyle instance GHC.Classes.Eq Potato.Flow.SElts.TextStyle instance GHC.Show.Show Potato.Flow.SElts.AttachmentLocation instance GHC.Generics.Generic Potato.Flow.SElts.AttachmentLocation instance GHC.Classes.Eq Potato.Flow.SElts.AttachmentLocation instance GHC.Show.Show Potato.Flow.SElts.Attachment instance GHC.Generics.Generic Potato.Flow.SElts.Attachment instance GHC.Classes.Eq Potato.Flow.SElts.Attachment instance GHC.Generics.Generic Potato.Flow.SElts.SBoxTitle instance GHC.Classes.Eq Potato.Flow.SElts.SBoxTitle instance GHC.Generics.Generic Potato.Flow.SElts.SBoxText instance GHC.Classes.Eq Potato.Flow.SElts.SBoxText instance GHC.Show.Show Potato.Flow.SElts.SBoxType instance GHC.Generics.Generic Potato.Flow.SElts.SBoxType instance GHC.Classes.Eq Potato.Flow.SElts.SBoxType instance GHC.Generics.Generic Potato.Flow.SElts.SBox instance GHC.Classes.Eq Potato.Flow.SElts.SBox instance GHC.Show.Show Potato.Flow.SElts.LineAutoStyle instance GHC.Generics.Generic Potato.Flow.SElts.LineAutoStyle instance GHC.Classes.Eq Potato.Flow.SElts.LineAutoStyle instance GHC.Generics.Generic Potato.Flow.SElts.LineStyle instance GHC.Classes.Eq Potato.Flow.SElts.LineStyle instance GHC.Show.Show Potato.Flow.SElts.SAutoLineConstraint instance GHC.Generics.Generic Potato.Flow.SElts.SAutoLineConstraint instance GHC.Classes.Eq Potato.Flow.SElts.SAutoLineConstraint instance GHC.Show.Show Potato.Flow.SElts.SAutoLineLabelPosition instance GHC.Generics.Generic Potato.Flow.SElts.SAutoLineLabelPosition instance GHC.Classes.Eq Potato.Flow.SElts.SAutoLineLabelPosition instance GHC.Generics.Generic Potato.Flow.SElts.SAutoLineLabel instance GHC.Classes.Eq Potato.Flow.SElts.SAutoLineLabel instance GHC.Generics.Generic Potato.Flow.SElts.SAutoLine instance GHC.Classes.Eq Potato.Flow.SElts.SAutoLine instance GHC.Show.Show Potato.Flow.SElts.SCartLines instance GHC.Generics.Generic Potato.Flow.SElts.SCartLines instance GHC.Classes.Eq Potato.Flow.SElts.SCartLines instance GHC.Show.Show Potato.Flow.SElts.STextArea instance GHC.Generics.Generic Potato.Flow.SElts.STextArea instance GHC.Classes.Eq Potato.Flow.SElts.STextArea instance GHC.Show.Show Potato.Flow.SElts.SElt instance GHC.Generics.Generic Potato.Flow.SElts.SElt instance GHC.Classes.Eq Potato.Flow.SElts.SElt instance GHC.Show.Show Potato.Flow.SElts.SEltLabel instance GHC.Generics.Generic Potato.Flow.SElts.SEltLabel instance GHC.Classes.Eq Potato.Flow.SElts.SEltLabel instance Data.Aeson.Types.FromJSON.FromJSON Potato.Flow.SElts.SEltLabel instance Data.Aeson.Types.ToJSON.ToJSON Potato.Flow.SElts.SEltLabel instance Data.Binary.Class.Binary Potato.Flow.SElts.SEltLabel instance Control.DeepSeq.NFData Potato.Flow.SElts.SEltLabel instance Data.Aeson.Types.FromJSON.FromJSON Potato.Flow.SElts.SElt instance Data.Aeson.Types.ToJSON.ToJSON Potato.Flow.SElts.SElt instance Data.Binary.Class.Binary Potato.Flow.SElts.SElt instance Control.DeepSeq.NFData Potato.Flow.SElts.SElt instance Data.Default.Class.Default Potato.Flow.SElts.STextArea instance Data.Aeson.Types.FromJSON.FromJSON Potato.Flow.SElts.STextArea instance Data.Aeson.Types.ToJSON.ToJSON Potato.Flow.SElts.STextArea instance Data.Binary.Class.Binary Potato.Flow.SElts.STextArea instance Control.DeepSeq.NFData Potato.Flow.SElts.STextArea instance Data.Aeson.Types.FromJSON.FromJSON Potato.Flow.SElts.SCartLines instance Data.Aeson.Types.ToJSON.ToJSON Potato.Flow.SElts.SCartLines instance Data.Binary.Class.Binary Potato.Flow.SElts.SCartLines instance Control.DeepSeq.NFData Potato.Flow.SElts.SCartLines instance Data.Aeson.Types.FromJSON.FromJSON Potato.Flow.SElts.SAutoLine instance Data.Aeson.Types.ToJSON.ToJSON Potato.Flow.SElts.SAutoLine instance Data.Binary.Class.Binary Potato.Flow.SElts.SAutoLine instance Control.DeepSeq.NFData Potato.Flow.SElts.SAutoLine instance GHC.Show.Show Potato.Flow.SElts.SAutoLine instance Data.Default.Class.Default Potato.Flow.SElts.SAutoLine instance GHC.Show.Show Potato.Flow.SElts.SAutoLineLabel instance Data.Aeson.Types.FromJSON.FromJSON Potato.Flow.SElts.SAutoLineLabel instance Data.Aeson.Types.ToJSON.ToJSON Potato.Flow.SElts.SAutoLineLabel instance Data.Binary.Class.Binary Potato.Flow.SElts.SAutoLineLabel instance Control.DeepSeq.NFData Potato.Flow.SElts.SAutoLineLabel instance Data.Default.Class.Default Potato.Flow.SElts.SAutoLineLabel instance Data.Aeson.Types.FromJSON.FromJSON Potato.Flow.SElts.SAutoLineLabelPosition instance Data.Aeson.Types.ToJSON.ToJSON Potato.Flow.SElts.SAutoLineLabelPosition instance Data.Binary.Class.Binary Potato.Flow.SElts.SAutoLineLabelPosition instance Control.DeepSeq.NFData Potato.Flow.SElts.SAutoLineLabelPosition instance Data.Aeson.Types.FromJSON.FromJSON Potato.Flow.SElts.SAutoLineConstraint instance Data.Aeson.Types.ToJSON.ToJSON Potato.Flow.SElts.SAutoLineConstraint instance Data.Binary.Class.Binary Potato.Flow.SElts.SAutoLineConstraint instance Control.DeepSeq.NFData Potato.Flow.SElts.SAutoLineConstraint instance Data.Aeson.Types.FromJSON.FromJSON Potato.Flow.SElts.LineStyle instance Data.Aeson.Types.ToJSON.ToJSON Potato.Flow.SElts.LineStyle instance Data.Binary.Class.Binary Potato.Flow.SElts.LineStyle instance Control.DeepSeq.NFData Potato.Flow.SElts.LineStyle instance Data.Default.Class.Default Potato.Flow.SElts.LineStyle instance GHC.Show.Show Potato.Flow.SElts.LineStyle instance Data.Aeson.Types.FromJSON.FromJSON Potato.Flow.SElts.LineAutoStyle instance Data.Aeson.Types.ToJSON.ToJSON Potato.Flow.SElts.LineAutoStyle instance Data.Binary.Class.Binary Potato.Flow.SElts.LineAutoStyle instance Control.DeepSeq.NFData Potato.Flow.SElts.LineAutoStyle instance Data.Default.Class.Default Potato.Flow.SElts.LineAutoStyle instance Data.Aeson.Types.FromJSON.FromJSON Potato.Flow.SElts.SBox instance Data.Aeson.Types.ToJSON.ToJSON Potato.Flow.SElts.SBox instance Data.Binary.Class.Binary Potato.Flow.SElts.SBox instance Control.DeepSeq.NFData Potato.Flow.SElts.SBox instance Data.Default.Class.Default Potato.Flow.SElts.SBox instance GHC.Show.Show Potato.Flow.SElts.SBox instance Data.Aeson.Types.FromJSON.FromJSON Potato.Flow.SElts.SBoxType instance Data.Aeson.Types.ToJSON.ToJSON Potato.Flow.SElts.SBoxType instance Data.Binary.Class.Binary Potato.Flow.SElts.SBoxType instance Control.DeepSeq.NFData Potato.Flow.SElts.SBoxType instance Data.Default.Class.Default Potato.Flow.SElts.SBoxType instance Data.Aeson.Types.FromJSON.FromJSON Potato.Flow.SElts.SBoxText instance Data.Aeson.Types.ToJSON.ToJSON Potato.Flow.SElts.SBoxText instance Data.Binary.Class.Binary Potato.Flow.SElts.SBoxText instance Control.DeepSeq.NFData Potato.Flow.SElts.SBoxText instance Data.Default.Class.Default Potato.Flow.SElts.SBoxText instance GHC.Show.Show Potato.Flow.SElts.SBoxText instance Data.Aeson.Types.FromJSON.FromJSON Potato.Flow.SElts.SBoxTitle instance Data.Aeson.Types.ToJSON.ToJSON Potato.Flow.SElts.SBoxTitle instance Data.Binary.Class.Binary Potato.Flow.SElts.SBoxTitle instance Control.DeepSeq.NFData Potato.Flow.SElts.SBoxTitle instance Data.Default.Class.Default Potato.Flow.SElts.SBoxTitle instance GHC.Show.Show Potato.Flow.SElts.SBoxTitle instance Data.Aeson.Types.FromJSON.FromJSON Potato.Flow.SElts.Attachment instance Data.Aeson.Types.ToJSON.ToJSON Potato.Flow.SElts.Attachment instance Data.Binary.Class.Binary Potato.Flow.SElts.Attachment instance Control.DeepSeq.NFData Potato.Flow.SElts.Attachment instance Data.Aeson.Types.FromJSON.FromJSON Potato.Flow.SElts.AttachmentLocation instance Data.Aeson.Types.ToJSON.ToJSON Potato.Flow.SElts.AttachmentLocation instance Data.Binary.Class.Binary Potato.Flow.SElts.AttachmentLocation instance Control.DeepSeq.NFData Potato.Flow.SElts.AttachmentLocation instance Data.Aeson.Types.FromJSON.FromJSON Potato.Flow.SElts.TextStyle instance Data.Aeson.Types.ToJSON.ToJSON Potato.Flow.SElts.TextStyle instance Data.Binary.Class.Binary Potato.Flow.SElts.TextStyle instance Control.DeepSeq.NFData Potato.Flow.SElts.TextStyle instance Data.Default.Class.Default Potato.Flow.SElts.TextStyle instance GHC.Show.Show Potato.Flow.SElts.TextStyle instance Data.Aeson.Types.FromJSON.FromJSON Potato.Flow.SElts.TextAlign instance Data.Aeson.Types.ToJSON.ToJSON Potato.Flow.SElts.TextAlign instance Data.Binary.Class.Binary Potato.Flow.SElts.TextAlign instance Control.DeepSeq.NFData Potato.Flow.SElts.TextAlign instance Data.Default.Class.Default Potato.Flow.SElts.TextAlign instance Data.Aeson.Types.FromJSON.FromJSON Potato.Flow.SElts.SuperStyle instance Data.Aeson.Types.ToJSON.ToJSON Potato.Flow.SElts.SuperStyle instance Data.Binary.Class.Binary Potato.Flow.SElts.SuperStyle instance Control.DeepSeq.NFData Potato.Flow.SElts.SuperStyle instance Data.Default.Class.Default Potato.Flow.SElts.SuperStyle instance GHC.Show.Show Potato.Flow.SElts.SuperStyle instance Data.Aeson.Types.FromJSON.FromJSON Potato.Flow.SElts.FillStyle instance Data.Aeson.Types.ToJSON.ToJSON Potato.Flow.SElts.FillStyle instance Data.Binary.Class.Binary Potato.Flow.SElts.FillStyle instance Control.DeepSeq.NFData Potato.Flow.SElts.FillStyle instance Data.Default.Class.Default Potato.Flow.SElts.FillStyle module Potato.Flow.Methods.TextCommon displayLinesToChar :: (Int, Int) -> DisplayLines Int -> (Int, Int) -> (Int, Int) -> Maybe MPChar module Potato.Flow.Methods.LineTypes data CartDir CD_Up :: CartDir CD_Down :: CartDir CD_Left :: CartDir CD_Right :: CartDir data AnchorType AT_End_Up :: AnchorType AT_End_Down :: AnchorType AT_End_Left :: AnchorType AT_End_Right :: AnchorType AT_Elbow_TL :: AnchorType AT_Elbow_TR :: AnchorType AT_Elbow_BR :: AnchorType AT_Elbow_BL :: AnchorType AT_Elbow_Invalid :: AnchorType flipCartDir :: CartDir -> CartDir cartDirToUnit :: CartDir -> XY cartDirToAnchor :: CartDir -> Maybe CartDir -> AnchorType cartDirWithDistanceToV2 :: (CartDir, Int, Bool) -> V2 Int data LineAnchorsForRender LineAnchorsForRender :: XY -> [(CartDir, Int, Bool)] -> LineAnchorsForRender [_lineAnchorsForRender_start] :: LineAnchorsForRender -> XY [_lineAnchorsForRender_rest] :: LineAnchorsForRender -> [(CartDir, Int, Bool)] -- | v +y matrix_cw_90 :: M22 Int matrix_ccw_90 :: M22 Int class TransformMe a transformMe_rotateLeft :: TransformMe a => a -> a transformMe_rotateRight :: TransformMe a => a -> a transformMe_reflectHorizontally :: TransformMe a => a -> a transformMe_reflectVertically :: TransformMe a => a -> a data CartRotationReflection CartRotationReflection :: Int -> Bool -> CartRotationReflection [_cartRotationReflection_rotateLeftTimes] :: CartRotationReflection -> Int [_cartRotationReflection_reflectVertical] :: CartRotationReflection -> Bool cartRotationReflection_identity :: CartRotationReflection cartRotationReflection_invert :: CartRotationReflection -> CartRotationReflection cartRotationReflection_invert_apply :: TransformMe a => CartRotationReflection -> a -> a -- | Apply a function n times to a given value. nTimes :: Int -> (a -> a) -> a -> a cartRotationReflection_apply :: TransformMe a => CartRotationReflection -> a -> a instance GHC.Show.Show Potato.Flow.Methods.LineTypes.CartDir instance GHC.Generics.Generic Potato.Flow.Methods.LineTypes.CartDir instance GHC.Classes.Eq Potato.Flow.Methods.LineTypes.CartDir instance GHC.Show.Show Potato.Flow.Methods.LineTypes.AnchorType instance GHC.Classes.Eq Potato.Flow.Methods.LineTypes.AnchorType instance GHC.Classes.Eq Potato.Flow.Methods.LineTypes.LineAnchorsForRender instance GHC.Generics.Generic Potato.Flow.Methods.LineTypes.LineAnchorsForRender instance GHC.Show.Show Potato.Flow.Methods.LineTypes.LineAnchorsForRender instance Potato.Flow.Methods.LineTypes.TransformMe Potato.Flow.Methods.LineTypes.CartRotationReflection instance Potato.Flow.Methods.LineTypes.TransformMe Potato.Flow.Methods.LineTypes.LineAnchorsForRender instance Potato.Flow.Methods.LineTypes.TransformMe Potato.Flow.SElts.AttachmentLocation instance Potato.Flow.Methods.LineTypes.TransformMe Potato.Flow.Methods.LineTypes.CartDir instance Potato.Flow.Methods.LineTypes.TransformMe Potato.Flow.Methods.LineTypes.AnchorType instance Potato.Flow.Methods.LineTypes.TransformMe Potato.Flow.Math.XY instance (Potato.Flow.Methods.LineTypes.TransformMe a, Potato.Flow.Methods.LineTypes.TransformMe b) => Potato.Flow.Methods.LineTypes.TransformMe (a, b) instance (Potato.Flow.Methods.LineTypes.TransformMe a, Potato.Flow.Methods.LineTypes.TransformMe b, Potato.Flow.Methods.LineTypes.TransformMe c) => Potato.Flow.Methods.LineTypes.TransformMe (a, b, c) instance Potato.Flow.Methods.LineTypes.TransformMe Potato.Flow.Math.LBox instance Potato.Flow.Methods.LineTypes.TransformMe Potato.Flow.SElts.AttachmentOffsetRatio instance Control.DeepSeq.NFData Potato.Flow.Methods.LineTypes.LineAnchorsForRender instance Control.DeepSeq.NFData Potato.Flow.Methods.LineTypes.CartDir module Potato.Flow.Types type REltIdMap a = IntMap a -- | indexed my REltId type ControllersWithId = IntMap Controller controllerWithId_isParams :: ControllersWithId -> Bool type AttachmentMap = REltIdMap (IntSet) type LayerPos = Int type SuperSEltLabel = (REltId, LayerPos, SEltLabel) type SEltLabelChanges = REltIdMap (Maybe SEltLabel) type SEltLabelChangesWithLayerPos = REltIdMap (Maybe (LayerPos, SEltLabel)) type LayerPosMap = REltIdMap LayerPos data CRename CRename :: DeltaText -> CRename [_cRename_deltaLabel] :: CRename -> DeltaText data CLine CLine :: Maybe DeltaXY -> Maybe DeltaXY -> Maybe (Maybe Attachment, Maybe Attachment) -> Maybe (Maybe Attachment, Maybe Attachment) -> CLine [_cLine_deltaStart] :: CLine -> Maybe DeltaXY [_cLine_deltaEnd] :: CLine -> Maybe DeltaXY [_cLine_deltaAttachStart] :: CLine -> Maybe (Maybe Attachment, Maybe Attachment) [_cLine_deltaAttachEnd] :: CLine -> Maybe (Maybe Attachment, Maybe Attachment) data CBoxText CBoxText :: DeltaText -> CBoxText [_cBoxText_deltaText] :: CBoxText -> DeltaText data CBoxType CBoxType :: (SBoxType, SBoxType) -> CBoxType data CBoundingBox CBoundingBox :: DeltaLBox -> CBoundingBox [_cBoundingBox_deltaBox] :: CBoundingBox -> DeltaLBox data CTag a [CTagRename] :: CTag CRename [CTagLine] :: CTag CLine [CTagBoxText] :: CTag CBoxText [CTagBoxType] :: CTag CBoxType [CTagBoxTextStyle] :: CTag CTextStyle [CTagBoxLabelAlignment] :: CTag CTextAlign [CTagBoxLabelText] :: CTag CMaybeText [CTagTextArea] :: CTag CTextArea [CTagTextAreaToggle] :: CTag CTextAreaToggle [CTagSuperStyle] :: CTag CSuperStyle [CTagLineStyle] :: CTag CLineStyle [CTagBoundingBox] :: CTag CBoundingBox data CTextStyle CTextStyle :: DeltaTextStyle -> CTextStyle data CSuperStyle CSuperStyle :: DeltaSuperStyle -> CSuperStyle data CLineStyle CLineStyle :: DeltaLineStyle -> CLineStyle data CTextAlign CTextAlign :: DeltaTextAlign -> CTextAlign data CMaybeText CMaybeText :: DeltaMaybeText -> CMaybeText data CTextArea CTextArea :: DeltaTextArea -> CTextArea data CTextAreaToggle CTextAreaToggle :: DeltaTextAreaToggle -> CTextAreaToggle -- | Controllers represent changes to SElts type Controller = DSum CTag Identity -- | (old text, new text) type DeltaText = (Text, Text) data DeltaSuperStyle DeltaSuperStyle :: (SuperStyle, SuperStyle) -> DeltaSuperStyle data DeltaLineStyle DeltaLineStyle :: (LineStyle, LineStyle) -> DeltaLineStyle data DeltaTextStyle DeltaTextStyle :: (TextStyle, TextStyle) -> DeltaTextStyle data DeltaTextAlign DeltaTextAlign :: (TextAlign, TextAlign) -> DeltaTextAlign data DeltaMaybeText DeltaMaybeText :: (Maybe Text, Maybe Text) -> DeltaMaybeText data DeltaTextArea DeltaTextArea :: Map XY (Maybe PChar, Maybe PChar) -> DeltaTextArea data DeltaTextAreaToggle DeltaTextAreaToggle :: SElt -> DeltaTextAreaToggle type SEltTree = [(REltId, SEltLabel)] data SCanvas SCanvas :: LBox -> SCanvas [_sCanvas_box] :: SCanvas -> LBox data SPotatoFlow SPotatoFlow :: SCanvas -> SEltTree -> SPotatoFlow [_sPotatoFlow_sCanvas] :: SPotatoFlow -> SCanvas [_sPotatoFlow_sEltTree] :: SPotatoFlow -> SEltTree instance Control.DeepSeq.NFData Potato.Flow.Types.Controller instance (c Potato.Flow.Types.CRename, c Potato.Flow.Types.CLine, c Potato.Flow.Types.CBoxText, c Potato.Flow.Types.CBoxType, c Potato.Flow.Types.CTextStyle, c Potato.Flow.Types.CTextAlign, c Potato.Flow.Types.CMaybeText, c Potato.Flow.Types.CTextArea, c Potato.Flow.Types.CTextAreaToggle, c Potato.Flow.Types.CSuperStyle, c Potato.Flow.Types.CLineStyle, c Potato.Flow.Types.CBoundingBox) => Data.Constraint.Extras.Has c Potato.Flow.Types.CTag instance Data.GADT.Internal.GShow Potato.Flow.Types.CTag instance Data.GADT.Internal.GCompare Potato.Flow.Types.CTag instance Data.GADT.Internal.GEq Potato.Flow.Types.CTag instance GHC.Generics.Generic Potato.Flow.Types.SCanvas instance GHC.Classes.Eq Potato.Flow.Types.SCanvas instance GHC.Show.Show Potato.Flow.Types.SPotatoFlow instance GHC.Generics.Generic Potato.Flow.Types.SPotatoFlow instance GHC.Classes.Eq Potato.Flow.Types.SPotatoFlow instance GHC.Show.Show Potato.Flow.Types.DeltaTextAlign instance GHC.Generics.Generic Potato.Flow.Types.DeltaTextAlign instance GHC.Classes.Eq Potato.Flow.Types.DeltaTextAlign instance GHC.Show.Show Potato.Flow.Types.DeltaSuperStyle instance GHC.Generics.Generic Potato.Flow.Types.DeltaSuperStyle instance GHC.Classes.Eq Potato.Flow.Types.DeltaSuperStyle instance GHC.Show.Show Potato.Flow.Types.DeltaLineStyle instance GHC.Generics.Generic Potato.Flow.Types.DeltaLineStyle instance GHC.Classes.Eq Potato.Flow.Types.DeltaLineStyle instance GHC.Show.Show Potato.Flow.Types.DeltaTextStyle instance GHC.Generics.Generic Potato.Flow.Types.DeltaTextStyle instance GHC.Classes.Eq Potato.Flow.Types.DeltaTextStyle instance GHC.Show.Show Potato.Flow.Types.DeltaMaybeText instance GHC.Generics.Generic Potato.Flow.Types.DeltaMaybeText instance GHC.Classes.Eq Potato.Flow.Types.DeltaMaybeText instance GHC.Show.Show Potato.Flow.Types.DeltaTextArea instance GHC.Generics.Generic Potato.Flow.Types.DeltaTextArea instance GHC.Classes.Eq Potato.Flow.Types.DeltaTextArea instance GHC.Show.Show Potato.Flow.Types.DeltaTextAreaToggle instance GHC.Generics.Generic Potato.Flow.Types.DeltaTextAreaToggle instance GHC.Classes.Eq Potato.Flow.Types.DeltaTextAreaToggle instance GHC.Show.Show Potato.Flow.Types.CRename instance GHC.Generics.Generic Potato.Flow.Types.CRename instance GHC.Classes.Eq Potato.Flow.Types.CRename instance GHC.Show.Show Potato.Flow.Types.CLine instance GHC.Generics.Generic Potato.Flow.Types.CLine instance GHC.Classes.Eq Potato.Flow.Types.CLine instance GHC.Show.Show Potato.Flow.Types.CBoxText instance GHC.Generics.Generic Potato.Flow.Types.CBoxText instance GHC.Classes.Eq Potato.Flow.Types.CBoxText instance GHC.Show.Show Potato.Flow.Types.CBoxType instance GHC.Generics.Generic Potato.Flow.Types.CBoxType instance GHC.Classes.Eq Potato.Flow.Types.CBoxType instance GHC.Show.Show Potato.Flow.Types.CBoundingBox instance GHC.Generics.Generic Potato.Flow.Types.CBoundingBox instance GHC.Classes.Eq Potato.Flow.Types.CBoundingBox instance GHC.Show.Show Potato.Flow.Types.CSuperStyle instance GHC.Generics.Generic Potato.Flow.Types.CSuperStyle instance GHC.Classes.Eq Potato.Flow.Types.CSuperStyle instance GHC.Show.Show Potato.Flow.Types.CLineStyle instance GHC.Generics.Generic Potato.Flow.Types.CLineStyle instance GHC.Classes.Eq Potato.Flow.Types.CLineStyle instance GHC.Show.Show Potato.Flow.Types.CTextStyle instance GHC.Generics.Generic Potato.Flow.Types.CTextStyle instance GHC.Classes.Eq Potato.Flow.Types.CTextStyle instance GHC.Show.Show Potato.Flow.Types.CTextAlign instance GHC.Generics.Generic Potato.Flow.Types.CTextAlign instance GHC.Classes.Eq Potato.Flow.Types.CTextAlign instance GHC.Show.Show Potato.Flow.Types.CMaybeText instance GHC.Generics.Generic Potato.Flow.Types.CMaybeText instance GHC.Classes.Eq Potato.Flow.Types.CMaybeText instance GHC.Show.Show Potato.Flow.Types.CTextArea instance GHC.Generics.Generic Potato.Flow.Types.CTextArea instance GHC.Classes.Eq Potato.Flow.Types.CTextArea instance GHC.Show.Show Potato.Flow.Types.CTextAreaToggle instance GHC.Generics.Generic Potato.Flow.Types.CTextAreaToggle instance GHC.Classes.Eq Potato.Flow.Types.CTextAreaToggle instance Control.DeepSeq.NFData Potato.Flow.Types.CTextAreaToggle instance Control.DeepSeq.NFData Potato.Flow.Types.CTextArea instance Control.DeepSeq.NFData Potato.Flow.Types.CMaybeText instance Control.DeepSeq.NFData Potato.Flow.Types.CTextAlign instance Control.DeepSeq.NFData Potato.Flow.Types.CTextStyle instance Control.DeepSeq.NFData Potato.Flow.Types.CLineStyle instance Control.DeepSeq.NFData Potato.Flow.Types.CSuperStyle instance Control.DeepSeq.NFData Potato.Flow.Types.CBoundingBox instance Control.DeepSeq.NFData Potato.Flow.Types.CBoxType instance Potato.Flow.Math.Delta Potato.Flow.SElts.SBox Potato.Flow.Types.CBoxType instance Control.DeepSeq.NFData Potato.Flow.Types.CBoxText instance Potato.Flow.Math.Delta Potato.Flow.SElts.SBox Potato.Flow.Types.CBoxText instance Potato.Flow.Math.Delta Potato.Flow.SElts.SBoxText Potato.Flow.Types.CBoxText instance Control.DeepSeq.NFData Potato.Flow.Types.CLine instance Data.Default.Class.Default Potato.Flow.Types.CLine instance Potato.Flow.Math.Delta Potato.Flow.SElts.SAutoLine Potato.Flow.Types.CLine instance Control.DeepSeq.NFData Potato.Flow.Types.CRename instance Potato.Flow.Math.Delta Potato.Flow.SElts.SEltLabel Potato.Flow.Types.CRename instance Control.DeepSeq.NFData Potato.Flow.Types.DeltaTextAreaToggle instance Potato.Flow.Math.Delta Potato.Flow.SElts.SElt Potato.Flow.Types.DeltaTextAreaToggle instance Control.DeepSeq.NFData Potato.Flow.Types.DeltaTextArea instance Potato.Flow.Math.Delta Potato.Flow.SElts.TextAreaMapping Potato.Flow.Types.DeltaTextArea instance Control.DeepSeq.NFData Potato.Flow.Types.DeltaMaybeText instance Potato.Flow.Math.Delta (GHC.Maybe.Maybe Data.Text.Internal.Text) Potato.Flow.Types.DeltaMaybeText instance Control.DeepSeq.NFData Potato.Flow.Types.DeltaTextStyle instance Potato.Flow.Math.Delta Potato.Flow.SElts.TextStyle Potato.Flow.Types.DeltaTextStyle instance Control.DeepSeq.NFData Potato.Flow.Types.DeltaLineStyle instance Potato.Flow.Math.Delta Potato.Flow.SElts.LineStyle Potato.Flow.Types.DeltaLineStyle instance Control.DeepSeq.NFData Potato.Flow.Types.DeltaSuperStyle instance Potato.Flow.Math.Delta Potato.Flow.SElts.SuperStyle Potato.Flow.Types.DeltaSuperStyle instance Control.DeepSeq.NFData Potato.Flow.Types.DeltaTextAlign instance Potato.Flow.Math.Delta Potato.Flow.SElts.TextAlign Potato.Flow.Types.DeltaTextAlign instance Data.Aeson.Types.FromJSON.FromJSON Potato.Flow.Types.SPotatoFlow instance Data.Aeson.Types.ToJSON.ToJSON Potato.Flow.Types.SPotatoFlow instance Data.Binary.Class.Binary Potato.Flow.Types.SPotatoFlow instance Control.DeepSeq.NFData Potato.Flow.Types.SPotatoFlow instance GHC.Show.Show Potato.Flow.Types.SCanvas instance Data.Aeson.Types.FromJSON.FromJSON Potato.Flow.Types.SCanvas instance Data.Aeson.Types.ToJSON.ToJSON Potato.Flow.Types.SCanvas instance Data.Binary.Class.Binary Potato.Flow.Types.SCanvas instance Control.DeepSeq.NFData Potato.Flow.Types.SCanvas module Potato.Flow.OwlItem data OwlInfo OwlInfo :: Text -> OwlInfo [_owlInfo_name] :: OwlInfo -> Text data OwlSubItem OwlSubItemNone :: OwlSubItem OwlSubItemFolder :: Seq REltId -> OwlSubItem OwlSubItemBox :: SBox -> OwlSubItem OwlSubItemLine :: SAutoLine -> OwlSubItem OwlSubItemTextArea :: STextArea -> OwlSubItem owlSubItem_equivalent :: OwlSubItem -> OwlSubItem -> Bool data OwlItem OwlItem :: OwlInfo -> OwlSubItem -> OwlItem [_owlItem_info] :: OwlItem -> OwlInfo [_owlItem_subItem] :: OwlItem -> OwlSubItem class MommyOwl o mommyOwl_kiddos :: MommyOwl o => o -> Maybe (Seq REltId) mommyOwl_hasKiddos :: MommyOwl o => o -> Bool class HasOwlItem o hasOwlItem_owlItem :: HasOwlItem o => o -> OwlItem hasOwlItem_name :: HasOwlItem o => o -> Text hasOwlItem_isFolder :: HasOwlItem o => o -> Bool hasOwlItem_attachments :: HasOwlItem o => o -> [Attachment] hasOwlItem_toSElt_hack :: HasOwlItem o => o -> SElt hasOwlItem_toSEltLabel_hack :: HasOwlItem o => o -> SEltLabel hasOwlItem_toOwlSubItem :: HasOwlItem o => o -> OwlSubItem owlItem_name :: OwlItem -> Text owlItem_setName :: OwlItem -> Text -> OwlItem owlSubItem_to_sElt_hack :: OwlSubItem -> SElt owlItem_toSElt_hack :: OwlItem -> SElt sElt_to_owlSubItem :: SElt -> OwlSubItem instance GHC.Generics.Generic Potato.Flow.OwlItem.OwlInfo instance GHC.Classes.Eq Potato.Flow.OwlItem.OwlInfo instance GHC.Show.Show Potato.Flow.OwlItem.OwlInfo instance GHC.Classes.Eq Potato.Flow.OwlItem.OwlSubItem instance GHC.Show.Show Potato.Flow.OwlItem.OwlSubItem instance GHC.Generics.Generic Potato.Flow.OwlItem.OwlSubItem instance GHC.Generics.Generic Potato.Flow.OwlItem.OwlItem instance GHC.Classes.Eq Potato.Flow.OwlItem.OwlItem instance GHC.Show.Show Potato.Flow.OwlItem.OwlItem instance Potato.Flow.OwlItem.HasOwlItem Potato.Flow.OwlItem.OwlItem instance Potato.Flow.OwlItem.MommyOwl Potato.Flow.OwlItem.OwlItem instance Control.DeepSeq.NFData Potato.Flow.OwlItem.OwlItem instance Potato.Flow.DebugHelpers.PotatoShow Potato.Flow.OwlItem.OwlItem instance Control.DeepSeq.NFData Potato.Flow.OwlItem.OwlSubItem instance Control.DeepSeq.NFData Potato.Flow.OwlItem.OwlInfo module Potato.Flow.Owl errorMsg_owlTree_lookupFail :: OwlTree -> REltId -> Text errorMsg_owlMapping_lookupFail :: OwlMapping -> REltId -> Text type OwlMapping = REltIdMap (OwlItemMeta, OwlItem) -- | update attachments based on remap owlItem_updateAttachments :: Bool -> REltIdMap REltId -> OwlItem -> OwlItem type SiblingPosition = Int locateLeftSiblingIdFromSiblingPosition :: OwlMapping -> Seq REltId -> SiblingPosition -> Maybe REltId isDescendentOf :: HasCallStack => OwlMapping -> REltId -> REltId -> Bool data OwlItemMeta OwlItemMeta :: REltId -> Int -> SiblingPosition -> OwlItemMeta [_owlItemMeta_parent] :: OwlItemMeta -> REltId [_owlItemMeta_depth] :: OwlItemMeta -> Int [_owlItemMeta_position] :: OwlItemMeta -> SiblingPosition data OwlSpot OwlSpot :: REltId -> Maybe REltId -> OwlSpot [_owlSpot_parent] :: OwlSpot -> REltId [_owlSpot_leftSibling] :: OwlSpot -> Maybe REltId topSpot :: OwlSpot data SuperOwl SuperOwl :: REltId -> OwlItemMeta -> OwlItem -> SuperOwl [_superOwl_id] :: SuperOwl -> REltId [_superOwl_meta] :: SuperOwl -> OwlItemMeta [_superOwl_elt] :: SuperOwl -> OwlItem type SuperOwlChanges = REltIdMap (Maybe SuperOwl) attachmentMap_addSuperOwls' :: Foldable f => (Attachment -> Bool) -> f SuperOwl -> AttachmentMap -> AttachmentMap attachmentMap_addSuperOwls :: Foldable f => f SuperOwl -> AttachmentMap -> AttachmentMap -- | update AttachmentMap from SuperOwlChanges (call on SuperOwlChanges -- produced by updateOwlPFWorkspace) updateAttachmentMapFromSuperOwlChanges :: SuperOwlChanges -> AttachmentMap -> AttachmentMap -- | update SuperOwlChanges to include stuff attached to stuff that changed -- (call before rendering) getChangesFromAttachmentMap :: OwlTree -> AttachmentMap -> SuperOwlChanges -> SuperOwlChanges superOwl_id :: Functor f => (REltId -> f REltId) -> SuperOwl -> f SuperOwl superOwl_isTopOwl :: SuperOwl -> Bool -- | same as superOwl_isTopOwl except checks all conditions, intended to be -- used in asserts superOwl_isTopOwlSurely :: SuperOwl -> Bool noOwl :: REltId superOwl_parentId :: SuperOwl -> REltId superOwl_depth :: SuperOwl -> Int superOwl_owlSubItem :: SuperOwl -> OwlSubItem owlTree_superOwlNthParentId :: OwlTree -> SuperOwl -> Int -> REltId newtype OwlParliament OwlParliament :: Seq REltId -> OwlParliament [unOwlParliament] :: OwlParliament -> Seq REltId newtype SuperOwlParliament SuperOwlParliament :: Seq SuperOwl -> SuperOwlParliament [unSuperOwlParliament] :: SuperOwlParliament -> Seq SuperOwl class IsParliament a isParliament_disjointUnion :: IsParliament a => a -> a -> a isParliament_null :: IsParliament a => a -> Bool isParliament_empty :: IsParliament a => a isParliament_length :: IsParliament a => a -> Int disjointUnion :: Eq a => [a] -> [a] -> [a] owlParliament_toSuperOwlParliament :: OwlTree -> OwlParliament -> SuperOwlParliament superOwlParliament_toOwlParliament :: SuperOwlParliament -> OwlParliament -- | partition a list into groups based on int pairings partitionN :: (a -> Int) -> Seq a -> IntMap (Seq a) makeSortedSuperOwlParliament :: OwlTree -> Seq SuperOwl -> SuperOwlParliament superOwlParliament_disjointUnionAndCorrect :: OwlTree -> SuperOwlParliament -> SuperOwlParliament -> SuperOwlParliament superOwlParliament_isValid :: OwlTree -> SuperOwlParliament -> Bool superOwlParliament_toSEltTree :: OwlTree -> SuperOwlParliament -> SEltTree newtype CanvasSelection CanvasSelection :: Seq SuperOwl -> CanvasSelection [unCanvasSelection] :: CanvasSelection -> Seq SuperOwl -- | convert SuperOwlParliament to CanvasSelection (includes children and -- no folders) does not omits locked/hidden elts since Owl should not -- depend on Layers, you should do this using filterfn I guess?? superOwlParliament_convertToCanvasSelection :: OwlTree -> (SuperOwl -> Bool) -> SuperOwlParliament -> CanvasSelection superOwlParliament_convertToSeqWithChildren :: OwlTree -> SuperOwlParliament -> Seq SuperOwl -- | intended for use in OwlWorkspace to create PFCmd generate MiniOwlTree -- will be reindexed so as not to conflict with OwlTree relies on -- OwlParliament being correctly ordered owlParliament_convertToMiniOwltree :: OwlTree -> OwlParliament -> MiniOwlTree type OwlParliamentSet = IntSet superOwlParliament_toOwlParliamentSet :: SuperOwlParliament -> OwlParliamentSet owlParliamentSet_member :: REltId -> OwlParliamentSet -> Bool -- | returns true if rid is a contained in the OwlParliamentSet or is a -- descendent of sset owlParliamentSet_descendent :: OwlTree -> REltId -> OwlParliamentSet -> Bool owlParliamentSet_findParents :: OwlTree -> OwlParliamentSet -> OwlParliamentSet data OwlTree OwlTree :: OwlMapping -> Seq REltId -> OwlTree [_owlTree_mapping] :: OwlTree -> OwlMapping [_owlTree_topOwls] :: OwlTree -> Seq REltId type MiniOwlTree = OwlTree -- | check if two OwlTree's are equivalent checks if structure is the same, -- REltIds can differ owlTree_equivalent :: OwlTree -> OwlTree -> Bool owlTree_validate :: OwlTree -> (Bool, Text) owlTree_maxId :: OwlTree -> REltId internal_owlTree_reorgKiddos :: OwlTree -> REltId -> OwlTree emptyOwlTree :: OwlTree owlTree_exists :: OwlTree -> REltId -> Bool owlTree_findSuperOwl :: OwlTree -> REltId -> Maybe SuperOwl owlTree_mustFindSuperOwl :: HasCallStack => OwlTree -> REltId -> SuperOwl owlTree_findKiddos :: OwlTree -> REltId -> Maybe (Seq REltId) owlTree_findSuperOwlAtOwlSpot :: OwlTree -> OwlSpot -> Maybe SuperOwl owlTree_goRightFromOwlSpot :: OwlTree -> OwlSpot -> Maybe OwlSpot -- | throws if OwlItemMeta is invalid in OwlTree TODO make naming -- consistent in this file... owlTree_owlItemMeta_toOwlSpot :: OwlTree -> OwlItemMeta -> OwlSpot -- | throws if REltId is invalid in OwlTree owlTree_rEltId_toOwlSpot :: HasCallStack => OwlTree -> REltId -> OwlSpot -- | super inefficient implementation for testing only owlTree_rEltId_toFlattenedIndex_debug :: OwlTree -> REltId -> Int -- | NOTE this will return an AttachmentMap containing targets that have -- since been deleted owlTree_makeAttachmentMap :: OwlTree -> AttachmentMap -- | return fales if any attachments are dangling (i.e. they are attached -- to a target that does not exist in the tree) owlTree_hasDanglingAttachments :: OwlTree -> Bool owlTree_topSuperOwls :: OwlTree -> Seq SuperOwl owlTree_foldAt' :: (a -> SuperOwl -> a) -> a -> OwlTree -> SuperOwl -> a -- | fold over an element in the tree and all its children owlTree_foldAt :: (a -> SuperOwl -> a) -> a -> OwlTree -> REltId -> a owlTree_foldChildrenAt' :: (a -> SuperOwl -> a) -> a -> OwlTree -> SuperOwl -> a -- | same as owlTree_foldAt but excludes parent owlTree_foldChildrenAt :: (a -> SuperOwl -> a) -> a -> OwlTree -> REltId -> a owlTree_fold :: (a -> SuperOwl -> a) -> a -> OwlTree -> a owlTree_owlCount :: OwlTree -> Int -- | iterates an element and all its children owliterateat :: OwlTree -> REltId -> Seq SuperOwl -- | iterates an element's children (excluding self) owliteratechildrenat :: OwlTree -> REltId -> Seq SuperOwl -- | iterates everything in the directory owliterateall :: OwlTree -> Seq SuperOwl class HasOwlTree o hasOwlTree_owlTree :: HasOwlTree o => o -> OwlTree hasOwlTree_exists :: HasOwlTree o => o -> REltId -> Bool hasOwlTree_findSuperOwl :: HasOwlTree o => o -> REltId -> Maybe SuperOwl hasOwlTree_mustFindSuperOwl :: (HasOwlTree o, HasCallStack) => o -> REltId -> SuperOwl hasOwlTree_test_findFirstSuperOwlByName :: HasOwlTree o => o -> Text -> Maybe SuperOwl hasOwlTree_test_mustFindFirstSuperOwlByName :: HasOwlTree o => o -> Text -> SuperOwl -- | select everything in the OwlTree owlTree_toSuperOwlParliament :: OwlTree -> SuperOwlParliament owlTree_removeREltId :: REltId -> OwlTree -> OwlTree owlTree_removeSuperOwl :: SuperOwl -> OwlTree -> OwlTree owlTree_moveOwlParliament :: OwlParliament -> OwlSpot -> OwlTree -> (OwlTree, [SuperOwl]) -- | assumes SEltTree REltIds do not collide with OwlTree owlTree_addSEltTree :: OwlSpot -> SEltTree -> OwlTree -> (OwlTree, [SuperOwl]) -- | actually this might be OK... or at least we want to check against tree -- we are attaching to such that if we copy paste something that was -- attached it keeps those attachments (or maybe we don't!) owlTree_reindex :: Int -> OwlTree -> OwlTree owlTree_addMiniOwlTree :: OwlSpot -> MiniOwlTree -> OwlTree -> (OwlTree, [SuperOwl]) internal_owlTree_addOwlItem :: OwlSpot -> REltId -> OwlItem -> OwlTree -> (OwlTree, SuperOwl) owlTree_addOwlItem :: OwlSpot -> REltId -> OwlItem -> OwlTree -> (OwlTree, SuperOwl) owlTree_addOwlItemList :: [(REltId, OwlSpot, OwlItem)] -> OwlTree -> (OwlTree, [SuperOwl]) owlTree_superOwl_comparePosition :: OwlTree -> SuperOwl -> SuperOwl -> Ordering -- | use to convert old style layers to Owl internal_addUntilFolderEndRecursive :: REltIdMap SEltLabel -> Seq REltId -> Int -> REltId -> Int -> REltIdMap (OwlItemMeta, OwlItem) -> Seq REltId -> (Int, REltIdMap (OwlItemMeta, OwlItem), Seq REltId) owlTree_fromSEltTree :: SEltTree -> OwlTree owlTree_fromOldState :: REltIdMap SEltLabel -> Seq REltId -> OwlTree owlTree_toSEltTree :: OwlTree -> SEltTree superOwl_toSElt_hack :: SuperOwl -> SElt superOwl_toSEltLabel_hack :: SuperOwl -> SEltLabel instance GHC.Generics.Generic Potato.Flow.Owl.OwlItemMeta instance GHC.Show.Show Potato.Flow.Owl.OwlItemMeta instance GHC.Classes.Eq Potato.Flow.Owl.OwlItemMeta instance GHC.Generics.Generic Potato.Flow.Owl.OwlSpot instance GHC.Show.Show Potato.Flow.Owl.OwlSpot instance GHC.Generics.Generic Potato.Flow.Owl.SuperOwl instance GHC.Show.Show Potato.Flow.Owl.SuperOwl instance GHC.Classes.Eq Potato.Flow.Owl.SuperOwl instance GHC.Generics.Generic Potato.Flow.Owl.OwlParliament instance GHC.Show.Show Potato.Flow.Owl.OwlParliament instance GHC.Generics.Generic Potato.Flow.Owl.SuperOwlParliament instance GHC.Show.Show Potato.Flow.Owl.SuperOwlParliament instance GHC.Classes.Eq Potato.Flow.Owl.SuperOwlParliament instance GHC.Classes.Eq Potato.Flow.Owl.CanvasSelection instance GHC.Show.Show Potato.Flow.Owl.CanvasSelection instance GHC.Generics.Generic Potato.Flow.Owl.OwlTree instance GHC.Classes.Eq Potato.Flow.Owl.OwlTree instance GHC.Show.Show Potato.Flow.Owl.OwlTree instance Potato.Flow.Owl.HasOwlTree Potato.Flow.Owl.OwlTree instance Control.DeepSeq.NFData Potato.Flow.Owl.OwlTree instance Potato.Flow.OwlItem.MommyOwl Potato.Flow.Owl.OwlTree instance Potato.Flow.DebugHelpers.PotatoShow Potato.Flow.Owl.OwlTree instance Potato.Flow.Owl.IsParliament Potato.Flow.Owl.OwlParliament instance Potato.Flow.Owl.IsParliament Potato.Flow.Owl.SuperOwlParliament instance Control.DeepSeq.NFData Potato.Flow.Owl.SuperOwlParliament instance Potato.Flow.DebugHelpers.PotatoShow Potato.Flow.Owl.SuperOwlParliament instance Control.DeepSeq.NFData Potato.Flow.Owl.OwlParliament instance Control.DeepSeq.NFData Potato.Flow.Owl.SuperOwl instance Potato.Flow.OwlItem.MommyOwl Potato.Flow.Owl.SuperOwl instance Potato.Flow.OwlItem.HasOwlItem Potato.Flow.Owl.SuperOwl instance Potato.Flow.DebugHelpers.PotatoShow Potato.Flow.Owl.SuperOwl instance Control.DeepSeq.NFData Potato.Flow.Owl.OwlSpot instance Control.DeepSeq.NFData Potato.Flow.Owl.OwlItemMeta instance Potato.Flow.DebugHelpers.PotatoShow Potato.Flow.Owl.OwlItemMeta module Potato.Flow.Methods.Types type SEltDrawerRenderFn = forall a. (HasOwlTree a) => a -> XY -> Maybe PChar type SEltDrawerBoxFn = forall a. (HasOwlTree a) => a -> LBox makePotatoRenderer :: LBox -> SEltDrawerRenderFn data SEltDrawer SEltDrawer :: SEltDrawerBoxFn -> SEltDrawerRenderFn -> Int -> SEltDrawer [_sEltDrawer_box] :: SEltDrawer -> SEltDrawerBoxFn [_sEltDrawer_renderFn] :: SEltDrawer -> SEltDrawerRenderFn [_sEltDrawer_maxCharWidth] :: SEltDrawer -> Int nilDrawer :: SEltDrawer sEltDrawer_renderToLines :: HasOwlTree a => SEltDrawer -> a -> [Text] -- | gets an LBox that contains the entire RElt getSEltBox_naive :: SElt -> Maybe LBox getSEltLabelBox :: SEltLabel -> Maybe LBox module Potato.Flow.Attachments data AvailableAttachment type BoxWithAttachmentLocation = (LBox, AttachmentLocation, AttachmentOffsetRatio) attachLocationFromLBox_conjugateCartRotationReflection :: CartRotationReflection -> Bool -> BoxWithAttachmentLocation -> XY attachLocationFromLBox :: Bool -> BoxWithAttachmentLocation -> XY availableAttachLocationsFromLBox :: Bool -> LBox -> [AvailableAttachment] owlItem_availableAttachments :: Bool -> Bool -> OwlItem -> [AvailableAttachment] owlItem_availableAttachmentsAtDefaultLocation :: Bool -> Bool -> OwlItem -> [(AttachmentLocation, XY)] isOverAttachment :: XY -> [(Attachment, XY)] -> Maybe (Attachment, XY) projectAttachment :: AttachmentLocation -> XY -> REltId -> LBox -> Maybe (Attachment, XY) attachmentRenderChar :: Attachment -> PChar instance GHC.Show.Show Potato.Flow.Attachments.CartSegment instance GHC.Classes.Eq Potato.Flow.Attachments.CartSegment instance GHC.Classes.Eq Potato.Flow.Attachments.AvailableAttachment instance GHC.Show.Show Potato.Flow.Attachments.AvailableAttachment module Potato.Flow.Methods.LineDrawer data LineAnchorsForRender LineAnchorsForRender :: XY -> [(CartDir, Int, Bool)] -> LineAnchorsForRender [_lineAnchorsForRender_start] :: LineAnchorsForRender -> XY [_lineAnchorsForRender_rest] :: LineAnchorsForRender -> [(CartDir, Int, Bool)] lineAnchorsForRender_doesIntersectPoint :: LineAnchorsForRender -> XY -> Bool lineAnchorsForRender_doesIntersectBox :: LineAnchorsForRender -> LBox -> Bool lineAnchorsForRender_findIntersectingSubsegment :: LineAnchorsForRender -> XY -> Maybe Int lineAnchorsForRender_length :: LineAnchorsForRender -> Int sAutoLine_to_lineAnchorsForRenderList :: HasOwlTree a => a -> SAutoLine -> [LineAnchorsForRender] sSimpleLineNewRenderFn :: SAutoLine -> Maybe LineAnchorsForRender -> SEltDrawer sSimpleLineNewRenderFnComputeCache :: HasOwlTree a => a -> SAutoLine -> LineAnchorsForRender getSAutoLineLabelPosition :: HasOwlTree a => a -> SAutoLine -> SAutoLineLabel -> XY getSAutoLineLabelPositionFromLineAnchorsForRender :: LineAnchorsForRender -> SAutoLine -> SAutoLineLabel -> XY getSortedSAutoLineLabelPositions :: HasOwlTree a => a -> SAutoLine -> [(XY, Int, SAutoLineLabel)] getClosestPointOnLineFromLineAnchorsForRenderList :: [LineAnchorsForRender] -> XY -> (XY, Int, Float) data CartDir CD_Up :: CartDir CD_Down :: CartDir CD_Left :: CartDir CD_Right :: CartDir class TransformMe a transformMe_rotateLeft :: TransformMe a => a -> a transformMe_rotateRight :: TransformMe a => a -> a transformMe_reflectHorizontally :: TransformMe a => a -> a transformMe_reflectVertically :: TransformMe a => a -> a determineSeparation :: (LBox, (Int, Int, Int, Int)) -> (LBox, (Int, Int, Int, Int)) -> (Bool, Bool) lineAnchorsForRender_simplify :: LineAnchorsForRender -> LineAnchorsForRender internal_getSAutoLineLabelPosition_walk :: LineAnchorsForRender -> Int -> XY instance GHC.Show.Show Potato.Flow.Methods.LineDrawer.OffsetBorder instance Potato.Flow.Methods.LineTypes.TransformMe Potato.Flow.Methods.LineDrawer.OffsetBorder instance Potato.Flow.Methods.LineTypes.TransformMe Potato.Flow.Methods.LineDrawer.SimpleLineSolverParameters_NEW module Potato.Flow.Deprecated.Layers -- | reindexes list of LayerPos such that each element is indexed as if all -- previous elements have been removed O(n^2) lol reindexSEltLayerPosForRemoval :: [LayerPos] -> [LayerPos] -- | inverse of reindexSEltLayerPosForRemoval input indices are before any -- elements are inserted O(n^2) lol reindexSEltLayerPosForInsertion :: [LayerPos] -> [LayerPos] hasScopingProperty :: (a -> Maybe Bool) -> Seq a -> Bool -- | assumes selection is ordered and is valid selectionHasScopingProperty :: (a -> Maybe Bool) -> Seq a -> [Int] -> Bool findMatchingScope :: (a -> Maybe Bool) -> Seq a -> Int -> Int -- | converts selection so that it satisfies the scoping property by adding -- matching folders assumes input sequence satisfies scoping property??? -- simple and inefficient implementation, do not use in prod scopeSelection :: (a -> Maybe Bool) -> Seq a -> [Int] -> [Int] -- | inserts ys at index i into xs insertElts :: Int -> Seq a -> Seq a -> Seq a -- | inserts y at index y into xs insertElt :: Int -> a -> Seq a -> Seq a -- | removes n elts at index i from xs removeElts :: Int -> Int -> Seq a -> Seq a -- | inserts ys into xs, positions are before insertion insertEltList_indexBeforeInsertion :: [(Int, a)] -> Seq a -> Seq a -- | inserts ys into xs, positions are after insertion insertEltList_indexAfterInsertion :: [(Int, a)] -> Seq a -> Seq a -- | removes is' from xs, positions are before removal removeEltList :: [Int] -> Seq a -> Seq a -- | moves all elts, new position is before removal, ys must be sorted moveEltList :: [Int] -> Int -> Seq a -> Seq a undoMoveEltList :: [Int] -> Int -> Seq a -> Seq a module Potato.Flow.Controller.Types data UnicodeWidthFn UnicodeWidthFn :: (PChar -> Int) -> UnicodeWidthFn [unicodeWidth_wcwidth] :: UnicodeWidthFn -> PChar -> Int data Tool Tool_Select :: Tool Tool_Pan :: Tool Tool_Box :: Tool Tool_Line :: Tool Tool_Text :: Tool Tool_TextArea :: Tool Tool_CartLine :: Tool tool_isCreate :: Tool -> Bool data PotatoDefaultParameters PotatoDefaultParameters :: SBoxType -> SuperStyle -> LineStyle -> LineStyle -> TextAlign -> TextAlign -> PotatoDefaultParameters [_potatoDefaultParameters_sBoxType] :: PotatoDefaultParameters -> SBoxType [_potatoDefaultParameters_superStyle] :: PotatoDefaultParameters -> SuperStyle [_potatoDefaultParameters_lineStyle] :: PotatoDefaultParameters -> LineStyle [_potatoDefaultParameters_lineStyleEnd] :: PotatoDefaultParameters -> LineStyle [_potatoDefaultParameters_box_label_textAlign] :: PotatoDefaultParameters -> TextAlign [_potatoDefaultParameters_box_text_textAlign] :: PotatoDefaultParameters -> TextAlign data SetPotatoDefaultParameters SetPotatoDefaultParameters :: Maybe SBoxType -> Maybe LineStyle -> Maybe LineStyle -> Maybe SuperStyle -> Maybe TextAlign -> Maybe TextAlign -> SetPotatoDefaultParameters [_setPotatoDefaultParameters_sBoxType] :: SetPotatoDefaultParameters -> Maybe SBoxType [_setPotatoDefaultParameters_lineStyle] :: SetPotatoDefaultParameters -> Maybe LineStyle [_setPotatoDefaultParameters_lineStyleEnd] :: SetPotatoDefaultParameters -> Maybe LineStyle [_setPotatoDefaultParameters_superStyle] :: SetPotatoDefaultParameters -> Maybe SuperStyle [_setPotatoDefaultParameters_box_label_textAlign] :: SetPotatoDefaultParameters -> Maybe TextAlign [_setPotatoDefaultParameters_box_text_textAlign] :: SetPotatoDefaultParameters -> Maybe TextAlign potatoDefaultParameters_set :: PotatoDefaultParameters -> SetPotatoDefaultParameters -> PotatoDefaultParameters type Selection = SuperOwlParliament defaultFolderCollapseState :: Bool data LayerMeta LayerMeta :: Bool -> Bool -> Bool -> LayerMeta [_layerMeta_isLocked] :: LayerMeta -> Bool [_layerMeta_isHidden] :: LayerMeta -> Bool [_layerMeta_isCollapsed] :: LayerMeta -> Bool type LayerMetaMap = REltIdMap LayerMeta layerMetaMap_isCollapsed :: REltId -> LayerMetaMap -> Bool data ControllerMeta ControllerMeta :: XY -> LayerMetaMap -> ControllerMeta [_controllerMeta_pan] :: ControllerMeta -> XY [_controllerMeta_layers] :: ControllerMeta -> LayerMetaMap emptyControllerMeta :: ControllerMeta type EverythingLoadState = (SPotatoFlow, ControllerMeta) instance GHC.Enum.Enum Potato.Flow.Controller.Types.Tool instance GHC.Show.Show Potato.Flow.Controller.Types.Tool instance GHC.Classes.Eq Potato.Flow.Controller.Types.Tool instance GHC.Show.Show Potato.Flow.Controller.Types.PotatoDefaultParameters instance GHC.Classes.Eq Potato.Flow.Controller.Types.PotatoDefaultParameters instance GHC.Show.Show Potato.Flow.Controller.Types.SetPotatoDefaultParameters instance GHC.Classes.Eq Potato.Flow.Controller.Types.SetPotatoDefaultParameters instance GHC.Generics.Generic Potato.Flow.Controller.Types.LayerMeta instance GHC.Classes.Eq Potato.Flow.Controller.Types.LayerMeta instance GHC.Generics.Generic Potato.Flow.Controller.Types.ControllerMeta instance GHC.Classes.Eq Potato.Flow.Controller.Types.ControllerMeta instance GHC.Show.Show Potato.Flow.Controller.Types.ControllerMeta instance Data.Aeson.Types.FromJSON.FromJSON Potato.Flow.Controller.Types.ControllerMeta instance Data.Aeson.Types.ToJSON.ToJSON Potato.Flow.Controller.Types.ControllerMeta instance Control.DeepSeq.NFData Potato.Flow.Controller.Types.ControllerMeta instance Data.Binary.Class.Binary Potato.Flow.Controller.Types.ControllerMeta instance Data.Default.Class.Default Potato.Flow.Controller.Types.ControllerMeta instance GHC.Show.Show Potato.Flow.Controller.Types.LayerMeta instance Data.Aeson.Types.FromJSON.FromJSON Potato.Flow.Controller.Types.LayerMeta instance Data.Aeson.Types.ToJSON.ToJSON Potato.Flow.Controller.Types.LayerMeta instance Control.DeepSeq.NFData Potato.Flow.Controller.Types.LayerMeta instance Data.Binary.Class.Binary Potato.Flow.Controller.Types.LayerMeta instance Data.Default.Class.Default Potato.Flow.Controller.Types.LayerMeta instance Data.Default.Class.Default Potato.Flow.Controller.Types.SetPotatoDefaultParameters instance Data.Default.Class.Default Potato.Flow.Controller.Types.PotatoDefaultParameters module Potato.Flow.Serialization.Snake -- | list of all version supported versions :: [Int] -- | version of the current build currentVersion :: Int data Snake Snake :: Int -> String -> Text -> Snake [_snake_version] :: Snake -> Int [_snake_format] :: Snake -> String [_snake_data] :: Snake -> Text data SnakeFormat SF_Json :: SnakeFormat SF_Binary :: SnakeFormat serialize :: SnakeFormat -> (SPotatoFlow, ControllerMeta) -> ByteString deserialize :: ByteString -> Either String (SPotatoFlow, ControllerMeta) deserialize_internal :: Snake -> Either String (SPotatoFlow, ControllerMeta) decodeFile :: FilePath -> IO (Either String (SPotatoFlow, ControllerMeta)) decodeFileMaybe :: FilePath -> IO (Maybe (SPotatoFlow, ControllerMeta)) instance GHC.Show.Show Potato.Flow.Serialization.Snake.Snake instance GHC.Generics.Generic Potato.Flow.Serialization.Snake.Snake instance GHC.Classes.Eq Potato.Flow.Serialization.Snake.Snake instance Data.Aeson.Types.FromJSON.FromJSON Potato.Flow.Serialization.Snake.Snake instance Data.Aeson.Types.ToJSON.ToJSON Potato.Flow.Serialization.Snake.Snake instance Data.Binary.Class.Binary Potato.Flow.Serialization.Snake.Snake instance Control.DeepSeq.NFData Potato.Flow.Serialization.Snake.Snake module Potato.Flow.RenderCache -- | input index must be contained in the box toPoint :: LBox -> Int -> XY -- | input XY point must be contained in the box toIndex :: LBox -> XY -> Int -- | same as above but does bounds checking toIndexSafe :: LBox -> XY -> Maybe Int -- | WidePChar represents part of a PChar that the Int8 parameter is offset -- from where the PChar originates from, so for example 😱 <- -- PChar 01 <- Int8 offset parameter -- --