haskvan / haskellkoans Goto Github PK
View Code? Open in Web Editor NEWHaskell Koans for the Vancouver's Haskell UnMeetup
License: MIT License
Haskell Koans for the Vancouver's Haskell UnMeetup
License: MIT License
Hi, I'm running Haskell with a docker container built from darinmorrison/haskell
image with ghci version 7.8.3.
When I tried to run .bin/setup-koans
as cited in the Readme file, I got the following issue:
Resolving dependencies...
cabal: Could not resolve dependencies:
trying: HaskellKoans-0.1 (user goal)
trying: testloop-0.1.1.0 (dependency of HaskellKoans-0.1)
next goal: unix (dependency of testloop-0.1.1.0)
rejecting: unix-2.7.0.1/installed-0d8..., 2.7.0.1, 2.7.0.0 (conflict: testloop
=> unix>=2.2.0.0 && <2.7)
rejecting: unix-2.6.0.1, 2.6.0.0 (conflict: base==4.7.0.1/installed-e4b...,
unix => base>=4.2 && <4.7)
rejecting: unix-2.5.1.1, 2.5.1.0 (conflict: base==4.7.0.1/installed-e4b...,
unix => base>=4.2 && <4.6)
rejecting: unix-2.5.0.0 (conflict: base==4.7.0.1/installed-e4b..., unix =>
base>=4.2 && <4.5)
rejecting: unix-2.4.2.0, 2.4.1.0 (conflict: base==4.7.0.1/installed-e4b...,
unix => base>=4.2 && <4.4)
rejecting: unix-2.4.0.2, 2.4.0.1 (conflict: base==4.7.0.1/installed-e4b...,
unix => base>=4.2 && <4.3)
rejecting: unix-2.4.0.0 (conflict: base==4.7.0.1/installed-e4b..., unix =>
base>=4.1 && <4.3)
trying: unix-2.3.2.0
next goal: hint (dependency of testloop-0.1.1.0)
rejecting: hint-0.4.2.0, 0.4.1.0, 0.4.0.0 (conflict: testloop => hint==0.3.*)
trying: hint-0.3.3.7
next goal: ghc (dependency of hint-0.3.3.7)
rejecting: ghc-7.8.3/installed-4df... (conflict: unix==2.3.2.0, ghc =>
unix==2.7.0.1/installed-0d8...)
Dependency tree exhaustively searched.
Note: when using a sandbox, all packages are required to have consistent
dependencies. Try reinstalling/unregistering the offending packages or
recreating the sandbox.
setup-koans: [ERROR]cabal install --only-dependencies failed.
Are I missing something that need to be setup first before setting up the koans?
Please help. Thank you in advance.
I tried with ghc 7.10.3 ,but got failed with testLoop dependency on centos 6.x
ghc --version
The Glorious Glasgow Haskell Compilation System, version 7.10.3
Configuring testloop-0.1.1.0...
Building testloop-0.1.1.0...
Failed to install testloop-0.1.1.0
Build log ( /home/xxx/HaskellKoans/.cabal-sandbox/logs/testloop-0.1.1.0.log ):
Configuring testloop-0.1.1.0...
Building testloop-0.1.1.0...
Preprocessing library testloop-0.1.1.0...
[1 of 6] Compiling System.TestLoop.Internal.Signal ( src/System/TestLoop/Internal/Signal.hs, dist/dist-sandbox-b3073e5/build/System/TestLoop/Internal/Signal.o )
[2 of 6] Compiling System.TestLoop.Util ( src/System/TestLoop/Util.hs, dist/dist-sandbox-b3073e5/build/System/TestLoop/Util.o )
[3 of 6] Compiling System.TestLoop.Internal.Types ( src/System/TestLoop/Internal/Types.hs, dist/dist-sandbox-b3073e5/build/System/TestLoop/Internal/Types.o )
[4 of 6] Compiling System.TestLoop.Internal.Watcher ( src/System/TestLoop/Internal/Watcher.hs, dist/dist-sandbox-b3073e5/build/System/TestLoop/Internal/Watcher.o )
[5 of 6] Compiling System.TestLoop.Internal.Cabal ( src/System/TestLoop/Internal/Cabal.hs, dist/dist-sandbox-b3073e5/build/System/TestLoop/Internal/Cabal.o )
[6 of 6] Compiling System.TestLoop ( src/System/TestLoop.hs, dist/dist-sandbox-b3073e5/build/System/TestLoop.o )
src/System/TestLoop.hs:47:23:
Couldn't match type FS.FilePath' with
[Char]'
Expected type: FilePath
Actual type: FS.FilePath
In the second argument of treeExtExists', namely
(FS.decodeString path)'
In a stmt of a 'do' block:
treeExtExists
manager
(FS.decodeString path)
"hs"
(reloadTestSuite moduleName modulePath paths)
src/System/TestLoop.hs:49:23:
Couldn't match type [Char]' with
FS.FilePath'
Expected type: FilePath -> IO ()
Actual type: FS.FilePath -> IO ()
In the fourth argument of treeExtExists', namely
(reloadTestSuite moduleName modulePath paths)'
In a stmt of a 'do' block:
treeExtExists
manager
(FS.decodeString path)
"hs"
(reloadTestSuite moduleName modulePath paths)
Installed vector-0.11.0.0
Configuring scientific-0.3.4.9...
Installed unordered-containers-0.2.7.1
Configuring semigroups-0.18.2...
Building scientific-0.3.4.9...
Building semigroups-0.18.2...
Installed scientific-0.3.4.9
Configuring attoparsec-0.13.0.2...
Building attoparsec-0.13.0.2...
Installed semigroups-0.18.2
Configuring QuickCheck-2.9.1...
Building QuickCheck-2.9.1...
Installed QuickCheck-2.9.1
Configuring quickcheck-io-0.1.3...
Building quickcheck-io-0.1.3...
Installed quickcheck-io-0.1.3
Configuring hspec-core-2.2.3...
Building hspec-core-2.2.3...
Installed hspec-core-2.2.3
Configuring hspec-2.2.3...
Building hspec-2.2.3...
Installed hspec-2.2.3
Installed attoparsec-0.13.0.2
cabal: Error: some packages failed to install:
testloop-0.1.1.0 failed during the building phase. The exception was:
ExitFailure 1
setup-koans: [ERROR]cabal install --only-dependencies failed.
the error log file as follows
/HaskellKoans/.cabal-sandbox/logs/testloop-0.1.1.0.log
Configuring testloop-0.1.1.0...
Building testloop-0.1.1.0...
Preprocessing library testloop-0.1.1.0...
[1 of 6] Compiling System.TestLoop.Internal.Signal ( src/System/TestLoop/Internal/Signal.hs, dist/dist-sandbox-b3073e5/build/System/TestLoop/Internal/Signal.o )
[2 of 6] Compiling System.TestLoop.Util ( src/System/TestLoop/Util.hs, dist/dist-sandbox-b3073e5/build/System/TestLoop/Util.o )
[3 of 6] Compiling System.TestLoop.Internal.Types ( src/System/TestLoop/Internal/Types.hs, dist/dist-sandbox-b3073e5/build/System/TestLoop/Internal/Types.o )
[4 of 6] Compiling System.TestLoop.Internal.Watcher ( src/System/TestLoop/Internal/Watcher.hs, dist/dist-sandbox-b3073e5/build/System/TestLoop/Internal/Watcher.o )
[5 of 6] Compiling System.TestLoop.Internal.Cabal ( src/System/TestLoop/Internal/Cabal.hs, dist/dist-sandbox-b3073e5/build/System/TestLoop/Internal/Cabal.o )
[6 of 6] Compiling System.TestLoop ( src/System/TestLoop.hs, dist/dist-sandbox-b3073e5/build/System/TestLoop.o )
src/System/TestLoop.hs:47:23:
Couldn't match type FS.FilePath' with
[Char]'
Expected type: FilePath
Actual type: FS.FilePath
In the second argument of treeExtExists', namely
(FS.decodeString path)'
In a stmt of a 'do' block:
treeExtExists
manager
(FS.decodeString path)
"hs"
(reloadTestSuite moduleName modulePath paths)
src/System/TestLoop.hs:49:23:
Couldn't match type [Char]' with
FS.FilePath'
Expected type: FilePath -> IO ()
Actual type: FS.FilePath -> IO ()
In the fourth argument of treeExtExists', namely
(reloadTestSuite moduleName modulePath paths)'
In a stmt of a 'do' block:
treeExtExists
manager
(FS.decodeString path)
"hs"
(reloadTestSuite moduleName modulePath paths)
I get:
$ ./bin/setup-koans
bin/setup-koans:3:18:
Could not find module System' It is a member of the hidden package
haskell98-2.0.0.1'.
GHC 7.4.1
Either that, or I'm just getting it completely wrong.
I fill out the getChar
koan, then the prompt asks me for "a", which I give it, but then it fails immediately even once I've filled out the getLine
koan. I assume that once the first is passing, it should be prompting me to enter "burrito", but instead it just fails.
testReadingChar :: Spec
testReadingChar = it "getChar" $ do
putStrLn "Write: \"a\" to pass this test: "
-- NOTE: replace 'failIO' with the actual function
result <- getChar
assertEqual ""
'a'
result
testReadingLine :: Spec
testReadingLine = it "getLine" $ do
-- NOTE: replace 'failIO' with the actual function
result <- getLine
assertEqual "Write: \"burrito\" to pass this test"
"burrito"
result
That's my solution, the output from the console is:
BasicIO
Write: "a" to pass this test:
a
- getChar
- getLine FAILED [1]
1) BasicIO getLine
Write: "burrito" to pass this test
expected: "burrito"
but got: ""
OS X Yosemite, Version 10.10.2
$ ghc --version
The Glorious Glasgow Haskell Compilation System, version 7.10.1
$ ./bin/setup-koans
Writing a default package environment file to
/Users/akarpushonak/APPS/HASKELL/HaskellKoans/cabal.sandbox.config
Using an existing sandbox located at
/Users/akarpushonak/APPS/HASKELL/HaskellKoans/.cabal-sandbox
Resolving dependencies...
cabal: Could not resolve dependencies:
trying: HaskellKoans-0.1 (user goal)
trying: base-4.8.0.0/installed-901... (dependency of HaskellKoans-0.1)
trying: testloop-0.1.1.0 (dependency of HaskellKoans-0.1)
next goal: unix (dependency of testloop-0.1.1.0)
rejecting: unix-2.7.1.0/installed-457..., 2.7.1.0, 2.7.0.1, 2.7.0.0 (conflict:
testloop => unix>=2.2.0.0 && <2.7)
rejecting: unix-2.6.0.1, 2.6.0.0 (conflict: base==4.8.0.0/installed-901...,
unix => base>=4.5 && <4.7)
rejecting: unix-2.5.1.1, 2.5.1.0 (conflict: base==4.8.0.0/installed-901...,
unix => base>=4.5 && <4.6)
rejecting: unix-2.5.0.0 (conflict: base==4.8.0.0/installed-901..., unix =>
base>=4.2 && <4.5)
rejecting: unix-2.4.2.0, 2.4.1.0 (conflict: base==4.8.0.0/installed-901...,
unix => base>=4.2 && <4.4)
rejecting: unix-2.4.0.2, 2.4.0.1 (conflict: base==4.8.0.0/installed-901...,
unix => base>=4.2 && <4.3)
rejecting: unix-2.4.0.0 (conflict: base==4.8.0.0/installed-901..., unix =>
base>=4.1 && <4.3)
rejecting: unix-2.3.2.0, 2.3.1.0, 2.3.0.0, 2.2.0.0 (conflict:
base==4.8.0.0/installed-901..., unix => base<4.3)
rejecting: unix-2.0 (conflict: testloop => unix>=2.2.0.0 && <2.7)
Dependency tree exhaustively searched.
Note: when using a sandbox, all packages are required to have consistent
dependencies. Try reinstalling/unregistering the offending packages or
recreating the sandbox.
setup-koans: [ERROR]cabal install --only-dependencies failed.
Looks similar to already merged #9
Assume I passed the readKoan successfully, the next koan should be the readsKoan
lines 87 to 99 in BasicFunctions.hs.
But when I submit the readKoan, the next test to fail is the idKoan instead of the readsKoan.
Unable to setup koans under Ubuntu 18.x , GHC 8.0.2
$ ghc --version
The Glorious Glasgow Haskell Compilation System, version 8.0.2
$ uname -s -v -m -i -o
Linux #113-Ubuntu SMP Thu Jul 9 23:41:39 UTC 2020 x86_64 x86_64 GNU/Linux
$ cabal --version
cabal-install version 1.24.0.2
compiled using version 1.24.2.0 of the Cabal library
$ ./setup-koans
Writing a default package environment file to
/home/mayton/git.haskell/HaskellKoans/bin/cabal.sandbox.config
Using an existing sandbox located at
/home/mayton/git.haskell/HaskellKoans/bin/.cabal-sandbox
cabal: Error reading local package.
Couldn't find .cabal file in: .
setup-koans: [ERROR]cabal install --only-dependencies failed.
CallStack (from HasCallStack):
error, called at setup-koans:10:27 in main:Main
I get this error when running ./bin/setup-koans
user error (The package 'HaskellKoans' requires Cabal library version -any &&
>=1.18 but no suitable version is installed.)
setup-koans: [ERROR]cabal install --reinstall failed.
dev@dev:~/gits/HaskellKoans$ cabal -V
cabal-install version 1.20.0.3
using version 1.20.0.2 of the Cabal library
Completely new to haskell. Any suggestion as to what is wrong?
Resolving dependencies...
cabal: Could not resolve dependencies:
next goal: hint (dependency of testloop-0.1.1.0)
rejecting: hint-0.6.0 (conflict: testloop => hint>=0.3.0 && <0.6)
trying: hint-0.5.2
next goal: ghc (dependency of hint-0.5.2)
rejecting: ghc-8.0.1/installed-8.0... (conflict: hint => ghc>=7.6 && <8)
Dependency tree exhaustively searched.
There's no possible solution. I guess it'd be possible to use this project without the testloop. But I'm not sure how to modify the HaskellKoans.cabal file
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.