
Hi Martin, Ghci defaults the type of 'getHole t1' to 'Maybe ()'. You can see this happening if you enable warnings in ghci with ':set -Wall'. Providing the correct type signature gives you the answer you're expecting: *Main> getHole t1 :: Maybe [Int] Just [1,2,3] Cheers, Martijn On 10 juli 2016 at 11:55:48, martin (martin.drautzburg@web.de) wrote: Hello all, I do not understand why this simple piece of code returns Nothing instead of [1,2,3]. Can anybody help? {-# LANGUAGE BangPatterns,NoMonomorphismRestriction, DeriveDataTypeable #-} import Data.Typeable import Data.Data import Data.Generics.Zipper ex_list1 :: [Int] ex_list1 = [1,2,3] t1 = toZipper ex_list1 -- *Main> getHole t1 -- Nothing _______________________________________________ Haskell-Cafe mailing list To (un)subscribe, modify options or view archives go to: http://mail.haskell.org/cgi-bin/mailman/listinfo/haskell-cafe Only members subscribed via the mailman list are allowed to post.