When I start a session in ghci, I use:
:set prompt >>
However, some function calls still display module names at the prompt when evaluated. I never want anything other than my custom prompt, I think.
Actual ghci output:
>>m00 <- iOIandRTfromPhrase 0.25 2 2 4 [2] 2 [2] 4.0 3
>>rs <- newMMap [("100",m00)]
>>:{
*ExperimentalConductive ExperimentalConductive Music.Theory.Bjorklund SuperDirtAction NonlinearEnsemble EnsembleNew Control.Concurrent Data.List| let lsysTest rules axiom gen phraseLength = do
*ExperimentalConductive ExperimentalConductive Music.Theory.Bjorklund SuperDirtAction NonlinearEnsemble EnsembleNew Control.Concurrent Data.List| f <- flatRandomPattern gen rules axiom [0.25,0.5..1.5] phraseLength
*ExperimentalConductive ExperimentalConductive Music.Theory.Bjorklund SuperDirtAction NonlinearEnsemble EnsembleNew Control.Concurrent Data.List| return f
*ExperimentalConductive ExperimentalConductive Music.Theory.Bjorklund SuperDirtAction NonlinearEnsemble EnsembleNew Control.Concurrent Data.List| :}
>>:{
*ExperimentalConductive ExperimentalConductive Music.Theory.Bjorklund SuperDirtAction NonlinearEnsemble EnsembleNew Control.Concurrent Data.List| let lsysTestB rules axiom gen iois phraseLength = do
*ExperimentalConductive ExperimentalConductive Music.Theory.Bjorklund SuperDirtAction NonlinearEnsemble EnsembleNew Control.Concurrent Data.List| f <- flatRandomPattern gen rules axiom iois phraseLength
*ExperimentalConductive ExperimentalConductive Music.Theory.Bjorklund SuperDirtAction NonlinearEnsemble EnsembleNew Control.Concurrent Data.List| return f
*ExperimentalConductive ExperimentalConductive Music.Theory.Bjorklund SuperDirtAction NonlinearEnsemble EnsembleNew Control.Concurrent Data.List| :}
>>
Setting prompt-cont doesn't change the output, it seems.
:set prompt-cont |
Some flags have not been recognized: prompt-cont, |
:{
*ExperimentalConductive ExperimentalConductive Music.Theory.Bjorklund SuperDirtAction NonlinearEnsemble EnsembleNew Control.Concurrent Data.List| let lsys rules axiom gen phraseLength iOIs = do
Answer, from leftaroundabout below: older ghci needs set prompt2. Newer versions might require different commands, as described in comments below.
Ok, that is indeed a prompt problem, but not a prompt
problem. :{ :}
Continuations in GHCi use a different prompt, namely prompt-cont
.
GHCi, version 8.2.1: http://www.haskell.org/ghc/ :? for help
Prelude> :set prompt >>
>>:set prompt-cont |
>>:{
|let foo :: [Int]
| foo = [37, 9, 18]
|:}
>>foo
[37,9,18]
In older GHCi versions, prompt-cont
was called prompt2
:
GHCi, version 7.10.2: http://www.haskell.org/ghc/ :? for help
Prelude> :set prompt >>
>>:set prompt2 |
>>:{
|let foo :: [Int]
| foo = [37, 9, 18]
|:}
>>foo
[37,9,18]
I recommend you also check out IHaskell
if you like a REPL with proper capability of defining functions in local code blocks. GHCi's support for this was always a bit fiddly.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With