From anthony.d.clayden at gmail.com Tue Sep 21 12:33:02 2021 From: anthony.d.clayden at gmail.com (Anthony Clayden) Date: Wed, 22 Sep 2021 00:33:02 +1200 Subject: Options | Runtime | Use Show instance for results -- turned off is surprisingly unreliable Message-ID: I usually have 'Use Show instance' switched off (aka use 'built-in printer'), so I can see (at least in crude form) imported or 'system' datatypes that don't have show instances/also it's a bit more revealing if I get exceptions. I have a datatype: > data Tree a = Empty > | Leaf a > | Node (Tree a) a (Tree a) > deriving (Eq, Show, Read) For results of expressions that were `Node`s, the built-in printer just ignored the first field. (`show`/print of those values works fine.) > FoldableTree> myTree <> fdmap toUpper myTree > Node 'c' Empty > FoldableTree> print $ myTree <> fdmap toUpper myTree > Node (Node Empty 'A' (Node Empty 'C' (Leaf 'a'))) 'c' Empty Most disconcerting until I realised what was going on. (Of course I don't expect the built-in printer to produce pretty output). AntC -------------- next part -------------- An HTML attachment was scrubbed... URL: