Commit c1a650af authored by Mart Lubbers's avatar Mart Lubbers

Merge branch 'setFold' into 'master'

adapt to changed Data.Set module

See merge request !211
parents 52c47b7c 6a568816
Pipeline #16554 passed with stage
in 3 minutes and 38 seconds
......@@ -7,8 +7,9 @@ from StdFunc import o
import Data.List, Data.GenEq, Data.Func
import Data.Error
import Data.MapCollection
from Data.Foldable import class Foldable (foldr`)
from Data.Map import :: Map, instance Functor (Map k)
from Data.Set import :: Set, instance == (Set a), instance < (Set a)
from Data.Set import :: Set, instance == (Set a), instance < (Set a), instance Foldable Set
import qualified Data.Map as DM
import qualified Data.Set as DS
import Text
......@@ -266,7 +267,7 @@ where
, ("y", "-10000")
]
#! world = foldl (\world args -> snd ((elem `setAttribute` args) world)) world fontAttrs
#! (ws, world) = 'DS'.fold (calcTextLength elem) ('DM'.newMap, world) strs
#! (ws, world) = foldr` (calcTextLength elem) ('DM'.newMap, world) strs
= ('DM'.alter (merge ws) fontdef text_spans, world)
where
merge :: !(Map String TextSpan) !(Maybe (Map String TextSpan)) -> Maybe (Map String TextSpan)
......
......@@ -9,6 +9,7 @@ import StdEnum
from Data.Map as DM import qualified newMap, put, get, del, toList, fromList, delList, alter, union, keys, unions, singleton, member, null
from Data.Set as DS import qualified newSet, insert, delete, toList, fromList, null
from Data.Set import instance Foldable Set
from Data.Tuple import appSnd
from Data.Map import instance Functor (Map k)
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment