File: Load.hs

package info (click to toggle)
haskell-serialise 0.2.6.1-1
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid, trixie
  • size: 564 kB
  • sloc: haskell: 6,809; makefile: 6
file content (18 lines) | stat: -rw-r--r-- 368 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
{-# LANGUAGE BangPatterns #-}
module Micro.Load (mkBigTree, mkBigTrees) where

import Micro.Types
import Micro.ReadShow ()


mkBigTrees :: Int -> Int -> [Tree]
mkBigTrees n depth =
   let !tree = mkBigTree depth
    in replicate n tree

mkBigTree :: Int -> Tree
mkBigTree 0     = Leaf
mkBigTree depth =
  let !subtree = mkBigTree (depth-1)
   in Fork subtree subtree