Skip to main content
added 12 characters in body
Source Link
dfeuer
  • 1.2k
  • 13
  • 15

Strict, 6452 bytes

import SystemGHC.IO.Unsafe
f _=p
main=f$unsafePerformIO$p_=print()
p=print 3main=f$unsafePerformIO$f()

-XStrict-XStrict

-XNoStrict-XNoStrict

With -XStrict, prints 3() an extra time.

Thanks to @Sriotchilism O'Zaic for two bytes.

Strict, 64 bytes

import System.IO.Unsafe
f _=p
main=f$unsafePerformIO$p
p=print 3

-XStrict

-XNoStrict

With -XStrict, prints 3 an extra time.

Strict, 52 bytes

import GHC.IO
f _=print()
main=f$unsafePerformIO$f()

-XStrict

-XNoStrict

With -XStrict, prints () an extra time.

Thanks to @Sriotchilism O'Zaic for two bytes.

Source Link
dfeuer
  • 1.2k
  • 13
  • 15

Strict, 64 bytes

import System.IO.Unsafe
f _=p
main=f$unsafePerformIO$p
p=print 3

-XStrict

-XNoStrict

With -XStrict, prints 3 an extra time.