Looks like I can't enable code optimization for haskell katas through GHC_OPTIONS pragma.
I am aware that compler is being run with --interactive flag and that spoils the fun.
i.e. this kata https://www.codewars.com/kata/simple-assembler-interpreter/train/haskell/5cd9979da695ae0015f9106a has a pretty heavy test for final submission, which takes 0.5 seconds if Haskell is compiled and over 2 hours if not.
I assume there is a way to turn on optimization for such katas, or this is a bug, that blocks Haskell users.
To Reproduce
Using
{-# OPTIONS_GHC -O -fobject-code #-} leads to a ghc panic (this is a ghc bug due to interactive mode is on for ghc).
Using
{-# OPTIONS_GHC -O #-} leads to a message that optimization is skipped for interactive mode
Expected Behavior
I should be able to enable compiler optimization in order to pass relatively heavy tests.
Describe the bug
Looks like I can't enable code optimization for haskell katas through GHC_OPTIONS pragma. I am aware that compler is being run with --interactive flag and that spoils the fun. i.e. this kata https://www.codewars.com/kata/simple-assembler-interpreter/train/haskell/5cd9979da695ae0015f9106a has a pretty heavy test for final submission, which takes 0.5 seconds if Haskell is compiled and over 2 hours if not.
I assume there is a way to turn on optimization for such katas, or this is a bug, that blocks Haskell users.
To Reproduce
Using {-# OPTIONS_GHC -O -fobject-code #-} leads to a ghc panic (this is a ghc bug due to interactive mode is on for ghc). Using {-# OPTIONS_GHC -O #-} leads to a message that optimization is skipped for interactive mode
Expected Behavior
I should be able to enable compiler optimization in order to pass relatively heavy tests.