Saturday 15 March 2014

Haskell Syntax Error at seemingly random locations -


This code was working a few minutes early and after restarting my GST, it stopped working. Now I am getting random, there are errors on either where , snst or size . (Not sure what I changed to become the cause of each separate error)

What can someone tell me in my syntax? Example Array Tree where the new N X | N & lt; = 0 = Address | Odd n = node n nt x nt also n = node n (node ​​(n` div` 2) snst x snst) xsnsts nst = (new (n` div` 2) x) snst = (new (n` div`) 2 - 1) x) Size Leaf = 0 size (_ _ _) of node = s

Always make sure that no tab is hidden in these cases.

I checked that your method of indenting is where is valid. So unless there is no error before the example announcement, I can not see any syntax errors.

In addition, an idea of ​​eliminating sources of errors is new .

  myNew :: ... myNew nx | N & lt; = 0 = Address | Odd n = node n nt x nt also n = node n (node ​​(n` div` 2) snst x snst) x snst where nst = (new (n` div` 2) x) snst = (new (n` div) `2 - 1) x) Example Array Tree where new = My new shape address = 0 size (_ _ _) of node   

Try it and see if it is compiled

No comments:

Post a Comment