The fun.js example was not working
The fun.js example was not working

The fun.js examples was not working by the 2 following reasons:

1. Did not compile with the following error:

fun.hs:7:10:
    Couldn't match type ‘[Char]’ with ‘GHC.Ptr.Ptr Haste.Prim.JSChr’
    Expected type: Haste.Prim.JSString
      Actual type: [Char]
    In the first argument of ‘export’, namely ‘"fun"’
    In a stmt of a 'do' block: export "fun" fun
    In the expression: do { export "fun" fun }

2. Compiler failed when trying to include "fun.js" while generating fun.js (the compiler line generates fun.js from fun.hs) with the following error:
hastec: fun.js: openBinaryFile: resource busy (file is locked)

This fixes those two cases
akru/haste-compiler,szatkus/haste-compiler,santolucito/haste-compiler,joelburget/haste-compiler,crodjer/haste-compiler,akru/haste-compiler,akru/haste-compiler,akru/haste-compiler,kranich/haste-compiler,jtojnar/haste-compiler,crodjer/haste-compiler,joelburget/haste-compiler,szatkus/haste-compiler,nyson/haste-compiler,beni55/haste-compiler,beni55/haste-compiler,crodjer/haste-compiler,beni55/haste-compiler,szatkus/haste-compiler,nyson/haste-compiler,joelburget/haste-compiler,kranich/haste-compiler,beni55/haste-compiler,jtojnar/haste-compiler,szatkus/haste-compiler,nyson/haste-compiler,jtojnar/haste-compiler,kranich/haste-compiler,joelburget/haste-compiler,nyson/haste-compiler,santolucito/haste-compiler,santolucito/haste-compiler,santolucito/haste-compiler,kranich/haste-compiler,akru/haste-compiler,crodjer/haste-compiler,jtojnar/haste-compiler,crodjer/haste-compiler