Safe Haskell | Safe-Inferred |
---|---|
Language | Haskell2010 |
Documentation
class (i ~ Index e els) => HGet els e i | els i -> e where Source
Heterogeneous read arbitrarily element from hset
>>>
let x = HSCons (10 :: Int) $ HSCons (20 :: Double) HSNil
>>>
x
HSCons (10) (HSCons (20.0) (HSNil))
>>>
hget x :: Int
10
>>>
hget x :: Double
20.0
Note that hget
takes specific element from list of uniquely typed
elements depending on what type is required to be returned (return
type polymorphism)