Browse Source

Add example project folder

Getty Ritter 6 years ago
parent
commit
eded951711
7 changed files with 67 additions and 0 deletions
  1. 17 0
      example/collage
  2. 17 0
      example/main.md
  3. 2 0
      example/s1/.gitignore
  4. 6 0
      example/s1/Cargo.toml
  5. 3 0
      example/s1/src/main.rs
  6. 4 0
      example/s2/Main.hs
  7. 18 0
      example/s2/s2.cabal

+ 17 - 0
example/collage

@@ -0,0 +1,17 @@
+(document "main.md"
+
+  {
+    name "rust-sample"
+    dir "s1"
+    cmd [ "cargo clean" "cargo build" ]
+    expose (file "src/main.rs")
+  }
+
+  {
+    name "haskell-sample"
+    dir "s2"
+    cmd [ "cabal new-build" ]
+    expose (sections "Main.hs")
+  }
+
+)

+ 17 - 0
example/main.md

@@ -0,0 +1,17 @@
+Here is the full source of a Rust project:
+
+```rust
+«rust-sample»
+```
+
+And here are the split-apart chunks of a Haskell source file, starting with the header material
+
+```haskell
+«haskell-sample/front-matter»
+```
+
+And the main sources:
+
+```haskell
+«haskell-sample/functions»
+```

+ 2 - 0
example/s1/.gitignore

@@ -0,0 +1,2 @@
+Cargo.lock
+target

+ 6 - 0
example/s1/Cargo.toml

@@ -0,0 +1,6 @@
+[package]
+name = "s1"
+version = "0.1.0"
+authors = ["Getty Ritter <gettylefou@gmail.com>"]
+
+[dependencies]

+ 3 - 0
example/s1/src/main.rs

@@ -0,0 +1,3 @@
+fn main() {
+    println!("Hello, world!");
+}

+ 4 - 0
example/s2/Main.hs

@@ -0,0 +1,4 @@
+module Main where
+
+main :: IO ()
+main = return ()

+ 18 - 0
example/s2/s2.cabal

@@ -0,0 +1,18 @@
+name: s2
+version: 0.1.0.0
+-- synopsis:
+-- description:
+license: BSD3
+author: Getty Ritter <gettylefou@gmail.com>
+maintainer: Getty Ritter <gettylefou@gmail.com>
+copyright: @2018 Getty Ritter
+-- category:
+build-type: Simple
+cabal-version: >=1.14
+
+executable s2
+  hs-source-dirs: .
+  main-is: Main.hs
+  default-language: Haskell2010
+  ghc-options: -Wall
+  build-depends: base >=4.7 && <5