Hello,
I am trying the Unison track. I always create a Docker container for my development. With Unison I find it a little bit harder, so I would like to ask for help or tips.
I created a Dockerfile, based on Unison docs. That works just fine. I even tunneled port for UCM, so I can run it inside the container, but access on my host.
One strange thing I notice - I cannot access documentation for base.Char.!=
. But when I go to share.unison-lang.org, I can see it. Actually I cannot access docs for any (randomly picked) base.Char
term. But others work (e.g. Nat
).
Any ideas? :)
Second, I am a bit confused on how to test exercises.
I can write foobar.u
, it gets loaded in UCM, but if I run test
in UCM, I get 500 something passing tests, but it’s base
tests.
When I try to load it, I get:
load leap.test.u
I couldn't find any definitions matching the name leap inside the namespace .
2 | Test.label "leap should be false when year is not divisible by 4" (Test.expect ((leap 2015) === false))
Some common causes of this error include:
* Your current namespace is too deep to contain the definition in its subtree
* The definition is part of a library which hasn't been added to this project
To add a library to this project use the command: `fork <.path.to.lib> .lib.<libname>`
Whatever it is, its type should conform to Nat -> Boolean.
I am still confused from namespace, and how do I work with different exercises in the track. My file structure:
Dockerfile
hello-world
leap
README.md
unisonlanguage
So if I want to solve hello-world, I go like this:
cd hello-world
../unisonlanguage/ucm
Then when I modify hello.u
, UCM registers it.
When I want to solve leap after that, I quit UCM, cd to leap, and repeat.
Now leap is autodetected by UCM.
I couldn’t find how to make UCM listen in subdirectories:
./unisonlanguage/ucm
# change leap/leap.u
# UCM notices
Any help is appreciated