soltech,

This video series is really great!

jaror,
jaror avatar

I think pseq does have that "thunk forcing" behavior:

import GHC.Conc (pseq)

val :: Int
val = let x = error "x"
          y = error "y"
      in y `pseq` (x + y)

main = print val

I believe this is guaranteed to show the y error and not the x error.

  • All
  • Subscribed
  • Moderated
  • Favorites
  • haskell
  • GTA5RPClips
  • DreamBathrooms
  • thenastyranch
  • magazineikmin
  • Durango
  • cubers
  • Youngstown
  • mdbf
  • slotface
  • rosin
  • ngwrru68w68
  • kavyap
  • tacticalgear
  • ethstaker
  • JUstTest
  • InstantRegret
  • Leos
  • normalnudes
  • everett
  • khanakhh
  • osvaldo12
  • cisconetworking
  • modclub
  • anitta
  • tester
  • megavids
  • provamag3
  • lostlight
  • All magazines