Fix bug not adding last positioned room to list
This commit is contained in:
@@ -11,6 +11,7 @@ module Dodge.Tree.Compose
|
||||
) where
|
||||
import Dodge.Tree.Compose.Data
|
||||
import Dodge.Tree.Polymorphic
|
||||
import Dodge.Base
|
||||
import Data.Tree
|
||||
|
||||
expandTree :: CompTree a -> Tree a
|
||||
@@ -24,7 +25,8 @@ expandTree (Node root extChildren) = case root of
|
||||
$ map (:[]) extChildren ++ repeat []
|
||||
|
||||
overwriteLabel :: Int -> (a -> ComposingNode a) -> SubCompTree a -> [SubCompTree a] -> SubCompTree a
|
||||
overwriteLabel i f t ts = head $ updateSingleNode islabel update t
|
||||
overwriteLabel i f t ts = errorHead ("tried to overwriteLabel " ++ show i)
|
||||
$ updateSingleNode islabel update t
|
||||
where
|
||||
islabel (UseLabel j _) | i == j = True
|
||||
islabel _ = False
|
||||
|
||||
Reference in New Issue
Block a user