5 lookup1, lookup2, lookup3, tree1,
11 import Spec ( Tree(..), lookup)
13 data UseTree a = UseTree (Tree Char# a)
15 -- this data declaration does not in itself require specialisations of Tree
16 -- these will only be required by code which constructs the values placed
17 -- inside a use of this data declaration
19 {- These should be ok -}
21 lookup1 = case (lookup eqInt# ltInt# 1# 1# (Leaf 1# 1#)) of i# -> I# i#
23 tree1 = UseTree (Leaf (case 'k' of C# k# -> k#) 1#)
25 lookup2 = case (lookup eqInt# ltInt# 1# 1.0# (Leaf 1# 1.0#)) of f# -> F# f#
27 lookup3 = case (lookup (==) (<) 1 1.0# (Leaf 1 1.0#)) of f# -> F# f#