-
Notifications
You must be signed in to change notification settings - Fork 12
/
recipe.lhs
53 lines (35 loc) · 887 Bytes
/
recipe.lhs
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
# -*- mode: snippet -*-
# name: recipe-cookbook
# expand-env: ((yas-indent-line 'fixed) (yas-wrap-around-region 'nil))
# key: recipe
# --
$0
=====================
<<< Write introduction to recipes here>>>
How do we do it...
------------------
<ul>
<li> Create new project *$1* with *simple* stack template.
~~~
stack new $1 simple
~~~
<li> Add dependency on xxxxx library in the *build-depends* sub-section of *executable* section.
~~~
executable $1
hs-source-dirs: src
main-is: Main.hs
default-language: Haskell2010
build-depends: base >= 4.7 && < 5
, xxxx
~~~
<li> Open *src/Main.hs*. We will be adding our source here.
<li>
<li> Build and execute the project.
~~~
stack build
stack exec -- $1
~~~
You should see following output,
</ul>
How did we do it...
-------------------