2
나는 내 프로젝트의 루트 디렉토리에 내 .ghci
파일에 `cabal repl '이 프로젝트 모듈을 컴파일 한 후`.ghci` *를 읽으려면 어떻게해야합니까?
:m +Control.Monad System.Random.MWC NW.Affix
있습니다. 나는
cabal repl
와
NW.Affix
(내 프로젝트의 모듈)에로드 할, 그러나 그것은 다음과 같이 즉시 실패
[ 1 of 14] Compiling NW.Util (src/NW/Util.hs, interpreted)
[ 2 of 14] Compiling NW.Stats (src/NW/Stats.hs, interpreted)
[ 3 of 14] Compiling NW.Monster (src/NW/Monster.hs, interpreted)
[ 4 of 14] Compiling NW.Random (src/NW/Random.hs, interpreted)
[ 5 of 14] Compiling NW.Map (src/NW/Map.hs, interpreted)
[ 6 of 14] Compiling NW.Player (src/NW/Player.hs, interpreted)
[ 7 of 14] Compiling NW.Error (src/NW/Error.hs, interpreted)
[ 8 of 14] Compiling NW.Effect (src/NW/Effect.hs, interpreted)
[ 9 of 14] Compiling NW.Config (src/NW/Config.hs, interpreted)
[10 of 14] Compiling NW.Affix (src/NW/Affix.hs, interpreted)
[11 of 14] Compiling NW.Item (src/NW/Item.hs, interpreted)
[12 of 14] Compiling NW.State (src/NW/State.hs, interpreted)
[13 of 14] Compiling NW.Battle (src/NW/Battle.hs, interpreted)
[14 of 14] Compiling Main (src/main.hs, interpreted)
Ok, modules loaded: NW.Affix, Main, NW.Battle, NW.Config, NW.Item, NW.Error, NW.Map, NW.Player, NW.Random, NW.State, NW.Stats, NW.Monster, NW.Effect, NW.Util.
:
Preprocessing executable 'netherworld' for netherworld-0.0.0.0...
GHCi, version 7.8.3: http://www.haskell.org/ghc/ :? for help
Loading package ghc-prim ... linking ... done.
Loading package integer-gmp ... linking ... done.
Loading package base ... linking ... done.
Loading package array-0.5.0.0 ... linking ... done.
Loading package deepseq-1.3.0.2 ... linking ... done.
Loading package bytestring-0.10.4.0 ... linking ... done.
Loading package transformers-0.3.0.0 ... linking ... done.
Loading package mtl-2.1.3.1 ... linking ... done.
Loading package text-1.1.1.3 ... linking ... done.
Loading package parsec-3.1.5 ... linking ... done.
Loading package primitive-0.5.3.0 ... linking ... done.
Loading package old-locale-1.0.0.6 ... linking ... done.
Loading package time-1.4.2 ... linking ... done.
Loading package vector-0.10.11.0 ... linking ... done.
Loading package mwc-random-0.13.1.2 ... linking ... done.
Loading package monads-tf-0.1.0.2 ... linking ... done.
Loading package filepath-1.3.0.2 ... linking ... done.
Loading package byteable-0.1.1 ... linking ... done.
Loading package cryptohash-0.11.6 ... linking ... done.
Loading package containers-0.5.5.1 ... linking ... done.
<no location info>:
Could not find module ‘NW.Affix’
It is not a module in the current program, or in any known package.
이 같은 실패 후, 그것은 행복과 같이, 내 모듈을 컴파일
현재 작업 완료는 초기화가 완료된 후 .ghci
항목을 cabal repl
에 복사하여 붙여 넣는 것입니다. 그래도 내 .ghci
파일에서 cabal repl
을 읽는 것을 지연시키는 방법이 있습니까? 까지이 완료되면 프로젝트의 모듈을 컴파일하는 것입니까?
아마도 GHCi에게 모듈을 찾는 방법을 말해야하기 때문일 수 있습니다. 이 경우': m '보다 먼저': set -i/path/to/my/files /'를 시도하십시오. – vivian
@vivian'. : -i ...' dist' (cabal이 컴파일 된 오브젝트 파일을 저장하는 장소)가 작동하지 않았습니다. –
': set -i..' 설정은 오브젝트 파일이 아닌 소스 파일의 위치로 시도하십시오. – vivian