In its current implementation, subViews ignores viewContext, so that repeated calls to subViews only ever retrieve the children of the top level of a view. Consequently, it doesn't play nicely with subView. For example, consider
data Bar = Bar Foo Foo
data Foo = Foo Int Int
barForm :: Monad m => Form Text m Bar
barForm = Bar <$> "foo1" .: fooForm <*> "foo2" .: fooForm
fooForm :: Monad m => Form Text m Foo
fooForm = Foo <$> "int1" .: intForm <*> "int2" .: intForm
intForm :: Monad m => Form Text m Int
intForm = stringRead "Not a number" (Just 0)
I would like to be able to call subViews (subView "foo1" view) and obtain views with contexts ["foo1", "int1"] and ["foo1", "int2"]. However, instead I get:
In its current implementation, subViews ignores viewContext, so that repeated calls to subViews only ever retrieve the children of the top level of a view. Consequently, it doesn't play nicely with subView. For example, consider
I would like to be able to call subViews (subView "foo1" view) and obtain views with contexts ["foo1", "int1"] and ["foo1", "int2"]. However, instead I get:
These contexts are now incorrect, and give errors when I try to do things with them. Is this the desired behavior for subViews?