Strictness without ordering, or confusion

From HaskellWiki
Revision as of 05:06, 23 August 2020 by Atravers (talk | contribs) (Added pertinent mail thread reference)

Jump to: navigation, search

As the Haskell 2010 Report does not specify any order of evaluation with respect to its parameters, the name of the primitive seq :: a -> b -> b is a misnomer.

Introduce the primitive amid, with the same (Haskell 2010 Report) requirements:

         infixr 0 `amid`
         primtive amid :: a -> b -> b

         infixr 0 $!
         ($!) :: (a -> b) -> a -> b
         f $! x =  x `amid` f x

This frees the name "seq" for use with a new primitive, analogous to the GHC primitive pseq, but not restricted to parallel programming.

If needed, "amidst" is one alternate basename for the deepseq library and its definitions.


Atravers 01:17, 7 January 2019 (UTC)