On Sun, Apr 26, 2015 at 3:23 PM, martin <martin.drautzburg@web.de> wrote:
At least things work now as expected. But could you please elaborate on the difference between

tAppend (Temporal as) (Temporal bs) = Temporal (as ++ bs)

vs

tAppend as bs = Temporal $ (toList as) ++ (toList bs)
toList (Temporal xs) = xs

Why is the first one more strict  than the second?

Because the first one pattern matches both parameters immediately to ensure that the constructor is the one named (Temporal). The second defers it, since the toList call is not forced and therefore won't be invoked (along with its strict pattern match) until its value is needed.

--
brandon s allbery kf8nh                               sine nomine associates
allbery.b@gmail.com                                  ballbery@sinenomine.net
unix, openafs, kerberos, infrastructure, xmonad        http://sinenomine.net