| length dups > 0 = Left ["Duplicate functions: ":[toString n\\[(Function n _ _):_]<-dups]]
= case partition (\a->a=:(Function ['start'] _ _)) fs of
([], _) = Left ["No start function defined"]
- ([Function _ [] e:_], fs) = (\x->(e, x)) <$> runInfer (infer (fromList builtin) $ makeExpression fs e)
+ ([Function _ [] e:_], fs)
+ # e = makeExpression fs e
+ = (\x->(e, x)) <$> runInfer (infer (fromList builtin) e)
([Function _ _ _:_], _) = Left ["Start cannot have arguments"]
makeExpression :: [Function] Expression -> Expression