Top "Ghci" questions

GHCi is the interactive environment (REPL) for the Glasgow Haskell Compiler.

How can I import a Haskell module in GHCi?

I am trying to teach myself Haskell from the book Learn You A Haskell for Great Good. I got up …

haskell import ghci
How to provide explicit type declarations for functions when using GHCi?

How to I define the equivalent of this function (taken from learnyouahaskell) inside GHCi? import Data.List numUniques :: (Eq a) =&…

haskell types ghci function-declaration
How to see the current working directory in WinGHCi

I've started to teach myself Haskell, and for that I've installed The Haskell Platform for Windows. I'm using WinGHCi as …

haskell ghci working-directory winghci
Haskell : understanding "No instance for" error messages in ghci

Question 1 Hi, if in WinGHCi I intentionally do the following wrong piece of code : 3 4 Then the error message I get …

haskell ghc ghci winghci
How to abort execution in GHCI?

When I launch ghci> last [0..] I can interrupt it with Ctrl+C. However ghci> last (repeat 0) cannot be …

haskell ghci
How do I get ghci to see packages I installed from cabal?

I've installed the such-and-such a package using cabal, and I can build a program that depends on it using cabal …

haskell cabal ghci
How to set a program's command line arguments for GHCi?

Suppose some Haskell file is executed with runghc Queens.hs gecode_compile Now, this fails, and I want to debug …

haskell ghci
Haskell / GHCi - loading modules from different directories

My haskell application has the following directory structure: src/ utils/Utils.hs subsystem/Subsystem.hs The Subsystem module imports Utils …

haskell ghci haskell-platform
Why can't I define a new type in ghci?

I get an error in ghci when I try to define a new type: Prelude> data Point = Pt Int …

haskell ghci
ghci configuration file

I'm using ghci 6.8.2 on Ubuntu. Does ghci use a configuration file where we can do some initial setup?. E.g.: :…

haskell ghci