blob: 2c27b52956df13e7601c63a1fd7f86584b8beb22 (
plain)
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
|
#!/usr/bin/env stack
{- stack script --resolver lts-16.14 --install-ghc
--ghc-options -Wall --ghc-options -Wno-unused-imports -}
{-# language NoImplicitPrelude #-}
{-# language DuplicateRecordFields #-}
import Rebase.Prelude
import Control.Lens
type Inches = Rational
boardLength, boardThickness, kickerHeight, numShelves, numHorizontals, availableSpace :: Inches
boardLength = 6 * 12
boardThickness = 5/8
kickerHeight = 4
numShelves = 5
numHorizontals = numShelves + 1
availableSpace = boardLength - kickerHeight - numHorizontals * boardThickness
shelves :: [Rational]
shelves = [2%9, 2%9, 2%9, 1%6, 1%6]
main :: IO ()
main = do
_ <- return $ assert $ sum shelves == 1
print shelves
return ()
|