haskell / deepseq

Deep evaluation of data structures
http://hackage.haskell.org/package/deepseq
Other
40 stars 29 forks source link

Set infixr of 'deepseq' to be consistent with 'seq' #56

Closed martijnbastiaan closed 4 years ago

martijnbastiaan commented 4 years ago

Without this patch the following code:

a `deepseq` a : as

gets parsed as

(a `deepseq` a) : as

instead of

a `deepseq` (a : as)

Note that seq already behaves like this.


We had similar problems over at clash-lang/clash-compiler for our Clash-specific version of deepseq causing pretty bad memory leaks.

chessai commented 4 years ago

So, morally this seems like the right thing to do, but I want to make sure there are no unintended consequences. Can't think of any off the top of my head. CC @haskell/core-libraries-committee

emilypi commented 4 years ago

yeah, this is pretty unoffensive to me.

chessai commented 4 years ago

@martijnbastiaan this needs a changelog entry before merging

martijnbastiaan commented 4 years ago

@chessai Sorry for the delay, done!