-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Testing cabal project with Random library
- Loading branch information
Anastasios Valtinos
committed
Oct 7, 2022
1 parent
4f048c9
commit a5a6f97
Showing
20 changed files
with
261 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
# Revision history for Chapter23-State | ||
|
||
## 0.1.0.0 -- YYYY-mm-dd | ||
|
||
* First version. Released on an unsuspecting world. |
36 changes: 36 additions & 0 deletions
36
Haskell Excercises & Code/Chapter23 - State/Chapter23-State.cabal
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,36 @@ | ||
cabal-version: 2.4 | ||
name: Chapter23-State | ||
version: 0.1.0.0 | ||
|
||
-- A short (one-line) description of the package. | ||
-- synopsis: | ||
|
||
-- A longer description of the package. | ||
-- description: | ||
|
||
-- A URL where users can report bugs. | ||
-- bug-reports: | ||
|
||
-- The license under which the package is released. | ||
-- license: | ||
author: Anastasios Valtinos | ||
maintainer: anastasios.valtinos@trint.com | ||
|
||
-- A copyright notice. | ||
-- copyright: | ||
-- category: | ||
extra-source-files: CHANGELOG.md | ||
|
||
executable testingState | ||
main-is: StateTest.hs | ||
|
||
-- Modules included in this executable, other than Main. | ||
-- other-modules: | ||
|
||
-- LANGUAGE extensions used by modules in this package. | ||
-- other-extensions: | ||
build-depends: base ^>=4.16.0.0, | ||
hspec, | ||
random | ||
hs-source-dirs: app | ||
default-language: Haskell2010 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
module Main where | ||
|
||
main :: IO () | ||
main = putStrLn "Hello, Haskell!" |
11 changes: 11 additions & 0 deletions
11
Haskell Excercises & Code/Chapter23 - State/app/StateTest.hs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
module StateTest where | ||
import System.Random | ||
-- Six-sided die | ||
data Die = | ||
DieOne | ||
| DieTwo | ||
| DieThree | ||
| DieFour | ||
| DieFive | ||
| DieSix | ||
deriving (Eq, Show) |
74 changes: 74 additions & 0 deletions
74
...hapter23-State-0.1.0.0/x/testingState/build/testingState/autogen/Paths_Chapter23_State.hs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,74 @@ | ||
{-# LANGUAGE CPP #-} | ||
{-# LANGUAGE NoRebindableSyntax #-} | ||
{-# OPTIONS_GHC -fno-warn-missing-import-lists #-} | ||
{-# OPTIONS_GHC -w #-} | ||
module Paths_Chapter23_State ( | ||
version, | ||
getBinDir, getLibDir, getDynLibDir, getDataDir, getLibexecDir, | ||
getDataFileName, getSysconfDir | ||
) where | ||
|
||
|
||
import qualified Control.Exception as Exception | ||
import qualified Data.List as List | ||
import Data.Version (Version(..)) | ||
import System.Environment (getEnv) | ||
import Prelude | ||
|
||
|
||
#if defined(VERSION_base) | ||
|
||
#if MIN_VERSION_base(4,0,0) | ||
catchIO :: IO a -> (Exception.IOException -> IO a) -> IO a | ||
#else | ||
catchIO :: IO a -> (Exception.Exception -> IO a) -> IO a | ||
#endif | ||
|
||
#else | ||
catchIO :: IO a -> (Exception.IOException -> IO a) -> IO a | ||
#endif | ||
catchIO = Exception.catch | ||
|
||
version :: Version | ||
version = Version [0,1,0,0] [] | ||
|
||
getDataFileName :: FilePath -> IO FilePath | ||
getDataFileName name = do | ||
dir <- getDataDir | ||
return (dir `joinFileName` name) | ||
|
||
getBinDir, getLibDir, getDynLibDir, getDataDir, getLibexecDir, getSysconfDir :: IO FilePath | ||
|
||
|
||
|
||
bindir, libdir, dynlibdir, datadir, libexecdir, sysconfdir :: FilePath | ||
bindir = "C:\\Users\\Administrator\\AppData\\Roaming\\cabal\\bin" | ||
libdir = "C:\\Users\\Administrator\\AppData\\Roaming\\cabal\\x86_64-windows-ghc-9.2.1\\Chapter23-State-0.1.0.0-inplace-testingState" | ||
dynlibdir = "C:\\Users\\Administrator\\AppData\\Roaming\\cabal\\x86_64-windows-ghc-9.2.1" | ||
datadir = "C:\\Users\\Administrator\\AppData\\Roaming\\cabal\\x86_64-windows-ghc-9.2.1\\Chapter23-State-0.1.0.0" | ||
libexecdir = "C:\\Users\\Administrator\\AppData\\Roaming\\cabal\\Chapter23-State-0.1.0.0-inplace-testingState\\x86_64-windows-ghc-9.2.1\\Chapter23-State-0.1.0.0" | ||
sysconfdir = "C:\\Users\\Administrator\\AppData\\Roaming\\cabal\\etc" | ||
|
||
getBinDir = catchIO (getEnv "Chapter23_State_bindir") (\_ -> return bindir) | ||
getLibDir = catchIO (getEnv "Chapter23_State_libdir") (\_ -> return libdir) | ||
getDynLibDir = catchIO (getEnv "Chapter23_State_dynlibdir") (\_ -> return dynlibdir) | ||
getDataDir = catchIO (getEnv "Chapter23_State_datadir") (\_ -> return datadir) | ||
getLibexecDir = catchIO (getEnv "Chapter23_State_libexecdir") (\_ -> return libexecdir) | ||
getSysconfDir = catchIO (getEnv "Chapter23_State_sysconfdir") (\_ -> return sysconfdir) | ||
|
||
|
||
|
||
|
||
joinFileName :: String -> String -> FilePath | ||
joinFileName "" fname = fname | ||
joinFileName "." fname = fname | ||
joinFileName dir "" = dir | ||
joinFileName dir fname | ||
| isPathSeparator (List.last dir) = dir ++ fname | ||
| otherwise = dir ++ pathSeparator : fname | ||
|
||
pathSeparator :: Char | ||
pathSeparator = '\\' | ||
|
||
isPathSeparator :: Char -> Bool | ||
isPathSeparator c = c == '/' || c == '\\' |
130 changes: 130 additions & 0 deletions
130
...hc-9.2.1/Chapter23-State-0.1.0.0/x/testingState/build/testingState/autogen/cabal_macros.h
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,130 @@ | ||
/* DO NOT EDIT: This file is automatically generated by Cabal */ | ||
|
||
/* package Chapter23-State-0.1.0.0 */ | ||
#ifndef VERSION_Chapter23_State | ||
#define VERSION_Chapter23_State "0.1.0.0" | ||
#endif /* VERSION_Chapter23_State */ | ||
#ifndef MIN_VERSION_Chapter23_State | ||
#define MIN_VERSION_Chapter23_State(major1,major2,minor) (\ | ||
(major1) < 0 || \ | ||
(major1) == 0 && (major2) < 1 || \ | ||
(major1) == 0 && (major2) == 1 && (minor) <= 0) | ||
#endif /* MIN_VERSION_Chapter23_State */ | ||
/* package base-4.16.0.0 */ | ||
#ifndef VERSION_base | ||
#define VERSION_base "4.16.0.0" | ||
#endif /* VERSION_base */ | ||
#ifndef MIN_VERSION_base | ||
#define MIN_VERSION_base(major1,major2,minor) (\ | ||
(major1) < 4 || \ | ||
(major1) == 4 && (major2) < 16 || \ | ||
(major1) == 4 && (major2) == 16 && (minor) <= 0) | ||
#endif /* MIN_VERSION_base */ | ||
/* package hspec-2.9.2 */ | ||
#ifndef VERSION_hspec | ||
#define VERSION_hspec "2.9.2" | ||
#endif /* VERSION_hspec */ | ||
#ifndef MIN_VERSION_hspec | ||
#define MIN_VERSION_hspec(major1,major2,minor) (\ | ||
(major1) < 2 || \ | ||
(major1) == 2 && (major2) < 9 || \ | ||
(major1) == 2 && (major2) == 9 && (minor) <= 2) | ||
#endif /* MIN_VERSION_hspec */ | ||
/* package random-1.2.1.1 */ | ||
#ifndef VERSION_random | ||
#define VERSION_random "1.2.1.1" | ||
#endif /* VERSION_random */ | ||
#ifndef MIN_VERSION_random | ||
#define MIN_VERSION_random(major1,major2,minor) (\ | ||
(major1) < 1 || \ | ||
(major1) == 1 && (major2) < 2 || \ | ||
(major1) == 1 && (major2) == 2 && (minor) <= 1) | ||
#endif /* MIN_VERSION_random */ | ||
|
||
/* tool gcc-10.2.0 */ | ||
#ifndef TOOL_VERSION_gcc | ||
#define TOOL_VERSION_gcc "10.2.0" | ||
#endif /* TOOL_VERSION_gcc */ | ||
#ifndef MIN_TOOL_VERSION_gcc | ||
#define MIN_TOOL_VERSION_gcc(major1,major2,minor) (\ | ||
(major1) < 10 || \ | ||
(major1) == 10 && (major2) < 2 || \ | ||
(major1) == 10 && (major2) == 2 && (minor) <= 0) | ||
#endif /* MIN_TOOL_VERSION_gcc */ | ||
/* tool ghc-9.2.1 */ | ||
#ifndef TOOL_VERSION_ghc | ||
#define TOOL_VERSION_ghc "9.2.1" | ||
#endif /* TOOL_VERSION_ghc */ | ||
#ifndef MIN_TOOL_VERSION_ghc | ||
#define MIN_TOOL_VERSION_ghc(major1,major2,minor) (\ | ||
(major1) < 9 || \ | ||
(major1) == 9 && (major2) < 2 || \ | ||
(major1) == 9 && (major2) == 2 && (minor) <= 1) | ||
#endif /* MIN_TOOL_VERSION_ghc */ | ||
/* tool ghc-pkg-9.2.1 */ | ||
#ifndef TOOL_VERSION_ghc_pkg | ||
#define TOOL_VERSION_ghc_pkg "9.2.1" | ||
#endif /* TOOL_VERSION_ghc_pkg */ | ||
#ifndef MIN_TOOL_VERSION_ghc_pkg | ||
#define MIN_TOOL_VERSION_ghc_pkg(major1,major2,minor) (\ | ||
(major1) < 9 || \ | ||
(major1) == 9 && (major2) < 2 || \ | ||
(major1) == 9 && (major2) == 2 && (minor) <= 1) | ||
#endif /* MIN_TOOL_VERSION_ghc_pkg */ | ||
/* tool haddock-2.26.0 */ | ||
#ifndef TOOL_VERSION_haddock | ||
#define TOOL_VERSION_haddock "2.26.0" | ||
#endif /* TOOL_VERSION_haddock */ | ||
#ifndef MIN_TOOL_VERSION_haddock | ||
#define MIN_TOOL_VERSION_haddock(major1,major2,minor) (\ | ||
(major1) < 2 || \ | ||
(major1) == 2 && (major2) < 26 || \ | ||
(major1) == 2 && (major2) == 26 && (minor) <= 0) | ||
#endif /* MIN_TOOL_VERSION_haddock */ | ||
/* tool hpc-0.68 */ | ||
#ifndef TOOL_VERSION_hpc | ||
#define TOOL_VERSION_hpc "0.68" | ||
#endif /* TOOL_VERSION_hpc */ | ||
#ifndef MIN_TOOL_VERSION_hpc | ||
#define MIN_TOOL_VERSION_hpc(major1,major2,minor) (\ | ||
(major1) < 0 || \ | ||
(major1) == 0 && (major2) < 68 || \ | ||
(major1) == 0 && (major2) == 68 && (minor) <= 0) | ||
#endif /* MIN_TOOL_VERSION_hpc */ | ||
/* tool hsc2hs-0.68.8 */ | ||
#ifndef TOOL_VERSION_hsc2hs | ||
#define TOOL_VERSION_hsc2hs "0.68.8" | ||
#endif /* TOOL_VERSION_hsc2hs */ | ||
#ifndef MIN_TOOL_VERSION_hsc2hs | ||
#define MIN_TOOL_VERSION_hsc2hs(major1,major2,minor) (\ | ||
(major1) < 0 || \ | ||
(major1) == 0 && (major2) < 68 || \ | ||
(major1) == 0 && (major2) == 68 && (minor) <= 8) | ||
#endif /* MIN_TOOL_VERSION_hsc2hs */ | ||
/* tool runghc-9.2.1 */ | ||
#ifndef TOOL_VERSION_runghc | ||
#define TOOL_VERSION_runghc "9.2.1" | ||
#endif /* TOOL_VERSION_runghc */ | ||
#ifndef MIN_TOOL_VERSION_runghc | ||
#define MIN_TOOL_VERSION_runghc(major1,major2,minor) (\ | ||
(major1) < 9 || \ | ||
(major1) == 9 && (major2) < 2 || \ | ||
(major1) == 9 && (major2) == 2 && (minor) <= 1) | ||
#endif /* MIN_TOOL_VERSION_runghc */ | ||
/* tool strip-2.34 */ | ||
#ifndef TOOL_VERSION_strip | ||
#define TOOL_VERSION_strip "2.34" | ||
#endif /* TOOL_VERSION_strip */ | ||
#ifndef MIN_TOOL_VERSION_strip | ||
#define MIN_TOOL_VERSION_strip(major1,major2,minor) (\ | ||
(major1) < 2 || \ | ||
(major1) == 2 && (major2) < 34 || \ | ||
(major1) == 2 && (major2) == 34 && (minor) <= 0) | ||
#endif /* MIN_TOOL_VERSION_strip */ | ||
|
||
#ifndef CURRENT_COMPONENT_ID | ||
#define CURRENT_COMPONENT_ID "Chapter23-State-0.1.0.0-inplace-testingState" | ||
#endif /* CURRENT_COMPONENT_ID */ | ||
#ifndef CURRENT_PACKAGE_VERSION | ||
#define CURRENT_PACKAGE_VERSION "0.1.0.0" | ||
#endif /* CURRENT_PACKAGE_VERSION */ |
Binary file added
BIN
+4.87 KB
...wstyle/build/x86_64-windows/ghc-9.2.1/Chapter23-State-0.1.0.0/x/testingState/cache/config
Binary file not shown.
Binary file added
BIN
+40 Bytes
...ndows/ghc-9.2.1/Chapter23-State-0.1.0.0/x/testingState/package.conf.inplace/package.cache
Binary file not shown.
Empty file.
Binary file added
BIN
+227 KB
...wstyle/build/x86_64-windows/ghc-9.2.1/Chapter23-State-0.1.0.0/x/testingState/setup-config
Binary file not shown.
Binary file added
BIN
+24.2 KB
Haskell Excercises & Code/Chapter23 - State/dist-newstyle/cache/compiler
Binary file not shown.
Binary file added
BIN
+3.63 KB
Haskell Excercises & Code/Chapter23 - State/dist-newstyle/cache/config
Binary file not shown.
Binary file added
BIN
+370 KB
Haskell Excercises & Code/Chapter23 - State/dist-newstyle/cache/elaborated-plan
Binary file not shown.
Binary file added
BIN
+713 KB
Haskell Excercises & Code/Chapter23 - State/dist-newstyle/cache/improved-plan
Binary file not shown.
1 change: 1 addition & 0 deletions
1
Haskell Excercises & Code/Chapter23 - State/dist-newstyle/cache/plan.json
Large diffs are not rendered by default.
Oops, something went wrong.
Binary file added
BIN
+288 KB
Haskell Excercises & Code/Chapter23 - State/dist-newstyle/cache/solver-plan
Binary file not shown.
Binary file added
BIN
+15.7 KB
Haskell Excercises & Code/Chapter23 - State/dist-newstyle/cache/source-hashes
Binary file not shown.
Binary file added
BIN
+1.78 KB
Haskell Excercises & Code/Chapter23 - State/dist-newstyle/cache/up-to-date
Binary file not shown.
Binary file added
BIN
+40 Bytes
Haskell Excercises & Code/Chapter23 - State/dist-newstyle/packagedb/ghc-9.2.1/package.cache
Binary file not shown.
Empty file.