ghci

    12熱度

    2回答

    如下GHCI的提示可以進行設置,這是我的.ghci: :set prompt "λ> " 然而,不同的提示出現在多塊,我無法弄清楚如何改變它。這是完全不可讀如果有太多的模塊的輸入: λ> :{ Prelude Control.Arrow Control.Applicative Control.Monad Control.Concurrent Control.Concurrent.Async

    6熱度

    1回答

    重現我試圖檢查this stackoverflow answer與ghci的,並得到了以下錯誤: > import Data.List > let m = head . sort > m [2,3,4] <interactive>:5:4: No instance for (Num()) arising from the literal `2' Possible fix

    0熱度

    1回答

    我的箱子上安裝了hoogle,我可以在ghci中使用hoogle。有沒有辦法讓hoogle只在特定的模塊和包中搜索? 我試圖 :hoogle +System.Directory directory ,但我得到了很多未在System.Directory找到的結果。

    2熱度

    1回答

    考慮以下人爲的例子內的值: module Main where myadd3 first second third = let result1 = first -- line 3 result2 = second -- line 4 result3 = third -- line 5 in result1 + result2 + re

    4熱度

    1回答

    有可能查詢ghci的統一類型? 例如,如果我想知道(Int -> Bool)和(a -> Bool)之間的統一類型,我該如何查詢ghci? 我想解決的是練習13.23從第三版Haskell: The Craft of Functional Programming。 如何使用Haskell系統檢查兩個類型表達式 是否可以統一,如果有的話,他們的統一性是什麼?提示:你可以在Haskell虛擬 定義中定

    0熱度

    1回答

    我有一個Haskell函數,它返回相當大的輸出。 (事實上​​,超出了控制檯的緩衝區大小。)有沒有什麼辦法可以將GHCI輸出自動保存到外部txt文件而不是簡單顯示?

    0熱度

    1回答

    我試圖理解爲什麼類型: (flip .) is: (a -> a1 -> b -> c) -> a -> b -> a1 -> c 首先,類型: flip: is (a -> b -> c) -> b -> a -> c (.): is (b -> c) -> (a -> b) -> a -> c 我將重命名變量更清晰在我的解釋中,所以類型: flip: is (ax -> bx -> cx) -

    2熱度

    5回答

    說我有一個整數l = [1,2] ,我想打印到stdout的名單。 做print l產生[1,2] 說我想要打印的清單沒有括號 map print l產生 No instance for (Show (IO())) arising from a use of `print' Possible fix: add an instance declaration for (Show (IO()))

    1熱度

    1回答

    我正在學習haskell,我正在嘗試編寫一些簡單的函數。一切運作良好,直到我使用功能isUpper。我無法編譯,因爲這個錯誤的項目: [1 of 1] Compiling Main (C:\Users\...\src\Main.hs, interpreted) C:\Users\...\src\Main.hs:147:25: Not in scope: `isUpper' Fa

    8熱度

    1回答

    我有一個ghci的問題,我需要關於如何調試它的建議。問題是,當我從我進口的項目執行一個功能我有一個重複的定義錯誤和ghci中退出,因爲它不能繼續: > ghci -v0 --interactive -ignore-dot-ghci -isrc -idist/build/autogen tests/System/Console/Hawk/PreludeTests.hs -no-user-packag