-- Hoogle documentation, generated by Haddock
-- See Hoogle, http://www.haskell.org/hoogle/


-- | Newick file format parser.
--   
--   This is a simple parser for Newick trees. The parser returns a rose
--   tree. Each node is labelled with the node name (or an empty string for
--   anonymous nodes) and a distance (0 if not given).
--   
--   Includes conversion to an efficient static forest.
@package BiobaseNewick
@version 0.0.0.2

module Biobase.Newick.Types

-- | Node and leaf information in Newick trees.
data Info
Info :: Text -> Double -> Info
[label] :: Info -> Text
[distance] :: Info -> Double

-- | Newick tree newtype wrapper.
newtype NewickTree
NewickTree :: Tree Info -> NewickTree
[getNewickTree] :: NewickTree -> Tree Info
arbNewickTree :: Int -> Gen (Tree Info)
instance GHC.Generics.Generic Biobase.Newick.Types.NewickTree
instance GHC.Show.Show Biobase.Newick.Types.NewickTree
instance GHC.Classes.Eq Biobase.Newick.Types.NewickTree
instance GHC.Generics.Generic Biobase.Newick.Types.Info
instance GHC.Show.Show Biobase.Newick.Types.Info
instance GHC.Classes.Eq Biobase.Newick.Types.Info
instance Data.Binary.Class.Binary Biobase.Newick.Types.NewickTree
instance Data.Serialize.Serialize Biobase.Newick.Types.NewickTree
instance Data.Aeson.Types.FromJSON.FromJSON Biobase.Newick.Types.NewickTree
instance Data.Aeson.Types.ToJSON.ToJSON Biobase.Newick.Types.NewickTree
instance Test.QuickCheck.Arbitrary.Arbitrary Biobase.Newick.Types.NewickTree
instance Data.Binary.Class.Binary Biobase.Newick.Types.Info
instance Data.Serialize.Serialize Biobase.Newick.Types.Info
instance Data.Aeson.Types.FromJSON.FromJSON Biobase.Newick.Types.Info
instance Data.Aeson.Types.ToJSON.ToJSON Biobase.Newick.Types.Info
instance Test.QuickCheck.Arbitrary.Arbitrary Biobase.Newick.Types.Info


-- | NOTE We need to make sure to be compatible to everything here:
--   <tt><a>http://evolution.genetics.washington.edu/phylip/newicktree.html</a></tt>
--   In particular, we do not do any conversion from <tt>_</tt> to
--   <tt>(space)</tt> right now.
module Biobase.Newick.Import
type PNT = Parser (Tree Info)
newicksFromFile :: FilePath -> IO (Either String [NewickTree])
newicksFromText :: Text -> Either String [NewickTree]
manyNewick :: Parser Text [NewickTree]
newick :: Parser NewickTree
tree :: PNT
branched :: PNT
leaf :: PNT
info :: Parser Info

-- | NOTE
--   <a>http://evolution.genetics.washington.edu/phylip/newicktree.html</a>
--   
--   A name can be any string of printable characters except blanks,
--   colons, semicolons, parentheses, and square brackets.
--   
--   I am excluding commas as well.
name :: Parser Text
plength :: Parser Double

module Biobase.Newick.StaticForest
test :: IO ()

module Biobase.Newick.Export

-- | Render a list of Newick trees to a newick string.
newicksToText :: [NewickTree] -> Text

-- | Via builder
toTextBuilder :: [NewickTree] -> Builder

module Biobase.Newick
