From d8571e554eb52067b44d28de27ee004840913a5c Mon Sep 17 00:00:00 2001 From: Adithya Kumar Date: Wed, 15 Mar 2023 02:34:35 +0530 Subject: [PATCH] Add attributes on a code block in docs in a consistent way --- docs/User/Explanatory/Overview.md | 40 +++++++++---------- docs/User/Explanatory/unified-abstractions.md | 10 ++--- docs/User/HowTo/faq.md | 12 +++--- docs/User/HowTo/streamly-vs-async.md | 30 +++++++------- docs/User/HowTo/streamly-vs-lists.md | 4 +- docs/User/ProjectRelated/Upgrading.md | 26 ++++++------ .../User/Tutorials/haskell-lazy-evaluation.md | 10 ++--- docs/User/Tutorials/quick-overview.md | 26 ++++++------ docs/User/Tutorials/setup-and-usage.md | 2 +- 9 files changed, 80 insertions(+), 80 deletions(-) diff --git a/docs/User/Explanatory/Overview.md b/docs/User/Explanatory/Overview.md index d9709d3be6..adb015b5b0 100644 --- a/docs/User/Explanatory/Overview.md +++ b/docs/User/Explanatory/Overview.md @@ -118,7 +118,7 @@ The following snippet provides a simple stream composition example that reads numbers from stdin, prints the squares of even numbers and exits if an even number more than 9 is entered. -``` haskell +```{.haskell} import qualified Streamly.Prelude as S import Data.Function ((&)) @@ -149,7 +149,7 @@ The following code finishes in 3 seconds (6 seconds when serial), note the order of elements in the resulting output, the outputs are consumed as soon as each action is finished (asyncly): -``` haskell +```{.haskell} > let p n = threadDelay (n * 1000000) >> return n > S.toList $ S.fromAsync $ p 3 |: p 2 |: p 1 |: S.nil [1,2,3] @@ -158,7 +158,7 @@ each action is finished (asyncly): Use `fromAhead` if you want speculative concurrency i.e. execute the actions in the stream concurrently but consume the results in the specified order: -``` haskell +```{.haskell} > S.toList $ S.fromAhead $ p 3 |: p 2 |: p 1 |: S.nil [3,2,1] ``` @@ -168,7 +168,7 @@ Monadic stream generation functions e.g. `unfoldrM`, `replicateM`, `repeatM`, The following finishes in 10 seconds (100 seconds when serial): -``` haskell +```{.haskell} S.drain $ S.fromAsync $ S.replicateM 10 $ p 10 ``` @@ -179,7 +179,7 @@ following example prints a "hello" every second; if you use `&` instead of `|&` you will see that the delay doubles to 2 seconds instead because of serial application. -``` haskell +```{.haskell} main = S.drain $ S.repeatM (threadDelay 1000000 >> return "hello") |& S.mapM (\x -> threadDelay 1000000 >> putStrLn x) @@ -189,7 +189,7 @@ main = S.drain $ We can use `mapM` or `sequence` functions concurrently on a stream. -``` haskell +```{.haskell} > let p n = threadDelay (n * 1000000) >> return n > S.drain $ S.fromAhead $ S.mapM (\x -> p 1 >> print x) (S.fromSerial $ S.repeatM (p 1)) ``` @@ -201,7 +201,7 @@ concurrently. In the following example we compose ten actions in the stream, each with a delay of 1 to 10 seconds, respectively. Since all the actions are concurrent we see one output printed every second: -``` haskell +```{.haskell} import qualified Streamly.Prelude as S import Control.Concurrent (threadDelay) @@ -213,7 +213,7 @@ Streams can be combined together in many ways. We provide some examples below, see the tutorial for more ways. We use the following `delay` function in the examples to demonstrate the concurrency aspects: -``` haskell +```{.haskell} import qualified Streamly.Prelude as S import Control.Concurrent @@ -224,7 +224,7 @@ delay n = S.fromEffect $ do ``` ### Serial -``` haskell +```{.haskell} main = S.drain $ delay 3 <> delay 2 <> delay 1 ``` ``` @@ -235,7 +235,7 @@ ThreadId 36: Delay 1 ### Parallel -``` haskell +```{.haskell} main = S.drain . S.fromParallel $ delay 3 <> delay 2 <> delay 1 ``` ``` @@ -248,7 +248,7 @@ ThreadId 40: Delay 3 The monad instance composes like a list monad. -``` haskell +```{.haskell} import qualified Streamly.Prelude as S loops = do @@ -271,7 +271,7 @@ To run the above code with speculative concurrency i.e. each iteration in the loop can run concurrently but the results are presented to the consumer of the output in the same order as serial execution: -``` haskell +```{.haskell} main = S.drain $ S.fromAhead $ loops ``` @@ -287,7 +287,7 @@ concurrently using combinators like `fromAsync`, `parallelly`. For example, to concurrently generate squares of a stream of numbers and then concurrently sum the square roots of all combinations of two streams: -``` haskell +```{.haskell} import qualified Streamly.Prelude as S main = do @@ -305,7 +305,7 @@ main = do For bounded concurrent streams, stream yield rate can be specified. For example, to print hello once every second you can simply write this: -``` haskell +```{.haskell} import Streamly.Prelude as S main = S.drain $ S.fromAsync $ S.avgRate 1 $ S.repeatM $ putStrLn "hello" @@ -372,7 +372,7 @@ to keep them short and elegant. Source file [CoreUtilsHandle.hs](https://github.com/composewell/streamly-examples/blob/master/examples/CoreUtilsHandle.hs) in the examples directory includes these examples. -``` haskell +```{.haskell} module Main where import qualified Streamly.Prelude as S @@ -399,28 +399,28 @@ withArg2 f = do ### cat -``` haskell +```{.haskell} cat = S.fold (FH.writeChunks stdout) . S.unfold FH.readChunks main = withArg cat ``` ### cp -``` haskell +```{.haskell} cp src dst = S.fold (FH.writeChunks dst) $ S.unfold FH.readChunks src main = withArg2 cp ``` ### wc -l -``` haskell +```{.haskell} wcl = S.length . S.splitOn (== 10) FL.drain . S.unfold FH.read main = withArg wcl >>= print ``` ### Average Line Length -``` haskell +```{.haskell} avgll = S.fold avg . S.splitOn (== 10) FL.length @@ -437,7 +437,7 @@ main = withArg avgll >>= print `classify` is not released yet, and is available in `Streamly.Internal.Data.Fold` -``` haskell +```{.haskell} llhisto = S.fold (FL.classify FL.length) . S.map bucket diff --git a/docs/User/Explanatory/unified-abstractions.md b/docs/User/Explanatory/unified-abstractions.md index d51f8cbddd..5efa82357e 100644 --- a/docs/User/Explanatory/unified-abstractions.md +++ b/docs/User/Explanatory/unified-abstractions.md @@ -79,7 +79,7 @@ API. This simple console echo program shows the simplicity of Streamly API and its similarity with the list API: -```haskell +```{.haskell} echo = Stream.repeatM getLine & Stream.mapM putStrLn @@ -110,7 +110,7 @@ to the list monad. It provides the functionality provided by `list-t` or `logict` packages for free. Here is an example of nested looping using the serial stream monad: -```haskell +```{.haskell} import qualified Streamly.Prelude as S loops = do @@ -146,7 +146,7 @@ scheduling behavior. The example from the previous section can be run with interleaved scheduling behavior as follows, without changing the code at all: -```haskell +```{.haskell} main = Stream.drain $ Stream.fromWserial loops ``` @@ -171,14 +171,14 @@ style. The list transformer example can be run with concurrent execution of loop iterations as follows, without changing the code at all: -```haskell +```{.haskell} main = Stream.drain $ Stream.fromAhead loops ``` And interleaving with concurrent execution of the loop iterations can be written like this: -```haskell +```{.haskell} main = Stream.drain $ Stream.fromWAsync loops ``` diff --git a/docs/User/HowTo/faq.md b/docs/User/HowTo/faq.md index 64346c062a..3d69752058 100644 --- a/docs/User/HowTo/faq.md +++ b/docs/User/HowTo/faq.md @@ -13,7 +13,7 @@ together to create a single transformed stream. Distributing a value to a stream of consumers concurrently: -```haskell ghci +```{.haskell mode=ghci} {-# LANGUAGE FlexibleContexts #-} import Data.Function ((&)) @@ -30,7 +30,7 @@ f1 x = Use `parApply` to zip streams concurrently. Here, we zip three singleton streams: -```haskell ghci +```{.haskell mode=ghci} f2 x = let app = Stream.parApply id @@ -43,7 +43,7 @@ f2 x = Applying a function concurrently to your input stream: -```haskell ghci +```{.haskell mode=ghci} g f xs = Stream.fromList xs & Stream.parMapM (Stream.ordered True) f @@ -53,7 +53,7 @@ g f xs = You can now use the concurrent map to pipe each element through multiple transformations using the distribute/zip operations. -```haskell docspec +```{.haskell mode=docspec} >>> g f1 [1,2,3,4::Int] [[2,3],[3,4],[4,5],[5,6]] @@ -65,7 +65,7 @@ Instead of using `parApply` directly, you can use `mkZipType` to create a zip Applicative newtype so that you can use the `Applicative` instance. -```haskell +```{.haskell} {-# LANGUAGE UndecidableInstances #-} {-# LANGUAGE FlexibleInstances #-} {-# LANGUAGE MultiParamTypeClasses #-} @@ -81,7 +81,7 @@ $(mkZippingType "ZipConcurrent" "app" True) The `writeLastN` fold can be used to create a stream of sliding windows. -```haskell docspec +```{.haskell mode=docspec} >>> import qualified Streamly.Data.Array as Array >>> :{ Stream.fromList [1,2,3,4,5::Int] diff --git a/docs/User/HowTo/streamly-vs-async.md b/docs/User/HowTo/streamly-vs-async.md index 7ff234b50d..a5c6cb4c66 100644 --- a/docs/User/HowTo/streamly-vs-async.md +++ b/docs/User/HowTo/streamly-vs-async.md @@ -47,7 +47,7 @@ stream folding operations can also be used, see the docs for more details. Use the following imports to run the snippets shown below: -```haskell +```{.haskell} import Streamly import Streamly.Prelude ((|:)) import qualified Streamly.Prelude as S @@ -58,7 +58,7 @@ import Control.Concurrent (threadDelay) Let us simulate a URL fetch with a delay of `n` seconds using the following functions: -```haskell +```{.haskell} getURL :: Int -> IO String getURL n = threadDelay (n * 1000000) >> return (show n) getURLString = getURL @@ -70,7 +70,7 @@ getURLText n = getURL n >>= return . Text.pack You can run any number of actions concurrently. For example, to fetch two URLs concurrently: -```haskell +```{.haskell} urls <- S.toList $ fromParallel $ getURL 2 |: getURL 1 |: S.nil ``` @@ -80,7 +80,7 @@ using `fromAhead` instead. In the following example both URLs are fetched concurrently, and even though URL 1 arrives before URL 2 the results will return 2 first and then 1. -```haskell +```{.haskell} urls <- S.toList $ fromAhead $ getURL 2 |: getURL 1 |: S.nil ``` @@ -88,7 +88,7 @@ return 2 first and then 1. Use `drain` instead of `toList` to run the actions but ignore the results: -```haskell +```{.haskell} S.drain $ fromParallel $ getURL 1 |: getURL 2 |: S.nil ``` @@ -98,7 +98,7 @@ If the actions that you are executing result in different output types you can use applicative zip to collect the results or to directly apply them to a function: -```haskell +```{.haskell} tuples <- S.toList $ fromZipAsync $ (,) <$> S.fromEffect (getURLString 1) <*> S.fromEffect (getURLText 2) ``` @@ -113,14 +113,14 @@ exceptions. We can run multiple actions concurrently and take the first result that arrives: -```haskell +```{.haskell} urls <- S.toList $ S.take 1 $ fromParallel $ getURL 1 |: getURL 2 |: S.nil ``` After the first result arrives, the rest of the actions are canceled automatically. In general, we can take first `n` results as they arrive: -```haskell +```{.haskell} urls <- S.toList $ S.take 2 $ fromParallel $ getURL 1 |: getURL 2 |: S.nil ``` @@ -132,7 +132,7 @@ implement the race functionality. Each action in the stream can use an exception to communicate the result. As soon as the first result arrives all other actions will be canceled, for example: -```haskell +```{.haskell} data Result = Result String deriving Show instance Exception Result @@ -153,21 +153,21 @@ There are many ways to map concurrently on a container and collect the results: You can create a concurrent stream from a `Foldable` container of monadic actions: -```haskell +```{.haskell} urls <- S.toList $ fromAhead $ S.fromFoldableM $ fmap getURL [1..3] ``` You can first convert a `Foldable` into a stream and then map an action on the stream concurrently: -```haskell +```{.haskell} urls <- S.toList $ fromAhead $ S.mapM getURL $ foldMap return [1..3] ``` You can map a monadic action to a `Foldable` container to convert it into a stream and at the same time fold it: -```haskell +```{.haskell} urls <- S.toList $ fromAhead $ foldMap (S.fromEffect . getURL) [1..3] ``` @@ -179,7 +179,7 @@ Streamly has not just the equivalent of `replicateConcurrently` which is [Streamly.Prelude](https://hackage.haskell.org/package/streamly/docs/Streamly-Prelude.html) module documentation for more details. -```haskell +```{.haskell} xs <- S.toList $ fromParallel $ S.replicateM 2 $ getURL 1 ``` @@ -190,13 +190,13 @@ concurrently. To map serially just use `fmap`: -```haskell +```{.haskell} xs <- S.toList $ fromParallel $ fmap (+1) $ return 1 |: return 2 |: S.nil ``` To map a monadic action concurrently on all elements of the stream use `mapM`: -```haskell +```{.haskell} xs <- S.toList $ fromParallel $ S.mapM (\x -> return (x + 1)) $ return 1 |: return 2 |: S.nil ``` diff --git a/docs/User/HowTo/streamly-vs-lists.md b/docs/User/HowTo/streamly-vs-lists.md index be0f36ec79..874730477f 100644 --- a/docs/User/HowTo/streamly-vs-lists.md +++ b/docs/User/HowTo/streamly-vs-lists.md @@ -199,7 +199,7 @@ modifying combinator, without any other change to the code. The following code prints one element every second: -```haskell +```{.haskell} import Control.Concurrent import Streamly import qualified Streamly.Prelude as S @@ -210,7 +210,7 @@ main = runStream func To run it concurrently, just run the same code with `fromAsync` combinator: -```haskell +```{.haskell} main = runStream $ fromAsync func ``` diff --git a/docs/User/ProjectRelated/Upgrading.md b/docs/User/ProjectRelated/Upgrading.md index 15f7612fee..ab6c4c0ab6 100644 --- a/docs/User/ProjectRelated/Upgrading.md +++ b/docs/User/ProjectRelated/Upgrading.md @@ -36,7 +36,7 @@ release. Assume the following imports in the code snippets below: -```haskell docspec +```{.haskell mode=docspec} >>> import qualified Streamly.Data.Stream as Stream >>> import qualified Streamly.Data.StreamK as StreamK >>> import qualified Streamly.Data.Stream.Prelude as Stream @@ -78,7 +78,7 @@ from the stream module. `adapt` is not needed anymore. -```haskell docspec +```{.haskell mode=docspec} >>> (.:) = StreamK.cons >>> cons = StreamK.cons >>> wSerial = StreamK.interleave @@ -95,7 +95,7 @@ from the stream module. Explicit stream fold functions have been omitted from the new stream module. You can use the following equivalent definitions: -```haskell docspec +```{.haskell mode=docspec} >>> the = Stream.fold Fold.the >>> sum = Stream.fold Fold.sum >>> product = Stream.fold Fold.product @@ -132,14 +132,14 @@ module. You can use the following equivalent definitions: Mapping functions: -```haskell docspec +```{.haskell mode=docspec} >>> map = fmap ``` Similarly for scanning use `Stream.scan` or `Stream.postscan` with an appropriate fold. -```haskell docspec +```{.haskell mode=docspec} >>> scanl' f z = Stream.scan (Fold.foldl' f z) >>> scanlM' f z = Stream.scan (Fold.foldlM' f z) >>> postscanl' f z = Stream.postscan (Fold.foldl' f z) @@ -154,7 +154,7 @@ with an appropriate fold. Filters: -```haskell docspec +```{.haskell mode=docspec} >>> deleteBy cmp x = Stream.scanMaybe (Fold.deleteBy cmp x) >>> findIndices p = Stream.scanMaybe (Fold.findIndices p) >>> elemIndices a = findIndices (== a) @@ -171,7 +171,7 @@ now be implemented using `foldMany` and an appropriate fold from the `Streamly.Data.Fold` module, or using `parseMany` and an appropriate parser from the `Streamly.Data.Parser` module. -```haskell docspec +```{.haskell mode=docspec} >>> uniq = Stream.scanMaybe (Fold.uniqBy (==)) >>> splitWithSuffix p f = Stream.foldMany (Fold.takeEndBy p f) >>> splitOn = Streamly.Internal.Data.Stream.splitOn @@ -212,7 +212,7 @@ instead of being applied on the stream. A stream is evaluated asynchronously using `parEval`: -```haskell docspec +```{.haskell mode=docspec} >>> :set -XFlexibleContexts >>> mkAsync = Stream.parEval id ``` @@ -222,7 +222,7 @@ actions. In the new release, an equivalent effect is achieved by using a serial `consM` to create a stream of actions and then explicitly using `Stream.parEval` on it to evaluate it concurrently. -```haskell docspec +```{.haskell mode=docspec} >>> consM = StreamK.consM >>> (|:) = consM ``` @@ -232,7 +232,7 @@ before using `parEval` on it. Existing generation combinators that can be implemented using new primitives: -```haskell docspec +```{.haskell mode=docspec} >>> repeatM = Stream.parRepeatM >>> replicateM = Stream.parReplicateM >>> unfoldrM step = Stream.parEval id . Stream.unfoldrM step @@ -244,7 +244,7 @@ Existing generation combinators that can be implemented using new primitives: Existing transformation combinators that can be implemented using `parEval`: -```haskell docspec +```{.haskell mode=docspec} >>> (|$.) f = f . Stream.parEval id >>> (|&.) = flip (|$.) >>> (|$) f = f . Stream.parEval id @@ -256,7 +256,7 @@ Existing transformation combinators that can be implemented using `parEval`: `parList` is used to evaluate multiple streams concurrently and combine the outputs. Existing combinators that can be implemented using `parList`: -```haskell docspec +```{.haskell mode=docspec} >>> async x y = Stream.parList id [x, y] >>> wAsync x y = Stream.parList (Stream.interleaved True) [x, y] >>> parallel x y = Stream.parList (Stream.eager True) [x, y] @@ -265,7 +265,7 @@ outputs. Existing combinators that can be implemented using `parList`: Concurrent zipping and merging combinators: -```haskell docspec +```{.haskell mode=docspec} >>> zipAsyncWithM = Stream.parZipWith id >>> zipAsyncWith = Stream.parZipWith id >>> mergeAsyncByM = Stream.parMergeByM id diff --git a/docs/User/Tutorials/haskell-lazy-evaluation.md b/docs/User/Tutorials/haskell-lazy-evaluation.md index 0033033b44..294e3b0b4b 100644 --- a/docs/User/Tutorials/haskell-lazy-evaluation.md +++ b/docs/User/Tutorials/haskell-lazy-evaluation.md @@ -62,7 +62,7 @@ we have to print something, or write it to a file or to network. Let us illustrate expression evaluation in Haskell with an example. Write this little program in a file `example.hs`: -```haskell +```{.haskell} main = let largeList = [1..1000000::Int] n = length largeList @@ -98,7 +98,7 @@ references to it in the entire program. Let's try this program instead: -```haskell +```{.haskell} main = do let largeList = [1..1000000::Int] x1 = last largeList @@ -137,7 +137,7 @@ Even if there is no explicit dependency in the program forcing evaluation of an expression, the programmer can force the evaluation of an expression using `seq`: -```haskell +```{.haskell} main = do let largeList = [1..1000000::Int] x1 = last largeList @@ -158,7 +158,7 @@ retention in the above program. Let's first write it using streamly and reproduce the same problem: -```haskell +```{.haskell} import Data.Functor.Identity (runIdentity) import qualified Streamly.Data.Stream as Stream import qualified Streamly.Data.Fold as Fold @@ -186,7 +186,7 @@ However, we can compose the two folds using the `teeWith` combinator such that we distribute a each element of the list to both the folds simultaneously, thus avoiding the retainment of the entire list: -```haskell +```{.haskell} import Data.Functor.Identity (runIdentity) import qualified Streamly.Data.Stream as Stream import qualified Streamly.Data.Fold as Fold diff --git a/docs/User/Tutorials/quick-overview.md b/docs/User/Tutorials/quick-overview.md index c8c0dc37b3..0872f1e2e7 100644 --- a/docs/User/Tutorials/quick-overview.md +++ b/docs/User/Tutorials/quick-overview.md @@ -67,7 +67,7 @@ program. We start with a code fragment that counts the number of bytes in a file: -```haskell ghci +```{.haskell mode=ghci} import Data.Function ((&)) import qualified Streamly.Data.Fold as Fold @@ -84,7 +84,7 @@ wcb file = The next code fragment shows how to count the number of lines in a file: -```haskell ghci +```{.haskell mode=ghci} import Data.Word (Word8) import Streamly.Data.Fold (Fold) @@ -107,7 +107,7 @@ wcl file = Our final code fragment counts the number of whitespace-separated words in a stream: -```haskell ghci +```{.haskell mode=ghci} import Data.Char (chr, isSpace) countw :: (Int, Bool) -> Word8 -> (Int, Bool) @@ -135,7 +135,7 @@ to all the supplied folds (`Fold.length`, `nlines`, and `nwords`) and then combines the outputs from the folds using the supplied combiner function (`(,,)`). -```haskell ghci +```{.haskell mode=ghci} import Streamly.Data.Fold (Tee(..)) -- The fold accepts a stream of `Word8` and returns the three counts. @@ -194,7 +194,7 @@ code for this example, including the imports that we have omitted below. First we create a new data type `Counts` that holds all the context. -```haskell ghci +```{.haskell mode=ghci} -- Counts lines words chars lastCharWasSpace data Counts = Counts !Int !Int !Int !Bool deriving Show @@ -211,7 +211,7 @@ count (Counts l w c wasSpace) ch = The `countArray` function counts the line, word, char counts in one chunk: -```haskell ghci +```{.haskell mode=ghci} import Streamly.Data.Array (Array) import qualified Streamly.Data.Array as Array @@ -234,7 +234,7 @@ whether the chunk starts with a new word. The `partialCounts` function adds a `Bool` flag to `Counts` returned by `countArray` to indicate whether the first character in the chunk is a space. -```haskell ghci +```{.haskell mode=ghci} partialCounts :: Array Word8 -> IO (Bool, Counts) partialCounts arr = do let r = Array.getIndex 0 arr @@ -247,7 +247,7 @@ partialCounts arr = do `addCounts` then adds the counts from two consecutive chunks: -```haskell ghci +```{.haskell mode=ghci} addCounts :: (Bool, Counts) -> (Bool, Counts) -> (Bool, Counts) addCounts (sp1, Counts l1 w1 c1 ws1) (sp2, Counts l2 w2 c2 ws2) = let wcount = @@ -261,7 +261,7 @@ To count in parallel we now only need to divide the stream into arrays, apply our counting function to each array, and then combine the counts from each chunk. -```haskell ghci +```{.haskell mode=ghci} {-# LANGUAGE FlexibleContexts #-} import GHC.Conc (numCapabilities) @@ -315,7 +315,7 @@ clients concurrently. Please see the file [WordServer.hs][] for the complete code for this example. -```haskell ghci +```{.haskell mode=ghci} import Control.Concurrent (threadDelay) import Control.Exception (finally) import Network.Socket (Socket, close) @@ -373,7 +373,7 @@ streams concurrently. Please see the file [MergeServer.hs][] for the complete working code, including the imports that we have omitted below. -```haskell ghci +```{.haskell mode=ghci} {-# LANGUAGE FlexibleContexts #-} import Streamly.Data.Stream (Stream) @@ -427,7 +427,7 @@ results in a concurrent recursive depth first traversal of the directory tree. Please see [ListDir.hs][] for the complete working code. -```haskell ghci +```{.haskell mode=ghci} import System.IO (stdout, hSetBuffering, BufferMode(LineBuffering)) import qualified Streamly.Internal.FileSystem.Dir as Dir (readEitherPaths) @@ -445,7 +445,7 @@ main = do For concurrent streams, a stream evaluation rate can be specified. For example, to print "tick" once every second you can simply write: -```haskell ghci +```{.haskell mode=ghci} import qualified Streamly.Internal.Data.Stream as Stream (timestamped) main :: IO () diff --git a/docs/User/Tutorials/setup-and-usage.md b/docs/User/Tutorials/setup-and-usage.md index 356e9175bc..61003f1972 100644 --- a/docs/User/Tutorials/setup-and-usage.md +++ b/docs/User/Tutorials/setup-and-usage.md @@ -151,7 +151,7 @@ standalone program. Edit `app/Main.hs` to contain the following: -```haskell +```{.haskell} module Main where import qualified Streamly.Data.Stream as Stream