eventloop 0.2.1.2 → 0.3.0.0
raw patch · 3 files changed
+3/−45 lines, 3 filesPVP ok
version bump matches the API change (PVP)
API changes (from Hackage documentation)
- Eventloop.Module.DrawTrees: ParseNode :: String -> [ParseTree] -> ParseTree
- Eventloop.Module.DrawTrees: TParseTree :: ParseTree -> Tree
- Eventloop.Module.DrawTrees: data ParseTree
- Eventloop.Module.DrawTrees: parseExampleTree :: ParseTree
Files
- eventloop.cabal +1/−1
- src/Eventloop/Module/DrawTrees/DrawTrees.hs +1/−38
- src/Eventloop/Module/DrawTrees/Types.hs +1/−6
eventloop.cabal view
@@ -6,7 +6,7 @@ -- PVP summary: +-+------- breaking API changes -- | | +----- non-breaking API additions -- | | | +--- code changes with no API change -version: 0.2.1.2 +version: 0.3.0.0 synopsis: A different take on an IO system. Based on Amanda's IO loop, this eventloop takes a function that maps input events to output events. It can easily be extended by modules that represent IO devices or join multiple modules together. description: A different take on an IO system. Based on Amanda's IO loop, this eventloop takes a function that maps input events to output events. It can easily be extended by modules that represent IO devices or join multiple modules together. Each module exists of a initialize and teardown function that are both called once at startup and shutting down. During run-time, a module can provice a preprocessor function (which transforms input events before they get to the eventloop),
src/Eventloop/Module/DrawTrees/DrawTrees.hs view
@@ -53,19 +53,10 @@ instance GeneralizeTree Tree where - generalizeTree (TParseTree tree) = generalizeTree tree generalizeTree (TRBTree tree) = generalizeTree tree generalizeTree (TRoseTree tree) = generalizeTree tree - -instance GeneralizeTree ParseTree where - generalizeTree (ParseNode str children) = GeneralTreeBox content children'WithLines - where - content = [GeneralNodeText (0,0,0, 255) str] - children'WithLines = zip (repeat line) (map generalizeTree children) - line = GeneralLine (125,125,125, 255) - instance GeneralizeTree RBTree where generalizeTree (RBNode col _ []) = GeneralTreeBox content [] where @@ -89,35 +80,7 @@ where content = [GeneralNodeText (0,0,0, 255) str] children'WithLines = zip (repeat line) (map generalizeTree children) - line = GeneralLine (0,0,0, 255) - -parseExampleTree = ParseNode "z" - [ ParseNode "aaa" - [ ParseNode "bbb" - [ ParseNode "ccc" [], - ParseNode "ddd" [] - ], - ParseNode "a" - [ParseNode "fff" [], - ParseNode "ggg" [], - ParseNode "hhh" [] - ], - ParseNode "iii" - [ParseNode "z" [] - ] - ], - ParseNode "kkk" - [ParseNode "lll" [], - ParseNode "mmm" - [ParseNode "nnn" - [ParseNode "q" [], - ParseNode "r" [] - ], - ParseNode "ooo" [], - ParseNode "ppp" [] - ] - ] - ] + line = GeneralLine (0,0,0, 255) rbExampleTree = RBNode NodeBlack "12" [ RBNode NodeRed "11"
src/Eventloop/Module/DrawTrees/Types.hs view
@@ -7,14 +7,9 @@ data DrawTreesOut = DrawTrees CanvasId [Tree] deriving (Show, Eq) -data Tree = TParseTree ParseTree - | TRBTree RBTree +data Tree = TRBTree RBTree | TRoseTree RoseTree deriving (Show, Eq) - - -data ParseTree = ParseNode String [ParseTree] - deriving (Show, Eq) data NodeColor = NodeRed