小编fly*_*ato的帖子

加载模块的功能不在范围内

我写了两个模块.第一个被称为DhtTypes:

module DhtTypes (Bencode, encode, TransactionID, Hash20Bytes) where

-- import stuff

class Bencode a where
    encode :: a -> ByteString.ByteString

data TransactionID = TransactionID Int.Int16
data Hash20Bytes = Hash20Bytes [Word.Word8]

-- stuff
Run Code Online (Sandbox Code Playgroud)

第二个是MessageTypes:

module MessageTypes () where

-- import stuff

import DhtTypes

data PingR = PingR TransactionID Hash20Bytes

-- stuff
Run Code Online (Sandbox Code Playgroud)

这是我加载MessageTypesGHCi 时发生的事情:

GHCi, version 7.6.3: http://www.haskell.org/ghc/  :? for help
Loading package ghc-prim ... linking ... done.
Loading package integer-gmp ... linking ... done.
Loading …
Run Code Online (Sandbox Code Playgroud)

haskell module ghci

6
推荐指数
1
解决办法
404
查看次数

标签 统计

ghci ×1

haskell ×1

module ×1