packages feed

despair (empty) → 0.0.1

raw patch · 4 files changed

+95/−0 lines, 4 filesdep +basedep +randomsetup-changed

Dependencies added: base, random

Files

+ LICENSE view
@@ -0,0 +1,30 @@+Copyright 2014 Heather Cynede++All rights reserved.++Redistribution and use in source and binary forms, with or without+modification, are permitted provided that the following conditions+are met:++1. Redistributions of source code must retain the above copyright+   notice, this list of conditions and the following disclaimer.++2. Redistributions in binary form must reproduce the above copyright+   notice, this list of conditions and the following disclaimer in the+   documentation and/or other materials provided with the distribution.++3. Neither the name of the author nor the names of his contributors+   may be used to endorse or promote products derived from this software+   without specific prior written permission.++THIS SOFTWARE IS PROVIDED BY THE AUTHORS ``AS IS'' AND ANY EXPRESS OR+IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED+WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE+DISCLAIMED.  IN NO EVENT SHALL THE AUTHORS OR CONTRIBUTORS BE LIABLE FOR+ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL+DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS+OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)+HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,+STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN+ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE+POSSIBILITY OF SUCH DAMAGE.
+ Setup.hs view
@@ -0,0 +1,2 @@+import Distribution.Simple+main = defaultMain
+ despair.cabal view
@@ -0,0 +1,22 @@+name:       despair
+category:   Control
+version:    0.0.1
+author:        Heather Cynede
+maintainer:    Heather Cynede <Cynede@Gentoo.org>
+license: BSD3
+license-file: LICENSE
+synopsis: Despair
+description: Despair
+
+build-type: Simple
+cabal-version: >= 1.8
+
+library
+  Hs-Source-Dirs: src
+
+  exposed-modules:
+    Despair
+
+  Build-Depends:  
+    base >= 4.3 && < 5,
+    random
+ src/Despair.hs view
@@ -0,0 +1,41 @@+module Despair
+  ( despairQuote
+  , despair ) where
+
+import Control.Exception
+
+import System.Random (randomRIO)
+
+weakQuotes :: [String]
+weakQuotes = [
+    " This is the way the world ends. Not with a bang but a whimper.                             ",
+    "             Heaven Conceal                                                                 ",
+    "    I have long since closed my eyes... My only goal is in the darkness.                    ",
+    "              I want you to feel pain, to think about pain, to accept pain, to know pain.   ",
+    "     To hope for nothing, to expect nothing, to demand nothing. This is analytical despair. ",
+    "               Hope is a gift we give ourselves in our darkest despair.                     ",
+    "         Pain to the world                                                                  ",
+    "               Despair wishes their hope diminishes.                                        ",
+    "       Some stories end in despair, some begin there                                        ",
+    "               When You're Going Through the Hell, Just Keep Going                          ",
+    "                   There is no love of life without despair of life.                        ",
+    "                                           When all else is lost, the future still remains  ",
+    "                My life is a perfect graveyard of buried hopes.                             ",
+    "It is not despair, for despair is only for those who see the end beyond all doubt. We do not",
+    "     Schizophrenia cannot be understood without understanding despair                       ",
+    "                     To be Despair. It is a portrait. Only close your eyes and feel.        ",
+    "           Sadness is the ambrosia of all art.                                              ",
+    " You can't truly heal from a loss until you allow yourself to really FEEL the loss.         ",
+    "                   I can't shove the dark out of my way.                                    ",
+    "                         THERE IS NO LIGHT NO HOPE THERE IS ONLY DESPAIR!!!                 "
+    ]
+
+despairQuote :: IO()
+despairQuote = 
+    putStrLn =<< ( randomRIO (0, length weakQuotes - 1) 
+                     >>= return . (weakQuotes !!)
+                 )
+
+despair :: IO() -> IO()
+despair = bracket_ ( despairQuote )
+                   ( despairQuote )