where plotTree, mapLeaf, and setLeafName have the following signatures:
plotTree :: Filename -> RootedTree n Real Str -> ()
setLeafName :: (JsonObj, Sequence) -> Str
mapLeaf :: (l -> l') -> RootedTree n e l -> RootedTree n e l'
In the top-level signature definition for plotCladeTree, there are two generic types, e and a. However, these types will be inferred to be Real and (JsonObj, Sequence), respectively.
This code does not raise an error, but it probably should. e and a are not really free here, they are constrained to specific types. In Haskell, this code would raise "rigid type value" errors. That is, the general type requested for each variable violates contextual constraints placed on the variables.
In the flu case study of commit d6c2aba3d3e, in the function definition:
where plotTree, mapLeaf, and setLeafName have the following signatures:
In the top-level signature definition for
plotCladeTree
, there are two generic types,e
anda
. However, these types will be inferred to beReal
and(JsonObj, Sequence)
, respectively.This code does not raise an error, but it probably should.
e
anda
are not really free here, they are constrained to specific types. In Haskell, this code would raise "rigid type value" errors. That is, the general type requested for each variable violates contextual constraints placed on the variables.