@@ -16,10 +16,19 @@
1616-- One major advantage of strict data structures as accumulators in folds and
1717-- scans is that it helps the compiler optimize the code much better by
1818-- unboxing. In a big tight loop the difference could be huge.
19+
20+-- Notes: The purpose of the strict Maybe type is to force storing an evaluated
21+-- value instead of a lazy thunk. To enforce that we use a strict Maybe type in
22+-- a data structure. If we need to operate on such strict values, the simplest
23+-- way to do that is to convert it to a lazy type and operate on that.
24+-- Therefore, we do not provide any other operations other than ways to
25+-- construct a strict type and convert it to a lazy type.
1926--
2027module Streamly.Internal.Data.Maybe.Strict
2128 ( Maybe' (..)
29+ -- XXX rename to lazyMaybe, also supply a strictMaybe function.
2230 , toMaybe
31+ -- XXX Remove these, use isJust . toMaybe etc instead.
2332 , isJust'
2433 , fromJust'
2534 )