Haskell-Things / Haskell-Things/ImplicitCAD

README ghci test not working and there is no ~/.cabal/lib/ ...

Open
#481 1 comment 0 reactions 0 assignees View on GitHub
Dominant language
JavaScript
Stars
1.6k
Forks
148
PR merge metrics
No merged PRs in 30d

Description

Maybe more documentation needed?

- Haskell test results in module is not loaded: 'Graphics.Implicit' (./Graphics/Implicit.hs)

> This is most likely a problem with your Linux distro and cabal not playing nice. GHC is not configured to see the ImplicitCAD libraries. You can confirm this by trying the test in `~/.cabal/lib/`. If that works, you should be able to use ghc anywhere with the -Ldir or -llib options. Alternatively, some people have permanently fixed this by doing the cabal install as root.

## A slightly edited log:

```
$ apt install ghc haskell-stack cabal-install
$ cabal update && cabal install implicit
$ echo "circle(30);" > test.escad
$ extopenscad test.escad
Loading File.
Processing File.
Rendering 2D object from test.escad to test.stl with resolution 2.0 in
box (V2 (-30.0) (-30.0),V2 30.0 30.0) circle 30.0
<>
$ ls
test.escad test.stl
$ ghci
GHCi, version 8.8.4: https://www.haskell.org/ghc/ :? for help
Prelude> import Graphics.Implicit

: error:
Could not find module ‘Graphics.Implicit’
It is not a module in the current program, or in any known package.
Prelude> ^D
$ locate cabal | grep lib | grep -i implicit | wc -l
117
$ locate cabal | grep lib | grep -i implicit | rev | cut -d "/" -f 2- | rev | sort | uniq | head -n 1
~/.cabal/store/ghc-8.8.4/implicit-0.4.1.0-a990a66c188ce67ca424777aeecf8a34c19946f74d8d9563353b724167c06df9
```
And within that directory we have `/lib/Graphics/` which contains:
- Implicit
- Implicit/Export
- Implicit/Export/Render
- Implicit/Export/Symbolic
- Implicit/ExtOpenScad
- Implicit/ExtOpenScad/Eval
- Implicit/ExtOpenScad/Parser
- Implicit/ExtOpenScad/Util
- Implicit/ObjectUtil

I attempted the `import` while cd'd to `~/.cabal/` and then to each of the subdirectories, all with the same result.

Contributor guide

No contributing guide indexed for this repository

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.