summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAndrew Cady <d@jerkface.net>2020-12-29 08:27:45 -0500
committerAndrew Cady <d@jerkface.net>2020-12-29 08:27:45 -0500
commit9357f8327450bb8fa64230e434e060f48338aaa7 (patch)
treeaf40f92bbc06f1ea6d75b2ce7466a3c16ed92bd1
init
-rwxr-xr-xmain.hs12
-rwxr-xr-xshelf.hs28
2 files changed, 40 insertions, 0 deletions
diff --git a/main.hs b/main.hs
new file mode 100755
index 0000000..beeb0f3
--- /dev/null
+++ b/main.hs
@@ -0,0 +1,12 @@
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
9main :: IO ()
10main = do
11 return ()
12
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 ()