Add example project folder
Getty Ritter
6 years ago
| 1 |
(document "main.md"
|
| 2 |
|
| 3 |
{
|
| 4 |
name "rust-sample"
|
| 5 |
dir "s1"
|
| 6 |
cmd [ "cargo clean" "cargo build" ]
|
| 7 |
expose (file "src/main.rs")
|
| 8 |
}
|
| 9 |
|
| 10 |
{
|
| 11 |
name "haskell-sample"
|
| 12 |
dir "s2"
|
| 13 |
cmd [ "cabal new-build" ]
|
| 14 |
expose (sections "Main.hs")
|
| 15 |
}
|
| 16 |
|
| 17 |
)⏎
|
| 1 |
Here is the full source of a Rust project:
|
| 2 |
|
| 3 |
```rust
|
| 4 |
«rust-sample»
|
| 5 |
```
|
| 6 |
|
| 7 |
And here are the split-apart chunks of a Haskell source file, starting with the header material
|
| 8 |
|
| 9 |
```haskell
|
| 10 |
«haskell-sample/front-matter»
|
| 11 |
```
|
| 12 |
|
| 13 |
And the main sources:
|
| 14 |
|
| 15 |
```haskell
|
| 16 |
«haskell-sample/functions»
|
| 17 |
```
|
| 1 |
[package]
|
| 2 |
name = "s1"
|
| 3 |
version = "0.1.0"
|
| 4 |
authors = ["Getty Ritter <gettylefou@gmail.com>"]
|
| 5 |
|
| 6 |
[dependencies]
|
| 1 |
fn main() {
|
| 2 |
println!("Hello, world!");
|
| 3 |
}
|
| 1 |
module Main where
|
| 2 |
|
| 3 |
main :: IO ()
|
| 4 |
main = return ()
|
| 1 |
name: s2
|
| 2 |
version: 0.1.0.0
|
| 3 |
-- synopsis:
|
| 4 |
-- description:
|
| 5 |
license: BSD3
|
| 6 |
author: Getty Ritter <gettylefou@gmail.com>
|
| 7 |
maintainer: Getty Ritter <gettylefou@gmail.com>
|
| 8 |
copyright: @2018 Getty Ritter
|
| 9 |
-- category:
|
| 10 |
build-type: Simple
|
| 11 |
cabal-version: >=1.14
|
| 12 |
|
| 13 |
executable s2
|
| 14 |
hs-source-dirs: .
|
| 15 |
main-is: Main.hs
|
| 16 |
default-language: Haskell2010
|
| 17 |
ghc-options: -Wall
|
| 18 |
build-depends: base >=4.7 && <5
|