| Author | Message |
|---|---|
|
ejaan
Posts: 27
|
Posted 10:15 Nov 16, 2016 |
Good Morning, I was facing a problem with using the following module: import Data.List.Split I was trying to load/import the module but the following error was showing: Could not find module ‘Data.List.Utils’ to solve this problem I used the following command: 'cabal install missingh'
it will build the package and other missing libraries
I just want to share what I faced a problem with I hope it helps : )
Last edited by ejaan at
11:43 Nov 16, 2016.
|
|
rabbott
Posts: 1649
|
Posted 19:24 Nov 16, 2016 |
Thanks for the useful information. Were these command-line commands? What directory were you in when you executed them? Or does it matter? |
|
ejaan
Posts: 27
|
Posted 21:51 Nov 16, 2016 |
Yeah they are commands lines that I run them in the terminal
'cabal install missingh'
This called MissingH which is a library of all sorts of utility functions to help us ( Haskell Programmers ^_^ ) and I did this because I wanted to use the functions in the Data.List.Utils module. What I did is that I directed the path in the terminal to the folder where the project.hs file is located and then run that command. I think it works fine too if I created a new folder and new project.hs with the Data.List.Utils module in other location where the command is not directed to because I think it will be built in the GHCI after installing it. It will be loaded successfully.
Please, Professor. Abbott , correct me if I missed something :)
Thank you Eman |
|
ejaan
Posts: 27
|
Posted 22:01 Nov 16, 2016 |
This is relative to the question which is What happens if you leave out the import Data.List statement? "Because the Prelude module exports some functions from Data.List for convenience. You don't have to import Data.List via a qualified import because it doesn't clash with any Prelude names except for those that Prelude already steals from Data.List" However, for the Data.List.Utils Data.List.Split It must be imported to the file code
Last edited by ejaan at
22:28 Nov 16, 2016.
|
|
rabbott
Posts: 1649
|
Posted 11:39 Nov 17, 2016 |
Excellent! Thank you very much. I ran both of your cabal install commands and was able to import Data.List.Split. I ran the cabal commands from the command line in the folder where I normally store my .hs files. But I don't think the folder matters. It seemed to be necessary to restart WinGHCi. The imports didn't work without a restart. But after a restart and without loading any .hs files, the imports work. So WinGHCi did the imports even when it was not in my normal directory for .hs files. Thanks again. I hate this sort of sys-admin stuff. |
|
ejaan
Posts: 27
|
Posted 20:52 Nov 17, 2016 |
Always happy to share what I learned. Thank you, Professor. Abbott ^_^ |
