Why GitHub? ghci complains it can't find String (in 4 spots): :1:79: Not in scope: type constructor or class ‘String’ Perhaps you meant ‘IsString’ (imported from Course.Core) This modified text is an extract of the original Stack Overflow Documentation created by following contributors and released under CC BY-SA 3.0 By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. I don't have this Key function in my scope, so I get the following error: Not in scope: data constructor ‘Key’ Could somebody tell me what import is missing, and why it doesn't come together with scaffolding haskell module package yeso Code review; Project management; Integrations; Actions; Packages; Security Code review; Project management; Integrations; Actions; Packages; Security Features →. Code review; Project management; Integrations; Actions; Packages; Security The exception was: ExitFailure 1 haskell - empty - not in scope type constructor or class generic . Debian Bug report logs - #809159 ghc-mod: FTBFS: Gap.hs:256:18: Not in scope: data constructor `ExposePackageId' GitHub is home to over 40 million developers working together to host and review code, manage projects, and build software together. I'm not sure because the source for 0.2.1.0 isn't on Hackage and apparently I'm not quite motivated enough to check by fetching it. Features →. OK, I Understand Features →. Just cloned and followed the instructions to run. Haskell - 为什么会得到“not in scope: data constructor”错误? 内容来源于 Stack Overflow,并遵循 CC BY-SA 3.0 许可协议进行翻译与使用 回答 ( 2 ) Not in scope: data constructor ‘ExposePackageId’ Perhaps you meant ‘ExposePackage’ (imported from DynFlags) cabal: Error: some packages failed to install: ghc-mod-5.2.1.2 failed during the building phase. I expect that the Tree data constructor should be there, because I defined it in the lines above the height method. Why GitHub? Why GitHub? However, maybe that version relies on Prelude having Traversable, and thus would only really work on 4.8 or greater? Funnily enough, data Gender = M | F would have solved his problem of writing F instead of "F"! View entire discussion ( 9 comments) More posts from the haskell community Join GitHub today. Haskell - 为什么会得到“not in scope: data constructor”错误? 内容来源于 Stack Overflow,并遵循 CC BY-SA 3.0 许可协议进行翻译与使用 回答 ( 2 ) Prelude> :load ch3.hs [1 of 1] Compiling Main ( ch3.hs, interpreted ) ch3.hs:42:7: Not in scope: data constructor `Tree' Failed, modules loaded: none. Recommend:haskell - Yesod - Data constructor 'Key' is not in scope. (EDIT: cabal unpack'd the source... looks like this is the case.) We use cookies for various purposes including analytics. data Maybe a = Nothing | Just a -- Defined in ‘Data.Maybe’ In this de nition, Maybe is a type constructor, while Nothing and Just are value constructors, also referred to as data constructors.