2012-09-24 3 views
3

현재 Haskell 플랫폼 2012.2.0.0, which says it uses base-4.5.0.0base-4.5.0.0 includes the GHC.TypeLits module을 설치했습니다. 내가 GHC.TypeLits를로드 할 때GHC.TypeLits 모듈을로드 할 수 없습니다.

그러나, ghc은 그것을 찾을 수 없습니다 :

% ghci --version       
The Glorious Glasgow Haskell Compilation System, version 7.4.1 
% ghci 
GHCi, version 7.4.1: http://www.haskell.org/ghc/ :? for help 
Loading package ghc-prim ... linking ... done. 
Loading package integer-gmp ... linking ... done. 
Loading package base ... linking ... done. 
Prelude> :m +GHC.TypeLits 

<no location info>: 
    Could not find module `GHC.TypeLits' 
    Perhaps you meant GHC.Types (from ghc-prim) 
Prelude> 
% ghc-pkg list base 
/Library/Frameworks/GHC.framework/Versions/7.4.1-i386/usr/lib/ghc-7.4.1/package.conf.d 
    base-4.5.0.0 
% ghc-pkg describe base 
name: base 
version: 4.5.0.0 
id: base-4.5.0.0-a732a3518af7589b6c46f83e8ceae384 
license: BSD3 
copyright: 
maintainer: [email protected] 
stability: 
homepage: 
package-url: 
synopsis: Basic libraries 
description: This package contains the Prelude and its support libraries, 
      and a large collection of useful libraries ranging from data 
      structures to parsing combinators and debugging utilities. 
category: 
author: 
exposed: True 
exposed-modules: Foreign.Concurrent GHC.Arr GHC.Base GHC.Conc 
       GHC.Conc.IO GHC.Conc.Signal GHC.Conc.Sync GHC.ConsoleHandler 
       GHC.Constants GHC.Desugar GHC.Enum GHC.Environment GHC.Err 
       GHC.Exception GHC.Exts GHC.Fingerprint GHC.Fingerprint.Type 
       GHC.Float GHC.Float.ConversionUtils GHC.Float.RealFracMethods 
       GHC.Foreign GHC.ForeignPtr GHC.Handle GHC.IO GHC.IO.Buffer 
       GHC.IO.BufferedIO GHC.IO.Device GHC.IO.Encoding 
       GHC.IO.Encoding.CodePage GHC.IO.Encoding.Failure 
       GHC.IO.Encoding.Iconv GHC.IO.Encoding.Latin1 GHC.IO.Encoding.Types 
       GHC.IO.Encoding.UTF16 GHC.IO.Encoding.UTF32 GHC.IO.Encoding.UTF8 
       GHC.IO.Exception GHC.IO.FD GHC.IO.Handle GHC.IO.Handle.FD 
       GHC.IO.Handle.Internals GHC.IO.Handle.Text GHC.IO.Handle.Types 
       GHC.IO.IOMode GHC.IOArray GHC.IOBase GHC.IORef GHC.Int GHC.List 
       GHC.MVar GHC.Num GHC.PArr GHC.Pack GHC.Ptr GHC.Read GHC.Real GHC.ST 
       GHC.Stack GHC.Stats GHC.Show GHC.Stable GHC.Storable GHC.STRef 
       GHC.TopHandler GHC.Unicode GHC.Weak GHC.Word System.Timeout 
       GHC.Event Control.Applicative Control.Arrow Control.Category 
       Control.Concurrent Control.Concurrent.Chan Control.Concurrent.MVar 
       Control.Concurrent.QSem Control.Concurrent.QSemN 
       Control.Concurrent.SampleVar Control.Exception 
       Control.Exception.Base Control.OldException Control.Monad 
       Control.Monad.Fix Control.Monad.Instances Control.Monad.ST 
       Control.Monad.ST.Safe Control.Monad.ST.Unsafe Control.Monad.ST.Lazy 
       Control.Monad.ST.Lazy.Safe Control.Monad.ST.Lazy.Unsafe 
       Control.Monad.ST.Strict Control.Monad.Zip Data.Bits Data.Bool 
       Data.Char Data.Complex Data.Dynamic Data.Either Data.Eq Data.Data 
       Data.Fixed Data.Foldable Data.Function Data.Functor Data.HashTable 
       Data.IORef Data.Int Data.Ix Data.List Data.Maybe Data.Monoid 
       Data.Ord Data.Ratio Data.STRef Data.STRef.Lazy Data.STRef.Strict 
       Data.String Data.Traversable Data.Tuple Data.Typeable 
       Data.Typeable.Internal Data.Unique Data.Version Data.Word 
       Debug.Trace Foreign Foreign.C Foreign.C.Error Foreign.C.String 
       Foreign.C.Types Foreign.ForeignPtr Foreign.ForeignPtr.Safe 
       Foreign.ForeignPtr.Unsafe Foreign.Marshal Foreign.Marshal.Alloc 
       Foreign.Marshal.Array Foreign.Marshal.Error Foreign.Marshal.Pool 
       Foreign.Marshal.Safe Foreign.Marshal.Utils Foreign.Marshal.Unsafe 
       Foreign.Ptr Foreign.Safe Foreign.StablePtr Foreign.Storable Numeric 
       Prelude System.Console.GetOpt System.CPUTime System.Environment 
       System.Exit System.IO System.IO.Error System.IO.Unsafe System.Info 
       System.Mem System.Mem.StableName System.Mem.Weak 
       System.Posix.Internals System.Posix.Types 
       Text.ParserCombinators.ReadP Text.ParserCombinators.ReadPrec 
       Text.Printf Text.Read Text.Read.Lex Text.Show Text.Show.Functions 
       Unsafe.Coerce 
hidden-modules: GHC.Event.Array GHC.Event.Clock GHC.Event.Control 
       GHC.Event.EPoll GHC.Event.IntMap GHC.Event.Internal 
       GHC.Event.KQueue GHC.Event.Manager GHC.Event.PSQ GHC.Event.Poll 
       GHC.Event.Thread GHC.Event.Unique Control.Monad.ST.Imp 
       Control.Monad.ST.Lazy.Imp Foreign.ForeignPtr.Imp 
trusted: False 
import-dirs: /Library/Frameworks/GHC.framework/Versions/7.4.1-i386/usr/lib/ghc-7.4.1/base-4.5.0.0 
library-dirs: /Library/Frameworks/GHC.framework/Versions/7.4.1-i386/usr/lib/ghc-7.4.1/base-4.5.0.0 
hs-libraries: HSbase-4.5.0.0 
extra-libraries: iconv 
extra-ghci-libraries: 
include-dirs: /Library/Frameworks/GHC.framework/Versions/7.4.1-i386/usr/lib/ghc-7.4.1/base-4.5.0.0/include 
includes: HsBase.h 
depends: ghc-prim-0.2.0.0-bd29cb1ca1b712d64e00ac9207f87d0a 
     integer-gmp-0.4.0.0-ec87c5d9609a1d46da031ef5d51c4f79 builtin_rts 
hugs-options: 
cc-options: 
ld-options: 
framework-dirs: 
frameworks: 
haddock-interfaces: /Library/Frameworks/GHC.framework/Versions/7.4.1-i386/usr/share/doc/ghc/html/libraries/base-4.5.0.0/base.haddock 
haddock-html: /Library/Frameworks/GHC.framework/Versions/7.4.1-i386/usr/share/doc/ghc/html/libraries/base-4.5.0.0 
pkgroot: "/Library/Frameworks/GHC.framework/Versions/7.4.1-i386/usr/lib/ghc-7.4.1" 
% 

그래서 무슨 일이야? 현재의 Haskell 플랫폼에서 GHC.TypeLits을 사용할 수 있다고 가정하는 것이 잘못 되었습니까? 아니면 내가 사용할 수 있도록 필요한 단계를 건너 뛰고 있습니까?

+2

워드 프로세서 개발 지점이 아닌 릴리스 지점에서 생성 된 것으로 보인다. –

답변

4

내가 링크 한 문서 페이지에서 뭔가 이상해 보입니다. 귀하의 GHC 주장은 7.4.1이며, base-4.5.0.0을 사용하는 것으로 보입니다. the GHC library documentationthe Hackage pageGHC.TypeLits을 포함하지 않으므로 base-4.5.0.0으로 표시됩니다. 이것은 GHC 7.4.1 doesn't support type literals이기 때문에 GHC 7.6.1과 달리 완전히 합리적입니다.

+1

오케이, 문서가 비린내가되어 모든 것이 합리적입니다. – rampion

+0

@rampion : 당신이 링크 한 소위'base-4.5.0.0'은'Base-4.6.0.0'에서 만들어진 다른 변경 사항들을 포함하고있는 것으로 보이는데,'Bits'와' 'readEither'와'readMaybe'를 내 보냅니다. –

2

예, 현재 Haskell 플랫폼은 유형 수준 리터럴을 지원하지 않습니다. 그들은 added in GHC 7.6이었습니다.

관련 문제