在线时间:8:00-16:00
迪恩网络APP
随时随地掌握行业动态
扫描二维码
关注迪恩网络微信公众号
开源软件名称:haskell-works/hw-koans开源软件地址:https://github.com/haskell-works/hw-koans开源编程语言:Haskell 87.3%开源软件介绍:hw-koansCourse for learn functional programming. Prerequisites
RunningRun: $ git clone [email protected]:haskell-works/hw-koans.git
$ cd hw-koans
$ cabal v2-test --enable-tests --test-show-details=direct
...
15 modules not enrolled
All enrolled 0 test modules succeeded
Test suite koan-test: PASS
... The above output shows that there are Each module defines the following a function: enrolled :: Bool
enrolled = False You will need to enable the module by changing $ cabal v2-test --enable-tests --test-show-details=direct
━━━ Check.Functor ━━━
✗ prop_fmap_void failed at test/Check/Functor.hs:43:3
after 1 test and 1 shrink.
┏━━ test/Check/Functor.hs ━━━
40 ┃ prop_fmap_void :: Property
41 ┃ prop_fmap_void = property $ do
42 ┃ mb <- forAll $ Gen.maybe (Gen.int Range.constantBounded)
┃ │ Nothing
43 ┃ K.void mb === P.void mb
┃ ^^^^^^^^^^^^^^^^^^^^^^^
┃ │ ━━━ Exception (ErrorCall) ━━━
┃ │ TODO: implement void
┃ │ CallStack (from HasCallStack):
┃ │ error, called at koan/Koan/Functor.hs:34:8 in hw-koans-0.1.0.0-inplace:Koan.Functor
This failure can be reproduced by running:
> recheck (Size 0) (Seed 16511336219962586096 11754670307026383675) prop_fmap_void
... From the above you can see the failure Go to that location to find the function void :: Functor f => f a -> f ()
void = error "TODO: implement void" Run the test command to check that you've correctly implemented the function then repeat for the other failures until there are no more errors. IDE supportThe project will build & test in Visual Studio Code with ⌘⇧V. List of modulesThe following are modules in order of difficulty. Introductory
Beginner
AcknowledgementsThis course was inspired by the Data 61 Functional Programming Course |
2023-10-27
2022-08-15
2022-08-17
2022-09-23
2022-08-13
请发表评论