summaryrefslogtreecommitdiff
path: root/shelf.hs
diff options
context:
space:
mode:
Diffstat (limited to 'shelf.hs')
-rwxr-xr-xshelf.hs28
1 files changed, 28 insertions, 0 deletions
diff --git a/shelf.hs b/shelf.hs
new file mode 100755
index 0000000..2c27b52
--- /dev/null
+++ b/shelf.hs
@@ -0,0 +1,28 @@
1#!/usr/bin/env stack
2{- stack script --resolver lts-16.14 --install-ghc
3 --ghc-options -Wall --ghc-options -Wno-unused-imports -}
4{-# language NoImplicitPrelude #-}
5{-# language DuplicateRecordFields #-}
6import Rebase.Prelude
7import Control.Lens
8
9type Inches = Rational
10
11boardLength, boardThickness, kickerHeight, numShelves, numHorizontals, availableSpace :: Inches
12boardLength = 6 * 12
13boardThickness = 5/8
14kickerHeight = 4
15numShelves = 5
16
17numHorizontals = numShelves + 1
18availableSpace = boardLength - kickerHeight - numHorizontals * boardThickness
19
20shelves :: [Rational]
21shelves = [2%9, 2%9, 2%9, 1%6, 1%6]
22
23
24main :: IO ()
25main = do
26 _ <- return $ assert $ sum shelves == 1
27 print shelves
28 return ()