How are following expressions different in their intent? I'm surprised that they actually type check and produce different results in example below.
(./) ::
Plated a =>
Traversal s t a a -> Traversal a a u v -> Traversal s t u v
-- Defined in âText.XML.Lensâ
infixr 9 ./
and
(.) :: (b -> c) -> (a -> b) -> a -> c -- Defined in âGHC.Baseâ
infixr 9 .
And how they work with typical pom.xml file:
*Main> x ^.. root ./ ell "version" . text
["1.0-SNAPSHOT"]
*Main> x ^.. root ./ ell "version" ./ text
[]
where
text ::
Control.Applicative.Applicative f =>
(Data.Text.Internal.Text -> f Data.Text.Internal.Text)
-> Element -> f Element
-- Defined in âText.XML.Lensâ
and
data Element
= Element {elementName :: Name,
elementAttributes :: containers-0.5.5.1:Data.Map.Base.Map
Name Data.Text.Internal.Text,
elementNodes :: [Node]}
-- Defined in âText.XMLâ
instance Plated Element -- Defined in âText.XML.Lensâ