@mkdir .shake 2> nul
@ghc --make -Wall src/Main.hs -isrc -rtsopts -with-rtsopts=-I0 -outputdir=.shake -o .shake/build && .shake\build --lint --directory ".." %*

@mkdir .shake 2> nul

@set ghcArgs=--make            ^
             -Wall             ^
             src/Main.hs       ^
             -isrc             ^
             -rtsopts          ^
             -with-rtsopts=-I0 ^
             -outputdir=.shake ^
             -j                ^
             -O                ^
             -o .shake/build

@set shakeArgs=--lint      ^
               --directory ^
               ".."        ^
               %*

@ghc %ghcArgs% && .shake\build %shakeArgs%

Split the batch file into multiple lines, add missing flags (-j -O).
Split the batch file into multiple lines, add missing flags (-j -O).
