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'
Removal of the signature causes the following error to be raised the following error:
morloc: Bug in expressPolyExpr - this should be unreachable
Obviously this case is not unreachable. The type signature ought to be mostly inferrable. The sticky bit is the record FluConfig. All that can be inferred without that annotation is that some record with the field treefile :: Filename exists. Currently partially inferred types like this are not supported, so an error should be raised here. This is a user error. The problem is simply that a type annotation is required. The error message should indicate this.
In the flu case study of commit d6c2aba3d3e, in the function definition:
where plotTree, mapLeaf, and setLeafName have the following signatures:
Removal of the signature causes the following error to be raised the following error:
Obviously this case is not unreachable. The type signature ought to be mostly inferrable. The sticky bit is the record
FluConfig
. All that can be inferred without that annotation is that some record with the fieldtreefile :: Filename
exists. Currently partially inferred types like this are not supported, so an error should be raised here. This is a user error. The problem is simply that a type annotation is required. The error message should indicate this.