If you initialize your tree store like that (just passing an empty list), Haskell won't know its exact type and will say that the type of the store is "TreeStore (GHC.Prim.Any *)", which isn't what you want.
TreeStores are more complicated than ListStores because they must not only contain the data, but also its hierarchy (parent and children nodes).
See the definition of treeStoreNew:
treeStoreNew :: Forest a -> IO (TreeStore a)
TreeStores hold a "Forest" of type "a" (Integers, Strings, etc.). The Forest type is defined in the module Data.Tree, so you'll have to import this module:
import Data.Tree
A Forest is just a list of "Tree a", that means a data type "Tree" holding values of type "a".
That said, in order to set up your tree store properly, you must do the following if you want to store strings:
let id :: [Tree String]
id = []
store <- treeStoreNew id
If you look at your store's type (at the GHCi prompt), you'll see it's correct:
:t store
store :: TreeStore String
To insert a row at "[]" (the top level, without a parent), appending it to the end if there are already some rows at the top level (that's the meaning of (-1)), for example the string "John":
treeStoreInsert store [] (-1) "John"
The row will be inserted at path [0]. Check it at GHCi with:
treeStoreGetTree store [0] >>= print
Which will give "Node {rootLabel = "John", subForest = []}".
To insert a child of "John", for example "Smith":
treeStoreInsert store [0] (-1) "Smith"
The tree will now contain a parent item and a child (check with GHCi):
treeStoreGetTree store [0] >>= print
Will output now "Node {rootLabel = "John", subForest = [Node {rootLabel = "Smith", subForest = []}]}".
Finally,
treeStoreGetTree store [0,0] >>= print
Will show the child only: Node {rootLabel = "Smith", subForest = []}
See the documentation to learn more about the topic.