You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
For compiled languages especially, I'd like to be able to do something like this:
import*asgarnfrom"http://localhost:8777/mod.ts";import*asnixpkgsfrom"http://localhost:8777/nixpkgs.ts";exportconsthelloFromHaskell=garn.haskell.mkHaskellProject({description: "My haskell executable",executable: "helloFromHaskell",compiler: "ghc94",src: ".",}).addExecutable("foo")`${helloFromHaskell.pkg}/bin/helloFromHaskell`;
But this doesn't work because the variable is used before it is assigned.
We can separate it out into two steps:
import*asgarnfrom"http://localhost:8777/mod.ts";import*asnixpkgsfrom"http://localhost:8777/nixpkgs.ts";consthelloFromHaskell=garn.haskell.mkHaskellProject({description: "My haskell executable",executable: "helloFromHaskell",compiler: "ghc94",src: ".",})exportconsthelloFromHaskell2=helloFromHaskell.addExecutable("foo")`${helloFromHaskell.pkg}/bin/helloFromHaskell`;
But it's not obvious that this is what we need to do (it's not obvious the .add methods don't mutate the object, for example, and that we shouldn't be using a var), so it'd be nice to document this somewhere (e.g. a cookbook).
The text was updated successfully, but these errors were encountered:
For compiled languages especially, I'd like to be able to do something like this:
But this doesn't work because the variable is used before it is assigned.
We can separate it out into two steps:
But it's not obvious that this is what we need to do (it's not obvious the
.add
methods don't mutate the object, for example, and that we shouldn't be using a var), so it'd be nice to document this somewhere (e.g. a cookbook).The text was updated successfully, but these errors were encountered: