阅读有关Eff语言的内容,我想知道是否有类似的想法已经在使用中.Eff-Language提到了一篇名为"推断代数效应"的论文,该论文描述了Eff用于推断效果的算法.有相似之处吗?
如果我想在Haskell源文件中比较类型或只打印类型信息,我有哪些选项?
为什么不能使用以下bash代码?
for i in $( echo "emmbbmmaaddsb" | split -t "mm" )
do
echo "$i"
done
Run Code Online (Sandbox Code Playgroud)
预期产量:
e
bb
aaddsb
Run Code Online (Sandbox Code Playgroud) 我读了这个描述:https://forum.sublimetext.com/t/dev-build-3118/21270/23
所以我在sublime控制台中尝试了这个:
view.erase_phantoms("test"); view.add_phantom("test",
view.sel()[0], "<img src=/home/v/4.png>",
sublime.LAYOUT_BLOCK)
Run Code Online (Sandbox Code Playgroud)
不幸的是,图片没有显示!
我想将一个模块放在不同的文件夹中.是否有可能在import语句中告诉模块的路径?注意我不想使用cabal,因为在我使用的编辑器中,runhaskell是haskell的默认可执行文件.
shell.nix以下 cmdline 参数的最短等效项是什么?
nix-shell -p "haskell.packages.ghc865.ghcWithPackages (p: [p.ghci-pretty])"
Run Code Online (Sandbox Code Playgroud)
这有效,但它很冗长:
# contents of shell.nix file
# run with the following cmd:
# nix-shell shell.nix
{ nixpkgs ? import <nixpkgs> {} }:
let
inherit nixpkgs;
inherit (nixpkgs) haskellPackages;
haskellDeps = a: with a; [
ipprint
base
hscolour
ghci-pretty
];
ghc = nixpkgs.haskellPackages.ghcWithPackages haskellDeps;
nixPackages = [
haskellPackages.cabal-install
ghc
];
in
nixpkgs.stdenv.mkDerivation {
name = "profile_name";
buildInputs = nixPackages;
}
Run Code Online (Sandbox Code Playgroud)