Skip to content

Strategic function application operators don't quite match their documentation #43

Closed
@treeowl

Description

@treeowl

These operators all perform evaluation to WHNF, whether or not the strategies do so. I don't have a strong opinion about whether the behavior or the documentation should change, but the current situation is strange. Example:

-- | Sequential function application. The argument is evaluated using
--   the given strategy before it is given to the function.
($|) :: (a -> b) -> Strategy a -> a -> b
f $| s  = \ x -> let z = x `using` s in z `pseq` f z

Based on the documentation, I'd have expected something more like

f $| s = \ x -> runEval (f <$> s x)

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions