on master help sign in
Fix missing imports in effects tutorial
commit11c5ceaa4ecce673428d6093621c1a963c2d05d7 authorEdwin Brady <ecb10@st-andrews.ac.uk> dateSat 21 Mar 2015, 14:04 (12 years ago) parent5bd490b
2 files changed+7−4
docs/effects/introduction.rst+6−4 docs/effects/state.rst+1
docs/effects/introduction.rst+6−4
@@ -63,6 +63,7 @@ library:
6363
6464 module Main
6565
66+ import Effects
6667 import Effect.StdIO
6768
6869 hello : [STDIO] Eff ()
@@ -71,10 +72,11 @@ library:
7172 main : IO ()
7273 main = run hello
7374
74−As usual, the entry point is ``main``. All ``main`` has to do is
75−invoke the ``hello`` function which supports the ``STDIO`` effect for
76−console I/O, and returns the unit value. The details of the ``Eff``
77−type will be presented in the remainder of this tutorial.
75+As usual, the entry point is ``main``. All ``main`` has to do is invoke the
76+``hello`` function which supports the ``STDIO`` effect for console I/O, and
77+returns the unit value. All programs using the ``Effects`` library must
78+``import Effects``. The details of the ``Eff`` type will be presented in the
79+remainder of this tutorial.
7880
7981To compile and run this program, ``Idris`` needs to be told to include
8082the ``Effects`` package, using the ``-p effects`` flag (this flag is
docs/effects/state.rst+1
@@ -183,6 +183,7 @@ shown in Listing [introprog].
183183
184184 module Main
185185
186+ import Effects
186187 import Effect.State
187188
188189 data BTree a = Leaf