test8 represents foldr1 f === foldl1 f where f :: Peano -> Peano -> Peano.
In GHCi, the example fails to terminate at depth 2. Compiled with GHC, it just aborts with success to stdio.
Think that it may be something to do with the construction of Peano tries as I can get it to work by making type Base Peano = Either () ((), BaseThunk Peano) rather than type Base Peano = Either () (BaseThunk Peano).
test8
representsfoldr1 f === foldl1 f
wheref :: Peano -> Peano -> Peano
.In GHCi, the example fails to terminate at depth 2. Compiled with GHC, it just aborts with success to stdio.
Think that it may be something to do with the construction of
Peano
tries as I can get it to work by makingtype Base Peano = Either () ((), BaseThunk Peano)
rather thantype Base Peano = Either () (BaseThunk Peano)
.