2

我正在尝试将一个小的前端应用程序与 . 放在一起haste,但我在 Firefox 上遇到了错误。这是错误的最小示例:

我的哈斯克尔:

module Main where

import Haste

main :: IO ()
main = writeLog "Testing..."

我的 HTML:

<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
  <head>
    <script type="text/javascript" src="Experimentascript.js"></script>
  </head>
  <body>
  </body>
</html>

我的编译输出:

~/projects/experimentalisp $ hastec Experimentascript.hs
Compiling Main into .
Linking Experimentascript.js
Linking Main
Linking GHC.Tuple
Linking GHC.TopHandler
Linking GHC.IO.Exception
Linking GHC.Types
Linking GHC.Exception
Linking Data.Typeable
Linking Data.Maybe
Linking Haste.Handle
Linking GHC.IO
Linking GHC.Conc.Sync
Linking GHC.Foreign
Linking Foreign.Storable
Linking GHC.Storable
Linking GHC.IO.Buffer
Linking GHC.ForeignPtr
Linking GHC.IO.Encoding.Types
Linking Foreign.Marshal.Array
Linking GHC.List
Linking GHC.Err
Linking GHC.IO.Encoding
Linking GHC.IO.Encoding.Failure
Linking GHC.Base
Linking GHC.Unicode
Linking GHC.Char
Linking GHC.Show
Linking GHC.IO.Encoding.Iconv
Linking Foreign.C.Error
Linking GHC.IO.Handle.Types
Linking Foreign.C.Types
Linking GHC.Int
Linking GHC.Integer.Type
Linking GHC.Classes
Linking GHC.Num
Linking Foreign.C.String
Linking GHC.IO.Encoding.UTF16
Linking GHC.IO.Encoding.UTF32
Linking GHC.IO.Encoding.UTF8
Linking Data.Typeable.Internal
Linking GHC.Fingerprint
Linking GHC.Conc.Signal
Linking Control.Exception.Base
~/projects/experimentalisp $

加载页面时我的 Firefox 控制台:

