-- ILists: lists whose cdr fields are IVars, filled in asynchronously-- via Par computation.-- This module mostly exists as a datatype to use in building other,-- higher-level abstractions. (See OpenList and Stream.)moduleControl.Monad.Par.IList(IList(..))whereimportControl.Monad.ParimportControl.DeepSeq-- | An 'IList' is the equivalent of a lazy list in the 'Par' monad.-- The tail of the list is an 'IVar', which allows the list to be-- produced and consumed in parallel.dataILista=Null|Cons{hd::a,tl::IVar(ILista)}-- | To fully evaluate an 'IList' means to evaluate both the head-- and tail. This does not evaluate the entire spine of the list-- of course, because the tail is an 'IVar'.instanceNFDataa=>NFData(ILista)where-- rnf Null = r0rnfNull=()rnf(Consab)=rnfa`seq`rnfb