 :: Parser a -> Parser b -> Parser (Tree a b)
treeP p1 p2 = Leaf <$> p2 <|> (angles $ Node <$> (treeP p1 p2) <*> (braces p1) <*> (treeP p1 p2))

main = fmap (const ()) 
treeP :: Parser a -> Parser b -> Parser (Tree a b)
treeP p1 p2 = Leaf <$> p2 <|> (angles $ Node <$> (treeP p1 p2) <*> (braces p1) <*> (treeP p1 p2))
treeP p1 p2 = Leaf <$> p2 <|> (angles $ Node <$> (treeP p1 p2) <*> (braces p1) <*> (treeP p1 p2))