Comment out LDTs
This commit is contained in:
@@ -36,30 +36,30 @@ data LDTree b a = LDT -- LabelDoubleTree
|
||||
}
|
||||
deriving (Eq, Ord, Show, Read)
|
||||
|
||||
-- I am not sure about the double use of records here
|
||||
data ContextLDT b a
|
||||
= TopLDT
|
||||
| LeftwardLDT
|
||||
{ _cldtUp :: ContextLDT b a
|
||||
, _cldtCloseLeft :: [(b, LDTree b a)]
|
||||
, _cldtParent :: a
|
||||
, _cldtLink :: b
|
||||
, _cldtCloseRight :: [(b, LDTree b a)]
|
||||
, _cldtFarRight :: [(b, LDTree b a)]
|
||||
}
|
||||
| RightwardLDT
|
||||
{ _cldtUp :: ContextLDT b a
|
||||
, _cldtFarLeft :: [(b, LDTree b a)]
|
||||
, _cldtCloseLeft :: [(b, LDTree b a)]
|
||||
, _cldtParent :: a
|
||||
, _cldtLink :: b
|
||||
, _cldtCloseRight :: [(b, LDTree b a)]
|
||||
}
|
||||
---- I am not sure about the double use of records here
|
||||
--data ContextLDT b a
|
||||
-- = TopLDT
|
||||
-- | LeftwardLDT
|
||||
-- { _cldtUp :: ContextLDT b a
|
||||
-- , _cldtCloseLeft :: [(b, LDTree b a)]
|
||||
-- , _cldtParent :: a
|
||||
-- , _cldtLink :: b
|
||||
-- , _cldtCloseRight :: [(b, LDTree b a)]
|
||||
-- , _cldtFarRight :: [(b, LDTree b a)]
|
||||
-- }
|
||||
-- | RightwardLDT
|
||||
-- { _cldtUp :: ContextLDT b a
|
||||
-- , _cldtFarLeft :: [(b, LDTree b a)]
|
||||
-- , _cldtCloseLeft :: [(b, LDTree b a)]
|
||||
-- , _cldtParent :: a
|
||||
-- , _cldtLink :: b
|
||||
-- , _cldtCloseRight :: [(b, LDTree b a)]
|
||||
-- }
|
||||
|
||||
data LocationLDT b a = LocLDT
|
||||
{ _locLdtContext :: ContextLDT b a
|
||||
, _locLDT :: LDTree b a
|
||||
}
|
||||
--data LocationLDT b a = LocLDT
|
||||
-- { _locLdtContext :: ContextLDT b a
|
||||
-- , _locLDT :: LDTree b a
|
||||
-- }
|
||||
|
||||
instance Functor DTree where
|
||||
fmap f (DT x l r) = DT (f x) (fmap (fmap f) l) (fmap (fmap f) r)
|
||||
@@ -102,34 +102,34 @@ data LocationDT a = LocDT
|
||||
}
|
||||
|
||||
makeLenses ''DTree
|
||||
makeLenses ''LDTree
|
||||
makeLenses ''LocationLDT
|
||||
makeLenses ''ContextLDT
|
||||
--makeLenses ''LDTree
|
||||
--makeLenses ''LocationLDT
|
||||
--makeLenses ''ContextLDT
|
||||
makeLenses ''LocationDT
|
||||
makeLenses ''ContextDT
|
||||
|
||||
instance Functor (LocationLDT b) where
|
||||
fmap f (LocLDT c t) = LocLDT (fmap f c) (fmap f t)
|
||||
--instance Functor (LocationLDT b) where
|
||||
-- fmap f (LocLDT c t) = LocLDT (fmap f c) (fmap f t)
|
||||
|
||||
instance Functor LocationDT where
|
||||
fmap f (LocDT c t) = LocDT (fmap f c) (fmap f t)
|
||||
|
||||
instance Functor (ContextLDT b) where
|
||||
fmap f = \case
|
||||
TopLDT -> TopLDT
|
||||
LeftwardLDT u cl p l cr fr -> LeftwardLDT
|
||||
(fmap f u)
|
||||
(fmap (fmap (fmap f)) cl)
|
||||
(f p)
|
||||
l
|
||||
(fmap (fmap (fmap f)) cr)
|
||||
(fmap (fmap (fmap f)) fr)
|
||||
RightwardLDT u fl cl p l cr -> RightwardLDT (fmap f u)
|
||||
(fmap (fmap (fmap f)) fl)
|
||||
(fmap (fmap (fmap f)) cl)
|
||||
(f p)
|
||||
l
|
||||
(fmap (fmap (fmap f)) cr)
|
||||
--instance Functor (ContextLDT b) where
|
||||
-- fmap f = \case
|
||||
-- TopLDT -> TopLDT
|
||||
-- LeftwardLDT u cl p l cr fr -> LeftwardLDT
|
||||
-- (fmap f u)
|
||||
-- (fmap (fmap (fmap f)) cl)
|
||||
-- (f p)
|
||||
-- l
|
||||
-- (fmap (fmap (fmap f)) cr)
|
||||
-- (fmap (fmap (fmap f)) fr)
|
||||
-- RightwardLDT u fl cl p l cr -> RightwardLDT (fmap f u)
|
||||
-- (fmap (fmap (fmap f)) fl)
|
||||
-- (fmap (fmap (fmap f)) cl)
|
||||
-- (f p)
|
||||
-- l
|
||||
-- (fmap (fmap (fmap f)) cr)
|
||||
|
||||
instance Functor ContextDT where
|
||||
fmap f = \case
|
||||
|
||||
Reference in New Issue
Block a user