LoginSignup
0
0

More than 1 year has passed since last update.

Unison言語をさわるだけ

Last updated at Posted at 2022-09-23

環境構築

Windows 10 + WSL

mkdir unisonlanguage
curl -L https://github.com/unisonweb/unison/releases/download/release%2FM4/ucm-linux.tar.gz --output unisonlanguage/ucm.tar.gz
tar -xzf unisonlanguage/ucm.tar.gz -C unisonlanguage

手順: https://www.unison-lang.org/learn/quickstart/

.unisonlanguage/ を PATH に登録してください

触る

ワーキングディレクトリの作成

mkdir unisontest
cd unisontest

インタフェースの起動

まずは ucmコマンドで、インターフェースを起動してください
こんな感じのインタフェースが起動します

image.png

スクリプトの記載

ワーキングディレクトリでVSCODEを起動

code .

ワーキングディレクトリにテストコードtest.uを置く

test.u
myTerm = List.map (x -> x * 10) [1,2,3,4,5,6]
> myTerm

自動でスクリプトが読み込まれて評価され結果が表示されます

image.png

  1. myTerm = List.map (x -> x * 10) [1,2,3,4,5,6]myTerm を定義
  2. > myTermmyTermの値を表示(ウオッチ?デバッグ表示?します)
0
0
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
0
0