ekmett / zippers

Zippers based on lenses and traversals
Other
38 stars 14 forks source link

traversal of Data.Sequence.Seq causes "Exception: jacketOuts: wrong shape" #10

Closed Heimdell closed 8 years ago

Heimdell commented 9 years ago

Here is the test code: two files differ only in lines 51 & 87.

https://gist.github.com/Heimdell/74033a9c886554a13154

When compiled, the list variant produces:

(Compose (Annotated {_annotation = (), _object = File_ {_file = NamedTree {_name = 
"test", _tree = [Annotated {_annotation = (), _object = "qwert"},Annotated {_annotation = 
(), _object = "HACKED"},Annotated {_annotation = (), _object = "zzvxcv"}]}}}))

and the sequence one produces:

(Compose (Annotated {_annotation = (), _object = File_ {_file = NamedTree {_name = 
"test", _tree = fromList [*** Exception: jacketOuts: wrong shape

Am I doing something wrong or what? I know that there is a fingertree beneath the Seq, but its clearly not the one producing the message, the Control.Lens.Internal.Zipper.jacketOuts does the thing.

P.S.: I use the last version of zippers from cabal - 0.2.

ekmett commented 8 years ago

Fix merged