22:28:21.635 file:///home/inaimathi/projects/experimentalisp/Experimentascript.js
22:28:18.976 The character encoding of the HTML document was not declared. The document will render with garbled text in some browser configurations if the document contains characters from outside the US-ASCII range. The character encoding of the page must be declared in the document or in the transfer protocol. Experimentascript.html
22:28:21.568 too much recursion Experimentascript.js:278
22:28:21.283 "" Experimentascript.js:2111
22:28:21.283 "" Experimentascript.js:2120
22:28:21.286 "" Experimentascript.js:2111
22:28:21.286 "" Experimentascript.js:2120
22:28:21.288 "" Experimentascript.js:2111
22:28:21.289 "" Experimentascript.js:2120
22:28:21.291 "" Experimentascript.js:2111
22:28:21.291 "" Experimentascript.js:2120
22:28:21.293 "" Experimentascript.js:2111
22:28:21.294 "" Experimentascript.js:2120
22:28:21.296 "" Experimentascript.js:2111
22:28:21.296 "" Experimentascript.js:2120
22:28:21.299 "" Experimentascript.js:2111
22:28:21.299 "" Experimentascript.js:2120
22:28:21.301 "" Experimentascript.js:2111
22:28:21.301 "" Experimentascript.js:2120
22:28:21.304 "" Experimentascript.js:2111
22:28:21.304 "" Experimentascript.js:2120
22:28:21.306 "" Experimentascript.js:2111
22:28:21.306 "" Experimentascript.js:2120
22:28:21.309 "" Experimentascript.js:2111
22:28:21.309 "" Experimentascript.js:2120
22:28:21.311 "" Experimentascript.js:2111
22:28:21.311 "" Experimentascript.js:2120
22:28:21.314 "" Experimentascript.js:2111
22:28:21.314 "" Experimentascript.js:2120
22:28:21.316 "" Experimentascript.js:2111
22:28:21.317 "" Experimentascript.js:2120
22:28:21.320 "" Experimentascript.js:2111
22:28:21.320 "" Experimentascript.js:2120
22:28:21.322 "" Experimentascript.js:2111
22:28:21.322 "" Experimentascript.js:2120
22:28:21.325 "" Experimentascript.js:2111
22:28:21.325 "" Experimentascript.js:2120
22:28:21.327 "" Experimentascript.js:2111
22:28:21.327 "" Experimentascript.js:2120
22:28:21.330 "" Experimentascript.js:2111
22:28:21.330 "" Experimentascript.js:2120
22:28:21.332 "" Experimentascript.js:2111
22:28:21.333 "" Experimentascript.js:2120
22:28:21.335 "" Experimentascript.js:2111
22:28:21.335 "" Experimentascript.js:2120
22:28:21.338 "" Experimentascript.js:2111
22:28:21.338 "" Experimentascript.js:2120
22:28:21.340 "" Experimentascript.js:2111
22:28:21.340 "" Experimentascript.js:2120
22:28:21.343 "" Experimentascript.js:2111
22:28:21.343 "" Experimentascript.js:2120
22:28:21.346 "" Experimentascript.js:2111
22:28:21.346 "" Experimentascript.js:2120
22:28:21.348 "" Experimentascript.js:2111
22:28:21.348 "" Experimentascript.js:2120
22:28:21.351 "" Experimentascript.js:2111
22:28:21.351 "" Experimentascript.js:2120
22:28:21.353 "" Experimentascript.js:2111
22:28:21.354 "" Experimentascript.js:2120
22:28:21.356 "" Experimentascript.js:2111
22:28:21.356 "" Experimentascript.js:2120
22:28:21.359 "" Experimentascript.js:2111
22:28:21.359 "" Experimentascript.js:2120
22:28:21.361 "" Experimentascript.js:2111
22:28:21.361 "" Experimentascript.js:2120
22:28:21.364 "" Experimentascript.js:2111
22:28:21.364 "" Experimentascript.js:2120
22:28:21.367 "" Experimentascript.js:2111
22:28:21.367 "" Experimentascript.js:2120
22:28:21.369 "" Experimentascript.js:2111
22:28:21.369 "" Experimentascript.js:2120
22:28:21.372 "" Experimentascript.js:2111
22:28:21.372 "" Experimentascript.js:2120
22:28:21.374 "" Experimentascript.js:2111
22:28:21.375 "" Experimentascript.js:2120
22:28:21.377 "" Experimentascript.js:2111
22:28:21.377 "" Experimentascript.js:2120
22:28:21.380 "" Experimentascript.js:2111
22:28:21.380 "" Experimentascript.js:2120
22:28:21.382 "" Experimentascript.js:2111
22:28:21.382 "" Experimentascript.js:2120
22:28:21.385 "" Experimentascript.js:2111
22:28:21.385 "" Experimentascript.js:2120
22:28:21.388 "" Experimentascript.js:2111
22:28:21.388 "" Experimentascript.js:2120
22:28:21.390 "" Experimentascript.js:2111
22:28:21.390 "" Experimentascript.js:2120
22:28:21.393 "" Experimentascript.js:2111
22:28:21.393 "" Experimentascript.js:2120
22:28:21.395 "" Experimentascript.js:2111
22:28:21.396 "" Experimentascript.js:2120
22:28:21.398 "" Experimentascript.js:2111
22:28:21.398 "" Experimentascript.js:2120
22:28:21.401 "" Experimentascript.js:2111
22:28:21.401 "" Experimentascript.js:2120
22:28:21.403 "" Experimentascript.js:2111
22:28:21.404 "" Experimentascript.js:2120
22:28:21.406 "" Experimentascript.js:2111
22:28:21.406 "" Experimentascript.js:2120
22:28:21.409 "" Experimentascript.js:2111
22:28:21.409 "" Experimentascript.js:2120
22:28:21.411 "" Experimentascript.js:2111
22:28:21.411 "" Experimentascript.js:2120
22:28:21.414 "" Experimentascript.js:2111
22:28:21.414 "" Experimentascript.js:2120
22:28:21.417 "" Experimentascript.js:2111
22:28:21.417 "" Experimentascript.js:2120
22:28:21.419 "" Experimentascript.js:2111
22:28:21.419 "" Experimentascript.js:2120
22:28:21.422 "" Experimentascript.js:2111
22:28:21.422 "" Experimentascript.js:2120
22:28:21.425 "" Experimentascript.js:2111
22:28:21.425 "" Experimentascript.js:2120
22:28:21.427 "" Experimentascript.js:2111
22:28:21.427 "" Experimentascript.js:2120
22:28:21.430 "" Experimentascript.js:2111
22:28:21.430 "" Experimentascript.js:2120
22:28:21.433 "" Experimentascript.js:2111
22:28:21.433 "" Experimentascript.js:2120
22:28:21.435 "" Experimentascript.js:2111
22:28:21.435 "" Experimentascript.js:2120
22:28:21.438 "" Experimentascript.js:2111
22:28:21.438 "" Experimentascript.js:2120
22:28:21.441 "" Experimentascript.js:2111
22:28:21.441 "" Experimentascript.js:2120
22:28:21.443 "" Experimentascript.js:2111
22:28:21.443 "" Experimentascript.js:2120
22:28:21.446 "" Experimentascript.js:2111
22:28:21.446 "" Experimentascript.js:2120
22:28:21.449 "" Experimentascript.js:2111
22:28:21.449 "" Experimentascript.js:2120
22:28:21.451 "" Experimentascript.js:2111
22:28:21.451 "" Experimentascript.js:2120
22:28:21.454 "" Experimentascript.js:2111
22:28:21.454 "" Experimentascript.js:2120
22:28:21.457 "" Experimentascript.js:2111
22:28:21.457 "" Experimentascript.js:2120
22:28:21.459 "" Experimentascript.js:2111
22:28:21.460 "" Experimentascript.js:2120
22:28:21.462 "" Experimentascript.js:2111
22:28:21.462 "" Experimentascript.js:2120
22:28:21.465 "" Experimentascript.js:2111
22:28:21.465 "" Experimentascript.js:2120
22:28:21.468 "" Experimentascript.js:2111
22:28:21.468 "" Experimentascript.js:2120
22:28:21.470 "" Experimentascript.js:2111
22:28:21.470 "" Experimentascript.js:2120
22:28:21.473 "" Experimentascript.js:2111
22:28:21.473 "" Experimentascript.js:2120
22:28:21.476 "" Experimentascript.js:2111
22:28:21.476 "" Experimentascript.js:2120
22:28:21.478 "" Experimentascript.js:2111
22:28:21.478 "" Experimentascript.js:2120
22:28:21.481 "" Experimentascript.js:2111
22:28:21.481 "" Experimentascript.js:2120
22:28:21.484 "" Experimentascript.js:2111
22:28:21.484 "" Experimentascript.js:2120
22:28:21.486 "" Experimentascript.js:2111
22:28:21.487 "" Experimentascript.js:2120
22:28:21.489 "" Experimentascript.js:2111
22:28:21.489 "" Experimentascript.js:2120
22:28:21.492 "" Experimentascript.js:2111
22:28:21.492 "" Experimentascript.js:2120
22:28:21.495 "" Experimentascript.js:2111
22:28:21.495 "" Experimentascript.js:2120
22:28:21.497 "" Experimentascript.js:2111
22:28:21.497 "" Experimentascript.js:2120
22:28:21.500 "" Experimentascript.js:2111
22:28:21.500 "" Experimentascript.js:2120
22:28:21.503 "" Experimentascript.js:2111
22:28:21.503 "" Experimentascript.js:2120
22:28:21.505 "" Experimentascript.js:2111
22:28:21.506 "" Experimentascript.js:2120
22:28:21.508 "" Experimentascript.js:2111
22:28:21.508 "" Experimentascript.js:2120
22:28:21.511 "" Experimentascript.js:2111
22:28:21.511 "" Experimentascript.js:2120
22:28:21.514 "" Experimentascript.js:2111
22:28:21.514 "" Experimentascript.js:2120
22:28:21.516 "" Experimentascript.js:2111
22:28:21.517 "" Experimentascript.js:2120
22:28:21.519 "" Experimentascript.js:2111
22:28:21.519 "" Experimentascript.js:2120
22:28:21.522 "" Experimentascript.js:2111
22:28:21.522 "" Experimentascript.js:2120
22:28:21.525 "" Experimentascript.js:2111
22:28:21.525 "" Experimentascript.js:2120
22:28:21.527 "" Experimentascript.js:2111
22:28:21.527 "" Experimentascript.js:2120
22:28:21.530 "" Experimentascript.js:2111
22:28:21.530 "" Experimentascript.js:2120
22:28:21.533 "" Experimentascript.js:2111
22:28:21.533 "" Experimentascript.js:2120
22:28:21.536 "" Experimentascript.js:2111
22:28:21.536 "" Experimentascript.js:2120
22:28:21.538 "" Experimentascript.js:2111
22:28:21.539 "" Experimentascript.js:2120
22:28:21.541 "" Experimentascript.js:2111
22:28:21.541 "" Experimentascript.js:2120
22:28:21.544 "" Experimentascript.js:2111
22:28:21.544 "" Experimentascript.js:2120
22:28:21.547 "" Experimentascript.js:2111
22:28:21.547 "" Experimentascript.js:2120

我究竟做错了什么?

4

1 回答 1

2

看起来这只是haste-compiler我正在运行的版本的问题。为了解决它,我不得不运行

cabal update
cabal install haste-compiler
haste-boot

以该顺序。我现在正在运行hastecversion 0.4.3,不再出现递归错误。我还必须重新安装某些仓促库

haste-inst install <library-name>
于 2014-12-10T17:20:37.080 回答