summaryrefslogtreecommitdiff
path: root/testsuite/tests/ghci.debugger/scripts/print006.script
blob: 782dee6102b6e66842ac786fb636ac4c550b36fb (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
-- Recovery of types, opaque types
-- This scenario demands propagation of types up in the tree of terms

:set -XExistentialQuantification -XDeriveDataTypeable -XGeneralizedNewtypeDeriving
:l Test 
let t = O (map Just [[1,1],[2,2]])
:p t
seq _t1 ()  -- The contents of the opaque
:p t
seq _t3 ()  -- The tail of the list
:p t
seq _t5 ()  -- The 2nd element of the list
:p t
seq _t7 () -- The 1st element of the outer list

:p t       
 -- The 1st Just must be completely typed, as we know the type of the list