diff --git a/Aufgabe_4/.hlint.yaml b/Aufgabe_4/.hlint.yaml new file mode 100755 index 0000000..bd7575b --- /dev/null +++ b/Aufgabe_4/.hlint.yaml @@ -0,0 +1,31 @@ +# HLint configuration file +# https://github.com/ndmitchell/hlint + +# Ignore some builtin hints +- ignore: {name: "Avoid lambda using `infix`"} +- ignore: {name: "Avoid lambda"} +- ignore: {name: "Eta reduce"} +- ignore: {name: "Move brackets to avoid $"} +- ignore: {name: "Reduce duplication" } +- ignore: {name: "Redundant $!" } +- ignore: {name: "Redundant bracket"} +- ignore: {name: "Redundant do"} +- ignore: {name: "Redundant pure"} +- ignore: {name: "Redundant return"} +- ignore: {name: "Replace case with maybe"} +- ignore: {name: "Use $>" } +- ignore: {name: "Use <$>"} +- ignore: {name: "Use camelCase" } +- ignore: {name: "Use const"} +- ignore: {name: "Use fmap" } +- ignore: {name: "Use foldr"} +- ignore: {name: "Use guards"} +- ignore: {name: "Use if"} +- ignore: {name: "Use list comprehension"} +- ignore: {name: "Use maybe"} +- ignore: {name: "Use newtype instead of data"} +- ignore: {name: "Use notElem"} +- ignore: {name: "Use second" } +- ignore: {name: "Use section" } +- ignore: {name: "Use tuple-section"} +- ignore: {name: "Use uncurry" } diff --git a/Aufgabe_4/.stack-work/dist/x86_64-linux/Cabal-3.8.1.0/build-lock b/Aufgabe_4/.stack-work/dist/x86_64-linux/Cabal-3.8.1.0/build-lock new file mode 100644 index 0000000..e69de29 diff --git a/Aufgabe_4/.stack-work/dist/x86_64-linux/Cabal-3.8.1.0/build/ex01/autogen/Paths_ap04.hs b/Aufgabe_4/.stack-work/dist/x86_64-linux/Cabal-3.8.1.0/build/ex01/autogen/Paths_ap04.hs new file mode 100644 index 0000000..aad7200 --- /dev/null +++ b/Aufgabe_4/.stack-work/dist/x86_64-linux/Cabal-3.8.1.0/build/ex01/autogen/Paths_ap04.hs @@ -0,0 +1,74 @@ +{-# LANGUAGE CPP #-} +{-# LANGUAGE NoRebindableSyntax #-} +{-# OPTIONS_GHC -fno-warn-missing-import-lists #-} +{-# OPTIONS_GHC -w #-} +module Paths_ap04 ( + 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] [] + +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 = "/home/student/Documents/Anwendungsentwicklung/Aufgabe_4/.stack-work/install/x86_64-linux/c95135353db856bc6efc9bd10e84b1a5a9a219f3607bca4f1889717059c848cc/9.4.7/bin" +libdir = "/home/student/Documents/Anwendungsentwicklung/Aufgabe_4/.stack-work/install/x86_64-linux/c95135353db856bc6efc9bd10e84b1a5a9a219f3607bca4f1889717059c848cc/9.4.7/lib/x86_64-linux-ghc-9.4.7/ap04-0.1-IBNuKk2558H4gTI6OCsam-ex01" +dynlibdir = "/home/student/Documents/Anwendungsentwicklung/Aufgabe_4/.stack-work/install/x86_64-linux/c95135353db856bc6efc9bd10e84b1a5a9a219f3607bca4f1889717059c848cc/9.4.7/lib/x86_64-linux-ghc-9.4.7" +datadir = "/home/student/Documents/Anwendungsentwicklung/Aufgabe_4/.stack-work/install/x86_64-linux/c95135353db856bc6efc9bd10e84b1a5a9a219f3607bca4f1889717059c848cc/9.4.7/share/x86_64-linux-ghc-9.4.7/ap04-0.1" +libexecdir = "/home/student/Documents/Anwendungsentwicklung/Aufgabe_4/.stack-work/install/x86_64-linux/c95135353db856bc6efc9bd10e84b1a5a9a219f3607bca4f1889717059c848cc/9.4.7/libexec/x86_64-linux-ghc-9.4.7/ap04-0.1" +sysconfdir = "/home/student/Documents/Anwendungsentwicklung/Aufgabe_4/.stack-work/install/x86_64-linux/c95135353db856bc6efc9bd10e84b1a5a9a219f3607bca4f1889717059c848cc/9.4.7/etc" + +getBinDir = catchIO (getEnv "ap04_bindir") (\_ -> return bindir) +getLibDir = catchIO (getEnv "ap04_libdir") (\_ -> return libdir) +getDynLibDir = catchIO (getEnv "ap04_dynlibdir") (\_ -> return dynlibdir) +getDataDir = catchIO (getEnv "ap04_datadir") (\_ -> return datadir) +getLibexecDir = catchIO (getEnv "ap04_libexecdir") (\_ -> return libexecdir) +getSysconfDir = catchIO (getEnv "ap04_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 == '/' diff --git a/Aufgabe_4/.stack-work/dist/x86_64-linux/Cabal-3.8.1.0/build/ex01/autogen/cabal_macros.h b/Aufgabe_4/.stack-work/dist/x86_64-linux/Cabal-3.8.1.0/build/ex01/autogen/cabal_macros.h new file mode 100644 index 0000000..436042e --- /dev/null +++ b/Aufgabe_4/.stack-work/dist/x86_64-linux/Cabal-3.8.1.0/build/ex01/autogen/cabal_macros.h @@ -0,0 +1,180 @@ +/* DO NOT EDIT: This file is automatically generated by Cabal */ + +/* package ap04-0.1 */ +#ifndef VERSION_ap04 +#define VERSION_ap04 "0.1" +#endif /* VERSION_ap04 */ +#ifndef MIN_VERSION_ap04 +#define MIN_VERSION_ap04(major1,major2,minor) (\ + (major1) < 0 || \ + (major1) == 0 && (major2) < 1 || \ + (major1) == 0 && (major2) == 1 && (minor) <= 0) +#endif /* MIN_VERSION_ap04 */ +/* package HUnit-1.6.2.0 */ +#ifndef VERSION_HUnit +#define VERSION_HUnit "1.6.2.0" +#endif /* VERSION_HUnit */ +#ifndef MIN_VERSION_HUnit +#define MIN_VERSION_HUnit(major1,major2,minor) (\ + (major1) < 1 || \ + (major1) == 1 && (major2) < 6 || \ + (major1) == 1 && (major2) == 6 && (minor) <= 2) +#endif /* MIN_VERSION_HUnit */ +/* package base-4.17.2.0 */ +#ifndef VERSION_base +#define VERSION_base "4.17.2.0" +#endif /* VERSION_base */ +#ifndef MIN_VERSION_base +#define MIN_VERSION_base(major1,major2,minor) (\ + (major1) < 4 || \ + (major1) == 4 && (major2) < 17 || \ + (major1) == 4 && (major2) == 17 && (minor) <= 2) +#endif /* MIN_VERSION_base */ +/* package directory-1.3.7.1 */ +#ifndef VERSION_directory +#define VERSION_directory "1.3.7.1" +#endif /* VERSION_directory */ +#ifndef MIN_VERSION_directory +#define MIN_VERSION_directory(major1,major2,minor) (\ + (major1) < 1 || \ + (major1) == 1 && (major2) < 3 || \ + (major1) == 1 && (major2) == 3 && (minor) <= 7) +#endif /* MIN_VERSION_directory */ +/* package filepath-1.4.2.2 */ +#ifndef VERSION_filepath +#define VERSION_filepath "1.4.2.2" +#endif /* VERSION_filepath */ +#ifndef MIN_VERSION_filepath +#define MIN_VERSION_filepath(major1,major2,minor) (\ + (major1) < 1 || \ + (major1) == 1 && (major2) < 4 || \ + (major1) == 1 && (major2) == 4 && (minor) <= 2) +#endif /* MIN_VERSION_filepath */ +/* package text-2.0.2 */ +#ifndef VERSION_text +#define VERSION_text "2.0.2" +#endif /* VERSION_text */ +#ifndef MIN_VERSION_text +#define MIN_VERSION_text(major1,major2,minor) (\ + (major1) < 2 || \ + (major1) == 2 && (major2) < 0 || \ + (major1) == 2 && (major2) == 0 && (minor) <= 2) +#endif /* MIN_VERSION_text */ + +/* tool alex-3.2.5 */ +#ifndef TOOL_VERSION_alex +#define TOOL_VERSION_alex "3.2.5" +#endif /* TOOL_VERSION_alex */ +#ifndef MIN_TOOL_VERSION_alex +#define MIN_TOOL_VERSION_alex(major1,major2,minor) (\ + (major1) < 3 || \ + (major1) == 3 && (major2) < 2 || \ + (major1) == 3 && (major2) == 2 && (minor) <= 5) +#endif /* MIN_TOOL_VERSION_alex */ +/* tool gcc-11 */ +#ifndef TOOL_VERSION_gcc +#define TOOL_VERSION_gcc "11" +#endif /* TOOL_VERSION_gcc */ +#ifndef MIN_TOOL_VERSION_gcc +#define MIN_TOOL_VERSION_gcc(major1,major2,minor) (\ + (major1) < 11 || \ + (major1) == 11 && (major2) < 0 || \ + (major1) == 11 && (major2) == 0 && (minor) <= 0) +#endif /* MIN_TOOL_VERSION_gcc */ +/* tool ghc-9.4.7 */ +#ifndef TOOL_VERSION_ghc +#define TOOL_VERSION_ghc "9.4.7" +#endif /* TOOL_VERSION_ghc */ +#ifndef MIN_TOOL_VERSION_ghc +#define MIN_TOOL_VERSION_ghc(major1,major2,minor) (\ + (major1) < 9 || \ + (major1) == 9 && (major2) < 4 || \ + (major1) == 9 && (major2) == 4 && (minor) <= 7) +#endif /* MIN_TOOL_VERSION_ghc */ +/* tool ghc-pkg-9.4.7 */ +#ifndef TOOL_VERSION_ghc_pkg +#define TOOL_VERSION_ghc_pkg "9.4.7" +#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) < 4 || \ + (major1) == 9 && (major2) == 4 && (minor) <= 7) +#endif /* MIN_TOOL_VERSION_ghc_pkg */ +/* tool haddock-2.27.0 */ +#ifndef TOOL_VERSION_haddock +#define TOOL_VERSION_haddock "2.27.0" +#endif /* TOOL_VERSION_haddock */ +#ifndef MIN_TOOL_VERSION_haddock +#define MIN_TOOL_VERSION_haddock(major1,major2,minor) (\ + (major1) < 2 || \ + (major1) == 2 && (major2) < 27 || \ + (major1) == 2 && (major2) == 27 && (minor) <= 0) +#endif /* MIN_TOOL_VERSION_haddock */ +/* tool happy-1.19.12 */ +#ifndef TOOL_VERSION_happy +#define TOOL_VERSION_happy "1.19.12" +#endif /* TOOL_VERSION_happy */ +#ifndef MIN_TOOL_VERSION_happy +#define MIN_TOOL_VERSION_happy(major1,major2,minor) (\ + (major1) < 1 || \ + (major1) == 1 && (major2) < 19 || \ + (major1) == 1 && (major2) == 19 && (minor) <= 12) +#endif /* MIN_TOOL_VERSION_happy */ +/* 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 hscolour-1.24 */ +#ifndef TOOL_VERSION_hscolour +#define TOOL_VERSION_hscolour "1.24" +#endif /* TOOL_VERSION_hscolour */ +#ifndef MIN_TOOL_VERSION_hscolour +#define MIN_TOOL_VERSION_hscolour(major1,major2,minor) (\ + (major1) < 1 || \ + (major1) == 1 && (major2) < 24 || \ + (major1) == 1 && (major2) == 24 && (minor) <= 0) +#endif /* MIN_TOOL_VERSION_hscolour */ +/* tool runghc-9.4.7 */ +#ifndef TOOL_VERSION_runghc +#define TOOL_VERSION_runghc "9.4.7" +#endif /* TOOL_VERSION_runghc */ +#ifndef MIN_TOOL_VERSION_runghc +#define MIN_TOOL_VERSION_runghc(major1,major2,minor) (\ + (major1) < 9 || \ + (major1) == 9 && (major2) < 4 || \ + (major1) == 9 && (major2) == 4 && (minor) <= 7) +#endif /* MIN_TOOL_VERSION_runghc */ +/* tool strip-2.38 */ +#ifndef TOOL_VERSION_strip +#define TOOL_VERSION_strip "2.38" +#endif /* TOOL_VERSION_strip */ +#ifndef MIN_TOOL_VERSION_strip +#define MIN_TOOL_VERSION_strip(major1,major2,minor) (\ + (major1) < 2 || \ + (major1) == 2 && (major2) < 38 || \ + (major1) == 2 && (major2) == 38 && (minor) <= 0) +#endif /* MIN_TOOL_VERSION_strip */ + +#ifndef CURRENT_COMPONENT_ID +#define CURRENT_COMPONENT_ID "ap04-0.1-IBNuKk2558H4gTI6OCsam-ex01" +#endif /* CURRENT_COMPONENT_ID */ +#ifndef CURRENT_PACKAGE_VERSION +#define CURRENT_PACKAGE_VERSION "0.1" +#endif /* CURRENT_PACKAGE_VERSION */ diff --git a/Aufgabe_4/.stack-work/dist/x86_64-linux/Cabal-3.8.1.0/build/ex01/ex01 b/Aufgabe_4/.stack-work/dist/x86_64-linux/Cabal-3.8.1.0/build/ex01/ex01 new file mode 100755 index 0000000..0d44ce8 Binary files /dev/null and b/Aufgabe_4/.stack-work/dist/x86_64-linux/Cabal-3.8.1.0/build/ex01/ex01 differ diff --git a/Aufgabe_4/.stack-work/dist/x86_64-linux/Cabal-3.8.1.0/build/ex01/ex01-tmp/Files.hi b/Aufgabe_4/.stack-work/dist/x86_64-linux/Cabal-3.8.1.0/build/ex01/ex01-tmp/Files.hi new file mode 100644 index 0000000..773c54a Binary files /dev/null and b/Aufgabe_4/.stack-work/dist/x86_64-linux/Cabal-3.8.1.0/build/ex01/ex01-tmp/Files.hi differ diff --git a/Aufgabe_4/.stack-work/dist/x86_64-linux/Cabal-3.8.1.0/build/ex01/ex01-tmp/Files.o b/Aufgabe_4/.stack-work/dist/x86_64-linux/Cabal-3.8.1.0/build/ex01/ex01-tmp/Files.o new file mode 100644 index 0000000..ca32b90 Binary files /dev/null and b/Aufgabe_4/.stack-work/dist/x86_64-linux/Cabal-3.8.1.0/build/ex01/ex01-tmp/Files.o differ diff --git a/Aufgabe_4/.stack-work/dist/x86_64-linux/Cabal-3.8.1.0/build/ex01/ex01-tmp/Main.hi b/Aufgabe_4/.stack-work/dist/x86_64-linux/Cabal-3.8.1.0/build/ex01/ex01-tmp/Main.hi new file mode 100644 index 0000000..72ef8bd Binary files /dev/null and b/Aufgabe_4/.stack-work/dist/x86_64-linux/Cabal-3.8.1.0/build/ex01/ex01-tmp/Main.hi differ diff --git a/Aufgabe_4/.stack-work/dist/x86_64-linux/Cabal-3.8.1.0/build/ex01/ex01-tmp/Main.o b/Aufgabe_4/.stack-work/dist/x86_64-linux/Cabal-3.8.1.0/build/ex01/ex01-tmp/Main.o new file mode 100644 index 0000000..24f7176 Binary files /dev/null and b/Aufgabe_4/.stack-work/dist/x86_64-linux/Cabal-3.8.1.0/build/ex01/ex01-tmp/Main.o differ diff --git a/Aufgabe_4/.stack-work/dist/x86_64-linux/Cabal-3.8.1.0/build/ex02/autogen/Paths_ap04.hs b/Aufgabe_4/.stack-work/dist/x86_64-linux/Cabal-3.8.1.0/build/ex02/autogen/Paths_ap04.hs new file mode 100644 index 0000000..b78d766 --- /dev/null +++ b/Aufgabe_4/.stack-work/dist/x86_64-linux/Cabal-3.8.1.0/build/ex02/autogen/Paths_ap04.hs @@ -0,0 +1,74 @@ +{-# LANGUAGE CPP #-} +{-# LANGUAGE NoRebindableSyntax #-} +{-# OPTIONS_GHC -fno-warn-missing-import-lists #-} +{-# OPTIONS_GHC -w #-} +module Paths_ap04 ( + 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] [] + +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 = "/home/student/Documents/Anwendungsentwicklung/Aufgabe_4/.stack-work/install/x86_64-linux/c95135353db856bc6efc9bd10e84b1a5a9a219f3607bca4f1889717059c848cc/9.4.7/bin" +libdir = "/home/student/Documents/Anwendungsentwicklung/Aufgabe_4/.stack-work/install/x86_64-linux/c95135353db856bc6efc9bd10e84b1a5a9a219f3607bca4f1889717059c848cc/9.4.7/lib/x86_64-linux-ghc-9.4.7/ap04-0.1-A6vpXkJForv73N3yFCnv7V-ex02" +dynlibdir = "/home/student/Documents/Anwendungsentwicklung/Aufgabe_4/.stack-work/install/x86_64-linux/c95135353db856bc6efc9bd10e84b1a5a9a219f3607bca4f1889717059c848cc/9.4.7/lib/x86_64-linux-ghc-9.4.7" +datadir = "/home/student/Documents/Anwendungsentwicklung/Aufgabe_4/.stack-work/install/x86_64-linux/c95135353db856bc6efc9bd10e84b1a5a9a219f3607bca4f1889717059c848cc/9.4.7/share/x86_64-linux-ghc-9.4.7/ap04-0.1" +libexecdir = "/home/student/Documents/Anwendungsentwicklung/Aufgabe_4/.stack-work/install/x86_64-linux/c95135353db856bc6efc9bd10e84b1a5a9a219f3607bca4f1889717059c848cc/9.4.7/libexec/x86_64-linux-ghc-9.4.7/ap04-0.1" +sysconfdir = "/home/student/Documents/Anwendungsentwicklung/Aufgabe_4/.stack-work/install/x86_64-linux/c95135353db856bc6efc9bd10e84b1a5a9a219f3607bca4f1889717059c848cc/9.4.7/etc" + +getBinDir = catchIO (getEnv "ap04_bindir") (\_ -> return bindir) +getLibDir = catchIO (getEnv "ap04_libdir") (\_ -> return libdir) +getDynLibDir = catchIO (getEnv "ap04_dynlibdir") (\_ -> return dynlibdir) +getDataDir = catchIO (getEnv "ap04_datadir") (\_ -> return datadir) +getLibexecDir = catchIO (getEnv "ap04_libexecdir") (\_ -> return libexecdir) +getSysconfDir = catchIO (getEnv "ap04_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 == '/' diff --git a/Aufgabe_4/.stack-work/dist/x86_64-linux/Cabal-3.8.1.0/build/ex02/autogen/cabal_macros.h b/Aufgabe_4/.stack-work/dist/x86_64-linux/Cabal-3.8.1.0/build/ex02/autogen/cabal_macros.h new file mode 100644 index 0000000..eb6f897 --- /dev/null +++ b/Aufgabe_4/.stack-work/dist/x86_64-linux/Cabal-3.8.1.0/build/ex02/autogen/cabal_macros.h @@ -0,0 +1,180 @@ +/* DO NOT EDIT: This file is automatically generated by Cabal */ + +/* package ap04-0.1 */ +#ifndef VERSION_ap04 +#define VERSION_ap04 "0.1" +#endif /* VERSION_ap04 */ +#ifndef MIN_VERSION_ap04 +#define MIN_VERSION_ap04(major1,major2,minor) (\ + (major1) < 0 || \ + (major1) == 0 && (major2) < 1 || \ + (major1) == 0 && (major2) == 1 && (minor) <= 0) +#endif /* MIN_VERSION_ap04 */ +/* package HUnit-1.6.2.0 */ +#ifndef VERSION_HUnit +#define VERSION_HUnit "1.6.2.0" +#endif /* VERSION_HUnit */ +#ifndef MIN_VERSION_HUnit +#define MIN_VERSION_HUnit(major1,major2,minor) (\ + (major1) < 1 || \ + (major1) == 1 && (major2) < 6 || \ + (major1) == 1 && (major2) == 6 && (minor) <= 2) +#endif /* MIN_VERSION_HUnit */ +/* package base-4.17.2.0 */ +#ifndef VERSION_base +#define VERSION_base "4.17.2.0" +#endif /* VERSION_base */ +#ifndef MIN_VERSION_base +#define MIN_VERSION_base(major1,major2,minor) (\ + (major1) < 4 || \ + (major1) == 4 && (major2) < 17 || \ + (major1) == 4 && (major2) == 17 && (minor) <= 2) +#endif /* MIN_VERSION_base */ +/* package directory-1.3.7.1 */ +#ifndef VERSION_directory +#define VERSION_directory "1.3.7.1" +#endif /* VERSION_directory */ +#ifndef MIN_VERSION_directory +#define MIN_VERSION_directory(major1,major2,minor) (\ + (major1) < 1 || \ + (major1) == 1 && (major2) < 3 || \ + (major1) == 1 && (major2) == 3 && (minor) <= 7) +#endif /* MIN_VERSION_directory */ +/* package filepath-1.4.2.2 */ +#ifndef VERSION_filepath +#define VERSION_filepath "1.4.2.2" +#endif /* VERSION_filepath */ +#ifndef MIN_VERSION_filepath +#define MIN_VERSION_filepath(major1,major2,minor) (\ + (major1) < 1 || \ + (major1) == 1 && (major2) < 4 || \ + (major1) == 1 && (major2) == 4 && (minor) <= 2) +#endif /* MIN_VERSION_filepath */ +/* package text-2.0.2 */ +#ifndef VERSION_text +#define VERSION_text "2.0.2" +#endif /* VERSION_text */ +#ifndef MIN_VERSION_text +#define MIN_VERSION_text(major1,major2,minor) (\ + (major1) < 2 || \ + (major1) == 2 && (major2) < 0 || \ + (major1) == 2 && (major2) == 0 && (minor) <= 2) +#endif /* MIN_VERSION_text */ + +/* tool alex-3.2.5 */ +#ifndef TOOL_VERSION_alex +#define TOOL_VERSION_alex "3.2.5" +#endif /* TOOL_VERSION_alex */ +#ifndef MIN_TOOL_VERSION_alex +#define MIN_TOOL_VERSION_alex(major1,major2,minor) (\ + (major1) < 3 || \ + (major1) == 3 && (major2) < 2 || \ + (major1) == 3 && (major2) == 2 && (minor) <= 5) +#endif /* MIN_TOOL_VERSION_alex */ +/* tool gcc-11 */ +#ifndef TOOL_VERSION_gcc +#define TOOL_VERSION_gcc "11" +#endif /* TOOL_VERSION_gcc */ +#ifndef MIN_TOOL_VERSION_gcc +#define MIN_TOOL_VERSION_gcc(major1,major2,minor) (\ + (major1) < 11 || \ + (major1) == 11 && (major2) < 0 || \ + (major1) == 11 && (major2) == 0 && (minor) <= 0) +#endif /* MIN_TOOL_VERSION_gcc */ +/* tool ghc-9.4.7 */ +#ifndef TOOL_VERSION_ghc +#define TOOL_VERSION_ghc "9.4.7" +#endif /* TOOL_VERSION_ghc */ +#ifndef MIN_TOOL_VERSION_ghc +#define MIN_TOOL_VERSION_ghc(major1,major2,minor) (\ + (major1) < 9 || \ + (major1) == 9 && (major2) < 4 || \ + (major1) == 9 && (major2) == 4 && (minor) <= 7) +#endif /* MIN_TOOL_VERSION_ghc */ +/* tool ghc-pkg-9.4.7 */ +#ifndef TOOL_VERSION_ghc_pkg +#define TOOL_VERSION_ghc_pkg "9.4.7" +#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) < 4 || \ + (major1) == 9 && (major2) == 4 && (minor) <= 7) +#endif /* MIN_TOOL_VERSION_ghc_pkg */ +/* tool haddock-2.27.0 */ +#ifndef TOOL_VERSION_haddock +#define TOOL_VERSION_haddock "2.27.0" +#endif /* TOOL_VERSION_haddock */ +#ifndef MIN_TOOL_VERSION_haddock +#define MIN_TOOL_VERSION_haddock(major1,major2,minor) (\ + (major1) < 2 || \ + (major1) == 2 && (major2) < 27 || \ + (major1) == 2 && (major2) == 27 && (minor) <= 0) +#endif /* MIN_TOOL_VERSION_haddock */ +/* tool happy-1.19.12 */ +#ifndef TOOL_VERSION_happy +#define TOOL_VERSION_happy "1.19.12" +#endif /* TOOL_VERSION_happy */ +#ifndef MIN_TOOL_VERSION_happy +#define MIN_TOOL_VERSION_happy(major1,major2,minor) (\ + (major1) < 1 || \ + (major1) == 1 && (major2) < 19 || \ + (major1) == 1 && (major2) == 19 && (minor) <= 12) +#endif /* MIN_TOOL_VERSION_happy */ +/* 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 hscolour-1.24 */ +#ifndef TOOL_VERSION_hscolour +#define TOOL_VERSION_hscolour "1.24" +#endif /* TOOL_VERSION_hscolour */ +#ifndef MIN_TOOL_VERSION_hscolour +#define MIN_TOOL_VERSION_hscolour(major1,major2,minor) (\ + (major1) < 1 || \ + (major1) == 1 && (major2) < 24 || \ + (major1) == 1 && (major2) == 24 && (minor) <= 0) +#endif /* MIN_TOOL_VERSION_hscolour */ +/* tool runghc-9.4.7 */ +#ifndef TOOL_VERSION_runghc +#define TOOL_VERSION_runghc "9.4.7" +#endif /* TOOL_VERSION_runghc */ +#ifndef MIN_TOOL_VERSION_runghc +#define MIN_TOOL_VERSION_runghc(major1,major2,minor) (\ + (major1) < 9 || \ + (major1) == 9 && (major2) < 4 || \ + (major1) == 9 && (major2) == 4 && (minor) <= 7) +#endif /* MIN_TOOL_VERSION_runghc */ +/* tool strip-2.38 */ +#ifndef TOOL_VERSION_strip +#define TOOL_VERSION_strip "2.38" +#endif /* TOOL_VERSION_strip */ +#ifndef MIN_TOOL_VERSION_strip +#define MIN_TOOL_VERSION_strip(major1,major2,minor) (\ + (major1) < 2 || \ + (major1) == 2 && (major2) < 38 || \ + (major1) == 2 && (major2) == 38 && (minor) <= 0) +#endif /* MIN_TOOL_VERSION_strip */ + +#ifndef CURRENT_COMPONENT_ID +#define CURRENT_COMPONENT_ID "ap04-0.1-A6vpXkJForv73N3yFCnv7V-ex02" +#endif /* CURRENT_COMPONENT_ID */ +#ifndef CURRENT_PACKAGE_VERSION +#define CURRENT_PACKAGE_VERSION "0.1" +#endif /* CURRENT_PACKAGE_VERSION */ diff --git a/Aufgabe_4/.stack-work/dist/x86_64-linux/Cabal-3.8.1.0/build/ex02/ex02 b/Aufgabe_4/.stack-work/dist/x86_64-linux/Cabal-3.8.1.0/build/ex02/ex02 new file mode 100755 index 0000000..8adabe2 Binary files /dev/null and b/Aufgabe_4/.stack-work/dist/x86_64-linux/Cabal-3.8.1.0/build/ex02/ex02 differ diff --git a/Aufgabe_4/.stack-work/dist/x86_64-linux/Cabal-3.8.1.0/build/ex02/ex02-tmp/Main.hi b/Aufgabe_4/.stack-work/dist/x86_64-linux/Cabal-3.8.1.0/build/ex02/ex02-tmp/Main.hi new file mode 100644 index 0000000..7aa6014 Binary files /dev/null and b/Aufgabe_4/.stack-work/dist/x86_64-linux/Cabal-3.8.1.0/build/ex02/ex02-tmp/Main.hi differ diff --git a/Aufgabe_4/.stack-work/dist/x86_64-linux/Cabal-3.8.1.0/build/ex02/ex02-tmp/Main.o b/Aufgabe_4/.stack-work/dist/x86_64-linux/Cabal-3.8.1.0/build/ex02/ex02-tmp/Main.o new file mode 100644 index 0000000..8df0239 Binary files /dev/null and b/Aufgabe_4/.stack-work/dist/x86_64-linux/Cabal-3.8.1.0/build/ex02/ex02-tmp/Main.o differ diff --git a/Aufgabe_4/.stack-work/dist/x86_64-linux/Cabal-3.8.1.0/build/ex02/ex02-tmp/TicTacToe.hi b/Aufgabe_4/.stack-work/dist/x86_64-linux/Cabal-3.8.1.0/build/ex02/ex02-tmp/TicTacToe.hi new file mode 100644 index 0000000..994a615 Binary files /dev/null and b/Aufgabe_4/.stack-work/dist/x86_64-linux/Cabal-3.8.1.0/build/ex02/ex02-tmp/TicTacToe.hi differ diff --git a/Aufgabe_4/.stack-work/dist/x86_64-linux/Cabal-3.8.1.0/build/ex02/ex02-tmp/TicTacToe.o b/Aufgabe_4/.stack-work/dist/x86_64-linux/Cabal-3.8.1.0/build/ex02/ex02-tmp/TicTacToe.o new file mode 100644 index 0000000..774fd1c Binary files /dev/null and b/Aufgabe_4/.stack-work/dist/x86_64-linux/Cabal-3.8.1.0/build/ex02/ex02-tmp/TicTacToe.o differ diff --git a/Aufgabe_4/.stack-work/dist/x86_64-linux/Cabal-3.8.1.0/build/ttt/autogen/Paths_ap04.hs b/Aufgabe_4/.stack-work/dist/x86_64-linux/Cabal-3.8.1.0/build/ttt/autogen/Paths_ap04.hs new file mode 100644 index 0000000..c314c8e --- /dev/null +++ b/Aufgabe_4/.stack-work/dist/x86_64-linux/Cabal-3.8.1.0/build/ttt/autogen/Paths_ap04.hs @@ -0,0 +1,74 @@ +{-# LANGUAGE CPP #-} +{-# LANGUAGE NoRebindableSyntax #-} +{-# OPTIONS_GHC -fno-warn-missing-import-lists #-} +{-# OPTIONS_GHC -w #-} +module Paths_ap04 ( + 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] [] + +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 = "/home/student/Documents/Anwendungsentwicklung/Aufgabe_4/.stack-work/install/x86_64-linux/c95135353db856bc6efc9bd10e84b1a5a9a219f3607bca4f1889717059c848cc/9.4.7/bin" +libdir = "/home/student/Documents/Anwendungsentwicklung/Aufgabe_4/.stack-work/install/x86_64-linux/c95135353db856bc6efc9bd10e84b1a5a9a219f3607bca4f1889717059c848cc/9.4.7/lib/x86_64-linux-ghc-9.4.7/ap04-0.1-A6vpXkJForv73N3yFCnv7V-ttt" +dynlibdir = "/home/student/Documents/Anwendungsentwicklung/Aufgabe_4/.stack-work/install/x86_64-linux/c95135353db856bc6efc9bd10e84b1a5a9a219f3607bca4f1889717059c848cc/9.4.7/lib/x86_64-linux-ghc-9.4.7" +datadir = "/home/student/Documents/Anwendungsentwicklung/Aufgabe_4/.stack-work/install/x86_64-linux/c95135353db856bc6efc9bd10e84b1a5a9a219f3607bca4f1889717059c848cc/9.4.7/share/x86_64-linux-ghc-9.4.7/ap04-0.1" +libexecdir = "/home/student/Documents/Anwendungsentwicklung/Aufgabe_4/.stack-work/install/x86_64-linux/c95135353db856bc6efc9bd10e84b1a5a9a219f3607bca4f1889717059c848cc/9.4.7/libexec/x86_64-linux-ghc-9.4.7/ap04-0.1" +sysconfdir = "/home/student/Documents/Anwendungsentwicklung/Aufgabe_4/.stack-work/install/x86_64-linux/c95135353db856bc6efc9bd10e84b1a5a9a219f3607bca4f1889717059c848cc/9.4.7/etc" + +getBinDir = catchIO (getEnv "ap04_bindir") (\_ -> return bindir) +getLibDir = catchIO (getEnv "ap04_libdir") (\_ -> return libdir) +getDynLibDir = catchIO (getEnv "ap04_dynlibdir") (\_ -> return dynlibdir) +getDataDir = catchIO (getEnv "ap04_datadir") (\_ -> return datadir) +getLibexecDir = catchIO (getEnv "ap04_libexecdir") (\_ -> return libexecdir) +getSysconfDir = catchIO (getEnv "ap04_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 == '/' diff --git a/Aufgabe_4/.stack-work/dist/x86_64-linux/Cabal-3.8.1.0/build/ttt/autogen/cabal_macros.h b/Aufgabe_4/.stack-work/dist/x86_64-linux/Cabal-3.8.1.0/build/ttt/autogen/cabal_macros.h new file mode 100644 index 0000000..72875c0 --- /dev/null +++ b/Aufgabe_4/.stack-work/dist/x86_64-linux/Cabal-3.8.1.0/build/ttt/autogen/cabal_macros.h @@ -0,0 +1,180 @@ +/* DO NOT EDIT: This file is automatically generated by Cabal */ + +/* package ap04-0.1 */ +#ifndef VERSION_ap04 +#define VERSION_ap04 "0.1" +#endif /* VERSION_ap04 */ +#ifndef MIN_VERSION_ap04 +#define MIN_VERSION_ap04(major1,major2,minor) (\ + (major1) < 0 || \ + (major1) == 0 && (major2) < 1 || \ + (major1) == 0 && (major2) == 1 && (minor) <= 0) +#endif /* MIN_VERSION_ap04 */ +/* package HUnit-1.6.2.0 */ +#ifndef VERSION_HUnit +#define VERSION_HUnit "1.6.2.0" +#endif /* VERSION_HUnit */ +#ifndef MIN_VERSION_HUnit +#define MIN_VERSION_HUnit(major1,major2,minor) (\ + (major1) < 1 || \ + (major1) == 1 && (major2) < 6 || \ + (major1) == 1 && (major2) == 6 && (minor) <= 2) +#endif /* MIN_VERSION_HUnit */ +/* package base-4.17.2.0 */ +#ifndef VERSION_base +#define VERSION_base "4.17.2.0" +#endif /* VERSION_base */ +#ifndef MIN_VERSION_base +#define MIN_VERSION_base(major1,major2,minor) (\ + (major1) < 4 || \ + (major1) == 4 && (major2) < 17 || \ + (major1) == 4 && (major2) == 17 && (minor) <= 2) +#endif /* MIN_VERSION_base */ +/* package directory-1.3.7.1 */ +#ifndef VERSION_directory +#define VERSION_directory "1.3.7.1" +#endif /* VERSION_directory */ +#ifndef MIN_VERSION_directory +#define MIN_VERSION_directory(major1,major2,minor) (\ + (major1) < 1 || \ + (major1) == 1 && (major2) < 3 || \ + (major1) == 1 && (major2) == 3 && (minor) <= 7) +#endif /* MIN_VERSION_directory */ +/* package filepath-1.4.2.2 */ +#ifndef VERSION_filepath +#define VERSION_filepath "1.4.2.2" +#endif /* VERSION_filepath */ +#ifndef MIN_VERSION_filepath +#define MIN_VERSION_filepath(major1,major2,minor) (\ + (major1) < 1 || \ + (major1) == 1 && (major2) < 4 || \ + (major1) == 1 && (major2) == 4 && (minor) <= 2) +#endif /* MIN_VERSION_filepath */ +/* package text-2.0.2 */ +#ifndef VERSION_text +#define VERSION_text "2.0.2" +#endif /* VERSION_text */ +#ifndef MIN_VERSION_text +#define MIN_VERSION_text(major1,major2,minor) (\ + (major1) < 2 || \ + (major1) == 2 && (major2) < 0 || \ + (major1) == 2 && (major2) == 0 && (minor) <= 2) +#endif /* MIN_VERSION_text */ + +/* tool alex-3.2.5 */ +#ifndef TOOL_VERSION_alex +#define TOOL_VERSION_alex "3.2.5" +#endif /* TOOL_VERSION_alex */ +#ifndef MIN_TOOL_VERSION_alex +#define MIN_TOOL_VERSION_alex(major1,major2,minor) (\ + (major1) < 3 || \ + (major1) == 3 && (major2) < 2 || \ + (major1) == 3 && (major2) == 2 && (minor) <= 5) +#endif /* MIN_TOOL_VERSION_alex */ +/* tool gcc-11 */ +#ifndef TOOL_VERSION_gcc +#define TOOL_VERSION_gcc "11" +#endif /* TOOL_VERSION_gcc */ +#ifndef MIN_TOOL_VERSION_gcc +#define MIN_TOOL_VERSION_gcc(major1,major2,minor) (\ + (major1) < 11 || \ + (major1) == 11 && (major2) < 0 || \ + (major1) == 11 && (major2) == 0 && (minor) <= 0) +#endif /* MIN_TOOL_VERSION_gcc */ +/* tool ghc-9.4.7 */ +#ifndef TOOL_VERSION_ghc +#define TOOL_VERSION_ghc "9.4.7" +#endif /* TOOL_VERSION_ghc */ +#ifndef MIN_TOOL_VERSION_ghc +#define MIN_TOOL_VERSION_ghc(major1,major2,minor) (\ + (major1) < 9 || \ + (major1) == 9 && (major2) < 4 || \ + (major1) == 9 && (major2) == 4 && (minor) <= 7) +#endif /* MIN_TOOL_VERSION_ghc */ +/* tool ghc-pkg-9.4.7 */ +#ifndef TOOL_VERSION_ghc_pkg +#define TOOL_VERSION_ghc_pkg "9.4.7" +#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) < 4 || \ + (major1) == 9 && (major2) == 4 && (minor) <= 7) +#endif /* MIN_TOOL_VERSION_ghc_pkg */ +/* tool haddock-2.27.0 */ +#ifndef TOOL_VERSION_haddock +#define TOOL_VERSION_haddock "2.27.0" +#endif /* TOOL_VERSION_haddock */ +#ifndef MIN_TOOL_VERSION_haddock +#define MIN_TOOL_VERSION_haddock(major1,major2,minor) (\ + (major1) < 2 || \ + (major1) == 2 && (major2) < 27 || \ + (major1) == 2 && (major2) == 27 && (minor) <= 0) +#endif /* MIN_TOOL_VERSION_haddock */ +/* tool happy-1.19.12 */ +#ifndef TOOL_VERSION_happy +#define TOOL_VERSION_happy "1.19.12" +#endif /* TOOL_VERSION_happy */ +#ifndef MIN_TOOL_VERSION_happy +#define MIN_TOOL_VERSION_happy(major1,major2,minor) (\ + (major1) < 1 || \ + (major1) == 1 && (major2) < 19 || \ + (major1) == 1 && (major2) == 19 && (minor) <= 12) +#endif /* MIN_TOOL_VERSION_happy */ +/* 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 hscolour-1.24 */ +#ifndef TOOL_VERSION_hscolour +#define TOOL_VERSION_hscolour "1.24" +#endif /* TOOL_VERSION_hscolour */ +#ifndef MIN_TOOL_VERSION_hscolour +#define MIN_TOOL_VERSION_hscolour(major1,major2,minor) (\ + (major1) < 1 || \ + (major1) == 1 && (major2) < 24 || \ + (major1) == 1 && (major2) == 24 && (minor) <= 0) +#endif /* MIN_TOOL_VERSION_hscolour */ +/* tool runghc-9.4.7 */ +#ifndef TOOL_VERSION_runghc +#define TOOL_VERSION_runghc "9.4.7" +#endif /* TOOL_VERSION_runghc */ +#ifndef MIN_TOOL_VERSION_runghc +#define MIN_TOOL_VERSION_runghc(major1,major2,minor) (\ + (major1) < 9 || \ + (major1) == 9 && (major2) < 4 || \ + (major1) == 9 && (major2) == 4 && (minor) <= 7) +#endif /* MIN_TOOL_VERSION_runghc */ +/* tool strip-2.38 */ +#ifndef TOOL_VERSION_strip +#define TOOL_VERSION_strip "2.38" +#endif /* TOOL_VERSION_strip */ +#ifndef MIN_TOOL_VERSION_strip +#define MIN_TOOL_VERSION_strip(major1,major2,minor) (\ + (major1) < 2 || \ + (major1) == 2 && (major2) < 38 || \ + (major1) == 2 && (major2) == 38 && (minor) <= 0) +#endif /* MIN_TOOL_VERSION_strip */ + +#ifndef CURRENT_COMPONENT_ID +#define CURRENT_COMPONENT_ID "ap04-0.1-A6vpXkJForv73N3yFCnv7V-ttt" +#endif /* CURRENT_COMPONENT_ID */ +#ifndef CURRENT_PACKAGE_VERSION +#define CURRENT_PACKAGE_VERSION "0.1" +#endif /* CURRENT_PACKAGE_VERSION */ diff --git a/Aufgabe_4/.stack-work/dist/x86_64-linux/Cabal-3.8.1.0/build/ttt/ttt b/Aufgabe_4/.stack-work/dist/x86_64-linux/Cabal-3.8.1.0/build/ttt/ttt new file mode 100755 index 0000000..c2d208b Binary files /dev/null and b/Aufgabe_4/.stack-work/dist/x86_64-linux/Cabal-3.8.1.0/build/ttt/ttt differ diff --git a/Aufgabe_4/.stack-work/dist/x86_64-linux/Cabal-3.8.1.0/build/ttt/ttt-tmp/Main.hi b/Aufgabe_4/.stack-work/dist/x86_64-linux/Cabal-3.8.1.0/build/ttt/ttt-tmp/Main.hi new file mode 100644 index 0000000..bf25510 Binary files /dev/null and b/Aufgabe_4/.stack-work/dist/x86_64-linux/Cabal-3.8.1.0/build/ttt/ttt-tmp/Main.hi differ diff --git a/Aufgabe_4/.stack-work/dist/x86_64-linux/Cabal-3.8.1.0/build/ttt/ttt-tmp/Main.o b/Aufgabe_4/.stack-work/dist/x86_64-linux/Cabal-3.8.1.0/build/ttt/ttt-tmp/Main.o new file mode 100644 index 0000000..9daa211 Binary files /dev/null and b/Aufgabe_4/.stack-work/dist/x86_64-linux/Cabal-3.8.1.0/build/ttt/ttt-tmp/Main.o differ diff --git a/Aufgabe_4/.stack-work/dist/x86_64-linux/Cabal-3.8.1.0/build/ttt/ttt-tmp/TicTacToe.hi b/Aufgabe_4/.stack-work/dist/x86_64-linux/Cabal-3.8.1.0/build/ttt/ttt-tmp/TicTacToe.hi new file mode 100644 index 0000000..851fa6b Binary files /dev/null and b/Aufgabe_4/.stack-work/dist/x86_64-linux/Cabal-3.8.1.0/build/ttt/ttt-tmp/TicTacToe.hi differ diff --git a/Aufgabe_4/.stack-work/dist/x86_64-linux/Cabal-3.8.1.0/build/ttt/ttt-tmp/TicTacToe.o b/Aufgabe_4/.stack-work/dist/x86_64-linux/Cabal-3.8.1.0/build/ttt/ttt-tmp/TicTacToe.o new file mode 100644 index 0000000..05a5e62 Binary files /dev/null and b/Aufgabe_4/.stack-work/dist/x86_64-linux/Cabal-3.8.1.0/build/ttt/ttt-tmp/TicTacToe.o differ diff --git a/Aufgabe_4/.stack-work/dist/x86_64-linux/Cabal-3.8.1.0/package.conf.inplace/package.cache b/Aufgabe_4/.stack-work/dist/x86_64-linux/Cabal-3.8.1.0/package.conf.inplace/package.cache new file mode 100644 index 0000000..b3cae5c Binary files /dev/null and b/Aufgabe_4/.stack-work/dist/x86_64-linux/Cabal-3.8.1.0/package.conf.inplace/package.cache differ diff --git a/Aufgabe_4/.stack-work/dist/x86_64-linux/Cabal-3.8.1.0/package.conf.inplace/package.cache.lock b/Aufgabe_4/.stack-work/dist/x86_64-linux/Cabal-3.8.1.0/package.conf.inplace/package.cache.lock new file mode 100644 index 0000000..e69de29 diff --git a/Aufgabe_4/.stack-work/dist/x86_64-linux/Cabal-3.8.1.0/setup-config b/Aufgabe_4/.stack-work/dist/x86_64-linux/Cabal-3.8.1.0/setup-config new file mode 100644 index 0000000..5941d1d Binary files /dev/null and b/Aufgabe_4/.stack-work/dist/x86_64-linux/Cabal-3.8.1.0/setup-config differ diff --git a/Aufgabe_4/.stack-work/dist/x86_64-linux/Cabal-3.8.1.0/stack-build-caches/c95135353db856bc6efc9bd10e84b1a5a9a219f3607bca4f1889717059c848cc/exe-ttt b/Aufgabe_4/.stack-work/dist/x86_64-linux/Cabal-3.8.1.0/stack-build-caches/c95135353db856bc6efc9bd10e84b1a5a9a219f3607bca4f1889717059c848cc/exe-ttt new file mode 100644 index 0000000..ef483fe --- /dev/null +++ b/Aufgabe_4/.stack-work/dist/x86_64-linux/Cabal-3.8.1.0/stack-build-caches/c95135353db856bc6efc9bd10e84b1a5a9a219f3607bca4f1889717059c848cc/exe-ttt @@ -0,0 +1,8 @@ +/home/student/Documents/Anwendungsentwicklung/Aufgabe_4/ap04.cabal: + hash: 9dcc93674c295629c3948fac212c93e81f13cc28902150e772e7664928f7f94b +/home/student/Documents/Anwendungsentwicklung/Aufgabe_4/ex02/Main.hs: + hash: 77eb05e491337ea6939a84df6e700414c27e4ee7f765bf1702e52a3076b2de1d +/home/student/Documents/Anwendungsentwicklung/Aufgabe_4/ex02/TicTacToe.hs: + hash: b7e91288538a7b4887bd4034d7ad218444bcd7e2f39eee47421d4c7ce145ddab +/home/student/Documents/Anwendungsentwicklung/Aufgabe_4/package.yaml: + hash: a7004df7a0bcbb43586eb77ec7cfc635e3cdb1e07b3904b7b06bf12a8d2beb39 diff --git a/Aufgabe_4/.stack-work/dist/x86_64-linux/Cabal-3.8.1.0/stack-build-caches/c95135353db856bc6efc9bd10e84b1a5a9a219f3607bca4f1889717059c848cc/test-ex01 b/Aufgabe_4/.stack-work/dist/x86_64-linux/Cabal-3.8.1.0/stack-build-caches/c95135353db856bc6efc9bd10e84b1a5a9a219f3607bca4f1889717059c848cc/test-ex01 new file mode 100644 index 0000000..4a7e30d --- /dev/null +++ b/Aufgabe_4/.stack-work/dist/x86_64-linux/Cabal-3.8.1.0/stack-build-caches/c95135353db856bc6efc9bd10e84b1a5a9a219f3607bca4f1889717059c848cc/test-ex01 @@ -0,0 +1,8 @@ +/home/student/Documents/Anwendungsentwicklung/Aufgabe_4/ap04.cabal: + hash: 9dcc93674c295629c3948fac212c93e81f13cc28902150e772e7664928f7f94b +/home/student/Documents/Anwendungsentwicklung/Aufgabe_4/ex01/Files.hs: + hash: 0fa99fc2af0e1e859c25b781009cbc31c0f137ba8306c06d09f251a949218b03 +/home/student/Documents/Anwendungsentwicklung/Aufgabe_4/ex01/Main.hs: + hash: 269f45a919b6b86c3850a5a128199b3b21d02048aa32f5f61ce17dc750043173 +/home/student/Documents/Anwendungsentwicklung/Aufgabe_4/package.yaml: + hash: a7004df7a0bcbb43586eb77ec7cfc635e3cdb1e07b3904b7b06bf12a8d2beb39 diff --git a/Aufgabe_4/.stack-work/dist/x86_64-linux/Cabal-3.8.1.0/stack-build-caches/c95135353db856bc6efc9bd10e84b1a5a9a219f3607bca4f1889717059c848cc/test-ex02 b/Aufgabe_4/.stack-work/dist/x86_64-linux/Cabal-3.8.1.0/stack-build-caches/c95135353db856bc6efc9bd10e84b1a5a9a219f3607bca4f1889717059c848cc/test-ex02 new file mode 100644 index 0000000..3282b50 --- /dev/null +++ b/Aufgabe_4/.stack-work/dist/x86_64-linux/Cabal-3.8.1.0/stack-build-caches/c95135353db856bc6efc9bd10e84b1a5a9a219f3607bca4f1889717059c848cc/test-ex02 @@ -0,0 +1,8 @@ +/home/student/Documents/Anwendungsentwicklung/Aufgabe_4/ap04.cabal: + hash: 9dcc93674c295629c3948fac212c93e81f13cc28902150e772e7664928f7f94b +/home/student/Documents/Anwendungsentwicklung/Aufgabe_4/ex02/MainTests.hs: + hash: affc1d41e8275ad63f262399d66d906af1ae3fdc1ffd9fb380b5a3b8c3d2744e +/home/student/Documents/Anwendungsentwicklung/Aufgabe_4/ex02/TicTacToe.hs: + hash: 2986ee9da2eac8a8744605e2773baf5ff93ed28f9309ec9b88c78916429a359b +/home/student/Documents/Anwendungsentwicklung/Aufgabe_4/package.yaml: + hash: a7004df7a0bcbb43586eb77ec7cfc635e3cdb1e07b3904b7b06bf12a8d2beb39 diff --git a/Aufgabe_4/.stack-work/dist/x86_64-linux/Cabal-3.8.1.0/stack-cabal-mod b/Aufgabe_4/.stack-work/dist/x86_64-linux/Cabal-3.8.1.0/stack-cabal-mod new file mode 100644 index 0000000..5b04457 --- /dev/null +++ b/Aufgabe_4/.stack-work/dist/x86_64-linux/Cabal-3.8.1.0/stack-cabal-mod @@ -0,0 +1 @@ +Just used for its modification time \ No newline at end of file diff --git a/Aufgabe_4/.stack-work/dist/x86_64-linux/Cabal-3.8.1.0/stack-project-root b/Aufgabe_4/.stack-work/dist/x86_64-linux/Cabal-3.8.1.0/stack-project-root new file mode 100644 index 0000000..837480e --- /dev/null +++ b/Aufgabe_4/.stack-work/dist/x86_64-linux/Cabal-3.8.1.0/stack-project-root @@ -0,0 +1 @@ +/home/student/Documents/Anwendungsentwicklung/Aufgabe_4/ \ No newline at end of file diff --git a/Aufgabe_4/.stack-work/dist/x86_64-linux/Cabal-3.8.1.0/stack-setup-config-mod b/Aufgabe_4/.stack-work/dist/x86_64-linux/Cabal-3.8.1.0/stack-setup-config-mod new file mode 100644 index 0000000..5b04457 --- /dev/null +++ b/Aufgabe_4/.stack-work/dist/x86_64-linux/Cabal-3.8.1.0/stack-setup-config-mod @@ -0,0 +1 @@ +Just used for its modification time \ No newline at end of file diff --git a/Aufgabe_4/.stack-work/dist/x86_64-linux/Cabal-3.8.1.0/stack-test-success b/Aufgabe_4/.stack-work/dist/x86_64-linux/Cabal-3.8.1.0/stack-test-success new file mode 100644 index 0000000..0f0c913 --- /dev/null +++ b/Aufgabe_4/.stack-work/dist/x86_64-linux/Cabal-3.8.1.0/stack-test-success @@ -0,0 +1 @@ +success \ No newline at end of file diff --git a/Aufgabe_4/.stack-work/ghci/28a1c788/cabal_macros.h b/Aufgabe_4/.stack-work/ghci/28a1c788/cabal_macros.h new file mode 100644 index 0000000..5743714 --- /dev/null +++ b/Aufgabe_4/.stack-work/ghci/28a1c788/cabal_macros.h @@ -0,0 +1,183 @@ +/* DO NOT EDIT: This file is automatically generated by Cabal */ + +/* package ap04-0.1 */ +#ifndef VERSION_ap04 +#define VERSION_ap04 "0.1" +#endif /* VERSION_ap04 */ +#ifndef MIN_VERSION_ap04 +#define MIN_VERSION_ap04(major1,major2,minor) (\ + (major1) < 0 || \ + (major1) == 0 && (major2) < 1 || \ + (major1) == 0 && (major2) == 1 && (minor) <= 0) +#endif /* MIN_VERSION_ap04 */ +/* package HUnit-1.6.2.0 */ +#ifndef VERSION_HUnit +#define VERSION_HUnit "1.6.2.0" +#endif /* VERSION_HUnit */ +#ifndef MIN_VERSION_HUnit +#define MIN_VERSION_HUnit(major1,major2,minor) (\ + (major1) < 1 || \ + (major1) == 1 && (major2) < 6 || \ + (major1) == 1 && (major2) == 6 && (minor) <= 2) +#endif /* MIN_VERSION_HUnit */ +/* package base-4.17.2.0 */ +#ifndef VERSION_base +#define VERSION_base "4.17.2.0" +#endif /* VERSION_base */ +#ifndef MIN_VERSION_base +#define MIN_VERSION_base(major1,major2,minor) (\ + (major1) < 4 || \ + (major1) == 4 && (major2) < 17 || \ + (major1) == 4 && (major2) == 17 && (minor) <= 2) +#endif /* MIN_VERSION_base */ +/* package directory-1.3.7.1 */ +#ifndef VERSION_directory +#define VERSION_directory "1.3.7.1" +#endif /* VERSION_directory */ +#ifndef MIN_VERSION_directory +#define MIN_VERSION_directory(major1,major2,minor) (\ + (major1) < 1 || \ + (major1) == 1 && (major2) < 3 || \ + (major1) == 1 && (major2) == 3 && (minor) <= 7) +#endif /* MIN_VERSION_directory */ +/* package filepath-1.4.2.2 */ +#ifndef VERSION_filepath +#define VERSION_filepath "1.4.2.2" +#endif /* VERSION_filepath */ +#ifndef MIN_VERSION_filepath +#define MIN_VERSION_filepath(major1,major2,minor) (\ + (major1) < 1 || \ + (major1) == 1 && (major2) < 4 || \ + (major1) == 1 && (major2) == 4 && (minor) <= 2) +#endif /* MIN_VERSION_filepath */ +/* package text-2.0.2 */ +#ifndef VERSION_text +#define VERSION_text "2.0.2" +#endif /* VERSION_text */ +#ifndef MIN_VERSION_text +#define MIN_VERSION_text(major1,major2,minor) (\ + (major1) < 2 || \ + (major1) == 2 && (major2) < 0 || \ + (major1) == 2 && (major2) == 0 && (minor) <= 2) +#endif /* MIN_VERSION_text */ + +/* tool alex-3.2.5 */ +#ifndef TOOL_VERSION_alex +#define TOOL_VERSION_alex "3.2.5" +#endif /* TOOL_VERSION_alex */ +#ifndef MIN_TOOL_VERSION_alex +#define MIN_TOOL_VERSION_alex(major1,major2,minor) (\ + (major1) < 3 || \ + (major1) == 3 && (major2) < 2 || \ + (major1) == 3 && (major2) == 2 && (minor) <= 5) +#endif /* MIN_TOOL_VERSION_alex */ +/* tool gcc-11 */ +#ifndef TOOL_VERSION_gcc +#define TOOL_VERSION_gcc "11" +#endif /* TOOL_VERSION_gcc */ +#ifndef MIN_TOOL_VERSION_gcc +#define MIN_TOOL_VERSION_gcc(major1,major2,minor) (\ + (major1) < 11 || \ + (major1) == 11 && (major2) < 0 || \ + (major1) == 11 && (major2) == 0 && (minor) <= 0) +#endif /* MIN_TOOL_VERSION_gcc */ +/* tool ghc-9.4.7 */ +#ifndef TOOL_VERSION_ghc +#define TOOL_VERSION_ghc "9.4.7" +#endif /* TOOL_VERSION_ghc */ +#ifndef MIN_TOOL_VERSION_ghc +#define MIN_TOOL_VERSION_ghc(major1,major2,minor) (\ + (major1) < 9 || \ + (major1) == 9 && (major2) < 4 || \ + (major1) == 9 && (major2) == 4 && (minor) <= 7) +#endif /* MIN_TOOL_VERSION_ghc */ +/* tool ghc-pkg-9.4.7 */ +#ifndef TOOL_VERSION_ghc_pkg +#define TOOL_VERSION_ghc_pkg "9.4.7" +#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) < 4 || \ + (major1) == 9 && (major2) == 4 && (minor) <= 7) +#endif /* MIN_TOOL_VERSION_ghc_pkg */ +/* tool haddock-2.27.0 */ +#ifndef TOOL_VERSION_haddock +#define TOOL_VERSION_haddock "2.27.0" +#endif /* TOOL_VERSION_haddock */ +#ifndef MIN_TOOL_VERSION_haddock +#define MIN_TOOL_VERSION_haddock(major1,major2,minor) (\ + (major1) < 2 || \ + (major1) == 2 && (major2) < 27 || \ + (major1) == 2 && (major2) == 27 && (minor) <= 0) +#endif /* MIN_TOOL_VERSION_haddock */ +/* tool happy-1.19.12 */ +#ifndef TOOL_VERSION_happy +#define TOOL_VERSION_happy "1.19.12" +#endif /* TOOL_VERSION_happy */ +#ifndef MIN_TOOL_VERSION_happy +#define MIN_TOOL_VERSION_happy(major1,major2,minor) (\ + (major1) < 1 || \ + (major1) == 1 && (major2) < 19 || \ + (major1) == 1 && (major2) == 19 && (minor) <= 12) +#endif /* MIN_TOOL_VERSION_happy */ +/* 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 hscolour-1.24 */ +#ifndef TOOL_VERSION_hscolour +#define TOOL_VERSION_hscolour "1.24" +#endif /* TOOL_VERSION_hscolour */ +#ifndef MIN_TOOL_VERSION_hscolour +#define MIN_TOOL_VERSION_hscolour(major1,major2,minor) (\ + (major1) < 1 || \ + (major1) == 1 && (major2) < 24 || \ + (major1) == 1 && (major2) == 24 && (minor) <= 0) +#endif /* MIN_TOOL_VERSION_hscolour */ +/* tool runghc-9.4.7 */ +#ifndef TOOL_VERSION_runghc +#define TOOL_VERSION_runghc "9.4.7" +#endif /* TOOL_VERSION_runghc */ +#ifndef MIN_TOOL_VERSION_runghc +#define MIN_TOOL_VERSION_runghc(major1,major2,minor) (\ + (major1) < 9 || \ + (major1) == 9 && (major2) < 4 || \ + (major1) == 9 && (major2) == 4 && (minor) <= 7) +#endif /* MIN_TOOL_VERSION_runghc */ +/* tool strip-2.38 */ +#ifndef TOOL_VERSION_strip +#define TOOL_VERSION_strip "2.38" +#endif /* TOOL_VERSION_strip */ +#ifndef MIN_TOOL_VERSION_strip +#define MIN_TOOL_VERSION_strip(major1,major2,minor) (\ + (major1) < 2 || \ + (major1) == 2 && (major2) < 38 || \ + (major1) == 2 && (major2) == 38 && (minor) <= 0) +#endif /* MIN_TOOL_VERSION_strip */ + +#ifndef CURRENT_COMPONENT_ID +#define CURRENT_COMPONENT_ID "ap04-0.1-IBNuKk2558H4gTI6OCsam-ex01" +#endif /* CURRENT_COMPONENT_ID */ +#ifndef CURRENT_PACKAGE_VERSION +#define CURRENT_PACKAGE_VERSION "0.1" +#endif /* CURRENT_PACKAGE_VERSION */ + +#undef CURRENT_PACKAGE_KEY +#undef CURRENT_COMPONENT_ID diff --git a/Aufgabe_4/.stack-work/ghci/b3418b1e/cabal_macros.h b/Aufgabe_4/.stack-work/ghci/b3418b1e/cabal_macros.h new file mode 100644 index 0000000..9da93ea --- /dev/null +++ b/Aufgabe_4/.stack-work/ghci/b3418b1e/cabal_macros.h @@ -0,0 +1,183 @@ +/* DO NOT EDIT: This file is automatically generated by Cabal */ + +/* package ap04-0.1 */ +#ifndef VERSION_ap04 +#define VERSION_ap04 "0.1" +#endif /* VERSION_ap04 */ +#ifndef MIN_VERSION_ap04 +#define MIN_VERSION_ap04(major1,major2,minor) (\ + (major1) < 0 || \ + (major1) == 0 && (major2) < 1 || \ + (major1) == 0 && (major2) == 1 && (minor) <= 0) +#endif /* MIN_VERSION_ap04 */ +/* package HUnit-1.6.2.0 */ +#ifndef VERSION_HUnit +#define VERSION_HUnit "1.6.2.0" +#endif /* VERSION_HUnit */ +#ifndef MIN_VERSION_HUnit +#define MIN_VERSION_HUnit(major1,major2,minor) (\ + (major1) < 1 || \ + (major1) == 1 && (major2) < 6 || \ + (major1) == 1 && (major2) == 6 && (minor) <= 2) +#endif /* MIN_VERSION_HUnit */ +/* package base-4.17.2.0 */ +#ifndef VERSION_base +#define VERSION_base "4.17.2.0" +#endif /* VERSION_base */ +#ifndef MIN_VERSION_base +#define MIN_VERSION_base(major1,major2,minor) (\ + (major1) < 4 || \ + (major1) == 4 && (major2) < 17 || \ + (major1) == 4 && (major2) == 17 && (minor) <= 2) +#endif /* MIN_VERSION_base */ +/* package directory-1.3.7.1 */ +#ifndef VERSION_directory +#define VERSION_directory "1.3.7.1" +#endif /* VERSION_directory */ +#ifndef MIN_VERSION_directory +#define MIN_VERSION_directory(major1,major2,minor) (\ + (major1) < 1 || \ + (major1) == 1 && (major2) < 3 || \ + (major1) == 1 && (major2) == 3 && (minor) <= 7) +#endif /* MIN_VERSION_directory */ +/* package filepath-1.4.2.2 */ +#ifndef VERSION_filepath +#define VERSION_filepath "1.4.2.2" +#endif /* VERSION_filepath */ +#ifndef MIN_VERSION_filepath +#define MIN_VERSION_filepath(major1,major2,minor) (\ + (major1) < 1 || \ + (major1) == 1 && (major2) < 4 || \ + (major1) == 1 && (major2) == 4 && (minor) <= 2) +#endif /* MIN_VERSION_filepath */ +/* package text-2.0.2 */ +#ifndef VERSION_text +#define VERSION_text "2.0.2" +#endif /* VERSION_text */ +#ifndef MIN_VERSION_text +#define MIN_VERSION_text(major1,major2,minor) (\ + (major1) < 2 || \ + (major1) == 2 && (major2) < 0 || \ + (major1) == 2 && (major2) == 0 && (minor) <= 2) +#endif /* MIN_VERSION_text */ + +/* tool alex-3.2.5 */ +#ifndef TOOL_VERSION_alex +#define TOOL_VERSION_alex "3.2.5" +#endif /* TOOL_VERSION_alex */ +#ifndef MIN_TOOL_VERSION_alex +#define MIN_TOOL_VERSION_alex(major1,major2,minor) (\ + (major1) < 3 || \ + (major1) == 3 && (major2) < 2 || \ + (major1) == 3 && (major2) == 2 && (minor) <= 5) +#endif /* MIN_TOOL_VERSION_alex */ +/* tool gcc-11 */ +#ifndef TOOL_VERSION_gcc +#define TOOL_VERSION_gcc "11" +#endif /* TOOL_VERSION_gcc */ +#ifndef MIN_TOOL_VERSION_gcc +#define MIN_TOOL_VERSION_gcc(major1,major2,minor) (\ + (major1) < 11 || \ + (major1) == 11 && (major2) < 0 || \ + (major1) == 11 && (major2) == 0 && (minor) <= 0) +#endif /* MIN_TOOL_VERSION_gcc */ +/* tool ghc-9.4.7 */ +#ifndef TOOL_VERSION_ghc +#define TOOL_VERSION_ghc "9.4.7" +#endif /* TOOL_VERSION_ghc */ +#ifndef MIN_TOOL_VERSION_ghc +#define MIN_TOOL_VERSION_ghc(major1,major2,minor) (\ + (major1) < 9 || \ + (major1) == 9 && (major2) < 4 || \ + (major1) == 9 && (major2) == 4 && (minor) <= 7) +#endif /* MIN_TOOL_VERSION_ghc */ +/* tool ghc-pkg-9.4.7 */ +#ifndef TOOL_VERSION_ghc_pkg +#define TOOL_VERSION_ghc_pkg "9.4.7" +#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) < 4 || \ + (major1) == 9 && (major2) == 4 && (minor) <= 7) +#endif /* MIN_TOOL_VERSION_ghc_pkg */ +/* tool haddock-2.27.0 */ +#ifndef TOOL_VERSION_haddock +#define TOOL_VERSION_haddock "2.27.0" +#endif /* TOOL_VERSION_haddock */ +#ifndef MIN_TOOL_VERSION_haddock +#define MIN_TOOL_VERSION_haddock(major1,major2,minor) (\ + (major1) < 2 || \ + (major1) == 2 && (major2) < 27 || \ + (major1) == 2 && (major2) == 27 && (minor) <= 0) +#endif /* MIN_TOOL_VERSION_haddock */ +/* tool happy-1.19.12 */ +#ifndef TOOL_VERSION_happy +#define TOOL_VERSION_happy "1.19.12" +#endif /* TOOL_VERSION_happy */ +#ifndef MIN_TOOL_VERSION_happy +#define MIN_TOOL_VERSION_happy(major1,major2,minor) (\ + (major1) < 1 || \ + (major1) == 1 && (major2) < 19 || \ + (major1) == 1 && (major2) == 19 && (minor) <= 12) +#endif /* MIN_TOOL_VERSION_happy */ +/* 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 hscolour-1.24 */ +#ifndef TOOL_VERSION_hscolour +#define TOOL_VERSION_hscolour "1.24" +#endif /* TOOL_VERSION_hscolour */ +#ifndef MIN_TOOL_VERSION_hscolour +#define MIN_TOOL_VERSION_hscolour(major1,major2,minor) (\ + (major1) < 1 || \ + (major1) == 1 && (major2) < 24 || \ + (major1) == 1 && (major2) == 24 && (minor) <= 0) +#endif /* MIN_TOOL_VERSION_hscolour */ +/* tool runghc-9.4.7 */ +#ifndef TOOL_VERSION_runghc +#define TOOL_VERSION_runghc "9.4.7" +#endif /* TOOL_VERSION_runghc */ +#ifndef MIN_TOOL_VERSION_runghc +#define MIN_TOOL_VERSION_runghc(major1,major2,minor) (\ + (major1) < 9 || \ + (major1) == 9 && (major2) < 4 || \ + (major1) == 9 && (major2) == 4 && (minor) <= 7) +#endif /* MIN_TOOL_VERSION_runghc */ +/* tool strip-2.38 */ +#ifndef TOOL_VERSION_strip +#define TOOL_VERSION_strip "2.38" +#endif /* TOOL_VERSION_strip */ +#ifndef MIN_TOOL_VERSION_strip +#define MIN_TOOL_VERSION_strip(major1,major2,minor) (\ + (major1) < 2 || \ + (major1) == 2 && (major2) < 38 || \ + (major1) == 2 && (major2) == 38 && (minor) <= 0) +#endif /* MIN_TOOL_VERSION_strip */ + +#ifndef CURRENT_COMPONENT_ID +#define CURRENT_COMPONENT_ID "ap04-0.1-BP9EpaORhmkHoZEBAMsBA5-ttt" +#endif /* CURRENT_COMPONENT_ID */ +#ifndef CURRENT_PACKAGE_VERSION +#define CURRENT_PACKAGE_VERSION "0.1" +#endif /* CURRENT_PACKAGE_VERSION */ + +#undef CURRENT_PACKAGE_KEY +#undef CURRENT_COMPONENT_ID diff --git a/Aufgabe_4/.stack-work/ghci/ddc9e133/cabal_macros.h b/Aufgabe_4/.stack-work/ghci/ddc9e133/cabal_macros.h new file mode 100644 index 0000000..77214b8 --- /dev/null +++ b/Aufgabe_4/.stack-work/ghci/ddc9e133/cabal_macros.h @@ -0,0 +1,183 @@ +/* DO NOT EDIT: This file is automatically generated by Cabal */ + +/* package ap04-0.1 */ +#ifndef VERSION_ap04 +#define VERSION_ap04 "0.1" +#endif /* VERSION_ap04 */ +#ifndef MIN_VERSION_ap04 +#define MIN_VERSION_ap04(major1,major2,minor) (\ + (major1) < 0 || \ + (major1) == 0 && (major2) < 1 || \ + (major1) == 0 && (major2) == 1 && (minor) <= 0) +#endif /* MIN_VERSION_ap04 */ +/* package HUnit-1.6.2.0 */ +#ifndef VERSION_HUnit +#define VERSION_HUnit "1.6.2.0" +#endif /* VERSION_HUnit */ +#ifndef MIN_VERSION_HUnit +#define MIN_VERSION_HUnit(major1,major2,minor) (\ + (major1) < 1 || \ + (major1) == 1 && (major2) < 6 || \ + (major1) == 1 && (major2) == 6 && (minor) <= 2) +#endif /* MIN_VERSION_HUnit */ +/* package base-4.17.2.0 */ +#ifndef VERSION_base +#define VERSION_base "4.17.2.0" +#endif /* VERSION_base */ +#ifndef MIN_VERSION_base +#define MIN_VERSION_base(major1,major2,minor) (\ + (major1) < 4 || \ + (major1) == 4 && (major2) < 17 || \ + (major1) == 4 && (major2) == 17 && (minor) <= 2) +#endif /* MIN_VERSION_base */ +/* package directory-1.3.7.1 */ +#ifndef VERSION_directory +#define VERSION_directory "1.3.7.1" +#endif /* VERSION_directory */ +#ifndef MIN_VERSION_directory +#define MIN_VERSION_directory(major1,major2,minor) (\ + (major1) < 1 || \ + (major1) == 1 && (major2) < 3 || \ + (major1) == 1 && (major2) == 3 && (minor) <= 7) +#endif /* MIN_VERSION_directory */ +/* package filepath-1.4.2.2 */ +#ifndef VERSION_filepath +#define VERSION_filepath "1.4.2.2" +#endif /* VERSION_filepath */ +#ifndef MIN_VERSION_filepath +#define MIN_VERSION_filepath(major1,major2,minor) (\ + (major1) < 1 || \ + (major1) == 1 && (major2) < 4 || \ + (major1) == 1 && (major2) == 4 && (minor) <= 2) +#endif /* MIN_VERSION_filepath */ +/* package text-2.0.2 */ +#ifndef VERSION_text +#define VERSION_text "2.0.2" +#endif /* VERSION_text */ +#ifndef MIN_VERSION_text +#define MIN_VERSION_text(major1,major2,minor) (\ + (major1) < 2 || \ + (major1) == 2 && (major2) < 0 || \ + (major1) == 2 && (major2) == 0 && (minor) <= 2) +#endif /* MIN_VERSION_text */ + +/* tool alex-3.2.5 */ +#ifndef TOOL_VERSION_alex +#define TOOL_VERSION_alex "3.2.5" +#endif /* TOOL_VERSION_alex */ +#ifndef MIN_TOOL_VERSION_alex +#define MIN_TOOL_VERSION_alex(major1,major2,minor) (\ + (major1) < 3 || \ + (major1) == 3 && (major2) < 2 || \ + (major1) == 3 && (major2) == 2 && (minor) <= 5) +#endif /* MIN_TOOL_VERSION_alex */ +/* tool gcc-11 */ +#ifndef TOOL_VERSION_gcc +#define TOOL_VERSION_gcc "11" +#endif /* TOOL_VERSION_gcc */ +#ifndef MIN_TOOL_VERSION_gcc +#define MIN_TOOL_VERSION_gcc(major1,major2,minor) (\ + (major1) < 11 || \ + (major1) == 11 && (major2) < 0 || \ + (major1) == 11 && (major2) == 0 && (minor) <= 0) +#endif /* MIN_TOOL_VERSION_gcc */ +/* tool ghc-9.4.7 */ +#ifndef TOOL_VERSION_ghc +#define TOOL_VERSION_ghc "9.4.7" +#endif /* TOOL_VERSION_ghc */ +#ifndef MIN_TOOL_VERSION_ghc +#define MIN_TOOL_VERSION_ghc(major1,major2,minor) (\ + (major1) < 9 || \ + (major1) == 9 && (major2) < 4 || \ + (major1) == 9 && (major2) == 4 && (minor) <= 7) +#endif /* MIN_TOOL_VERSION_ghc */ +/* tool ghc-pkg-9.4.7 */ +#ifndef TOOL_VERSION_ghc_pkg +#define TOOL_VERSION_ghc_pkg "9.4.7" +#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) < 4 || \ + (major1) == 9 && (major2) == 4 && (minor) <= 7) +#endif /* MIN_TOOL_VERSION_ghc_pkg */ +/* tool haddock-2.27.0 */ +#ifndef TOOL_VERSION_haddock +#define TOOL_VERSION_haddock "2.27.0" +#endif /* TOOL_VERSION_haddock */ +#ifndef MIN_TOOL_VERSION_haddock +#define MIN_TOOL_VERSION_haddock(major1,major2,minor) (\ + (major1) < 2 || \ + (major1) == 2 && (major2) < 27 || \ + (major1) == 2 && (major2) == 27 && (minor) <= 0) +#endif /* MIN_TOOL_VERSION_haddock */ +/* tool happy-1.19.12 */ +#ifndef TOOL_VERSION_happy +#define TOOL_VERSION_happy "1.19.12" +#endif /* TOOL_VERSION_happy */ +#ifndef MIN_TOOL_VERSION_happy +#define MIN_TOOL_VERSION_happy(major1,major2,minor) (\ + (major1) < 1 || \ + (major1) == 1 && (major2) < 19 || \ + (major1) == 1 && (major2) == 19 && (minor) <= 12) +#endif /* MIN_TOOL_VERSION_happy */ +/* 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 hscolour-1.24 */ +#ifndef TOOL_VERSION_hscolour +#define TOOL_VERSION_hscolour "1.24" +#endif /* TOOL_VERSION_hscolour */ +#ifndef MIN_TOOL_VERSION_hscolour +#define MIN_TOOL_VERSION_hscolour(major1,major2,minor) (\ + (major1) < 1 || \ + (major1) == 1 && (major2) < 24 || \ + (major1) == 1 && (major2) == 24 && (minor) <= 0) +#endif /* MIN_TOOL_VERSION_hscolour */ +/* tool runghc-9.4.7 */ +#ifndef TOOL_VERSION_runghc +#define TOOL_VERSION_runghc "9.4.7" +#endif /* TOOL_VERSION_runghc */ +#ifndef MIN_TOOL_VERSION_runghc +#define MIN_TOOL_VERSION_runghc(major1,major2,minor) (\ + (major1) < 9 || \ + (major1) == 9 && (major2) < 4 || \ + (major1) == 9 && (major2) == 4 && (minor) <= 7) +#endif /* MIN_TOOL_VERSION_runghc */ +/* tool strip-2.38 */ +#ifndef TOOL_VERSION_strip +#define TOOL_VERSION_strip "2.38" +#endif /* TOOL_VERSION_strip */ +#ifndef MIN_TOOL_VERSION_strip +#define MIN_TOOL_VERSION_strip(major1,major2,minor) (\ + (major1) < 2 || \ + (major1) == 2 && (major2) < 38 || \ + (major1) == 2 && (major2) == 38 && (minor) <= 0) +#endif /* MIN_TOOL_VERSION_strip */ + +#ifndef CURRENT_COMPONENT_ID +#define CURRENT_COMPONENT_ID "ap04-0.1-A6vpXkJForv73N3yFCnv7V-ttt" +#endif /* CURRENT_COMPONENT_ID */ +#ifndef CURRENT_PACKAGE_VERSION +#define CURRENT_PACKAGE_VERSION "0.1" +#endif /* CURRENT_PACKAGE_VERSION */ + +#undef CURRENT_PACKAGE_KEY +#undef CURRENT_COMPONENT_ID diff --git a/Aufgabe_4/.stack-work/install/x86_64-linux/1006e3a79413cac00f66edc2857535513565a12ac86ee78bec0bc75edc5e5501/9.4.7/pkgdb/package.cache b/Aufgabe_4/.stack-work/install/x86_64-linux/1006e3a79413cac00f66edc2857535513565a12ac86ee78bec0bc75edc5e5501/9.4.7/pkgdb/package.cache new file mode 100644 index 0000000..b3cae5c Binary files /dev/null and b/Aufgabe_4/.stack-work/install/x86_64-linux/1006e3a79413cac00f66edc2857535513565a12ac86ee78bec0bc75edc5e5501/9.4.7/pkgdb/package.cache differ diff --git a/Aufgabe_4/.stack-work/install/x86_64-linux/1006e3a79413cac00f66edc2857535513565a12ac86ee78bec0bc75edc5e5501/9.4.7/pkgdb/package.cache.lock b/Aufgabe_4/.stack-work/install/x86_64-linux/1006e3a79413cac00f66edc2857535513565a12ac86ee78bec0bc75edc5e5501/9.4.7/pkgdb/package.cache.lock new file mode 100644 index 0000000..e69de29 diff --git a/Aufgabe_4/.stack-work/install/x86_64-linux/c95135353db856bc6efc9bd10e84b1a5a9a219f3607bca4f1889717059c848cc/9.4.7/bin/ttt b/Aufgabe_4/.stack-work/install/x86_64-linux/c95135353db856bc6efc9bd10e84b1a5a9a219f3607bca4f1889717059c848cc/9.4.7/bin/ttt new file mode 100755 index 0000000..4b8f747 Binary files /dev/null and b/Aufgabe_4/.stack-work/install/x86_64-linux/c95135353db856bc6efc9bd10e84b1a5a9a219f3607bca4f1889717059c848cc/9.4.7/bin/ttt differ diff --git a/Aufgabe_4/.stack-work/install/x86_64-linux/c95135353db856bc6efc9bd10e84b1a5a9a219f3607bca4f1889717059c848cc/9.4.7/installed-packages/ap04-0.1 b/Aufgabe_4/.stack-work/install/x86_64-linux/c95135353db856bc6efc9bd10e84b1a5a9a219f3607bca4f1889717059c848cc/9.4.7/installed-packages/ap04-0.1 new file mode 100644 index 0000000..795f563 --- /dev/null +++ b/Aufgabe_4/.stack-work/install/x86_64-linux/c95135353db856bc6efc9bd10e84b1a5a9a219f3607bca4f1889717059c848cc/9.4.7/installed-packages/ap04-0.1 @@ -0,0 +1 @@ +Installed \ No newline at end of file diff --git a/Aufgabe_4/.stack-work/install/x86_64-linux/c95135353db856bc6efc9bd10e84b1a5a9a219f3607bca4f1889717059c848cc/9.4.7/pkgdb/package.cache b/Aufgabe_4/.stack-work/install/x86_64-linux/c95135353db856bc6efc9bd10e84b1a5a9a219f3607bca4f1889717059c848cc/9.4.7/pkgdb/package.cache new file mode 100644 index 0000000..b3cae5c Binary files /dev/null and b/Aufgabe_4/.stack-work/install/x86_64-linux/c95135353db856bc6efc9bd10e84b1a5a9a219f3607bca4f1889717059c848cc/9.4.7/pkgdb/package.cache differ diff --git a/Aufgabe_4/.stack-work/install/x86_64-linux/c95135353db856bc6efc9bd10e84b1a5a9a219f3607bca4f1889717059c848cc/9.4.7/pkgdb/package.cache.lock b/Aufgabe_4/.stack-work/install/x86_64-linux/c95135353db856bc6efc9bd10e84b1a5a9a219f3607bca4f1889717059c848cc/9.4.7/pkgdb/package.cache.lock new file mode 100644 index 0000000..e69de29 diff --git a/Aufgabe_4/.stack-work/stack.sqlite3 b/Aufgabe_4/.stack-work/stack.sqlite3 new file mode 100644 index 0000000..336db55 Binary files /dev/null and b/Aufgabe_4/.stack-work/stack.sqlite3 differ diff --git a/Aufgabe_4/.stack-work/stack.sqlite3.pantry-write-lock b/Aufgabe_4/.stack-work/stack.sqlite3.pantry-write-lock new file mode 100644 index 0000000..e69de29 diff --git a/Aufgabe_4/.vscode/settings.json b/Aufgabe_4/.vscode/settings.json new file mode 100755 index 0000000..41a9e4b --- /dev/null +++ b/Aufgabe_4/.vscode/settings.json @@ -0,0 +1,3 @@ +{ + "haskell.plugin.hlint.codeActionsOn": false +} diff --git a/Aufgabe_4/04-real-world.pdf b/Aufgabe_4/04-real-world.pdf new file mode 100644 index 0000000..7e5706c Binary files /dev/null and b/Aufgabe_4/04-real-world.pdf differ diff --git a/Aufgabe_4/ap04.cabal b/Aufgabe_4/ap04.cabal new file mode 100644 index 0000000..c9a4755 --- /dev/null +++ b/Aufgabe_4/ap04.cabal @@ -0,0 +1,96 @@ +cabal-version: 1.12 + +-- This file has been generated from package.yaml by hpack version 0.35.2. +-- +-- see: https://github.com/sol/hpack + +name: ap04 +version: 0.1 +synopsis: ap04 +license: BSD3 +build-type: Simple + +flag test-mode + description: By default, do not run instructor tests + manual: True + default: False + +executable ttt + main-is: Main.hs + other-modules: + TicTacToe + hs-source-dirs: + ex02 + default-extensions: + ScopedTypeVariables + ghc-options: -Werror -W -fwarn-unused-imports -fwarn-unused-binds -fwarn-orphans -fwarn-unused-matches -fwarn-unused-do-bind -fwarn-wrong-do-bind -fwarn-missing-signatures -fno-warn-partial-type-signatures -Wredundant-constraints + build-depends: + HUnit + , base + , directory + , filepath + , text + default-language: Haskell2010 + if flag(test-mode) + build-depends: + bytestring + , directory + , filepath + , haskell-src-meta + , main-tester + , template-haskell + else + +test-suite ex01 + type: exitcode-stdio-1.0 + main-is: Main.hs + other-modules: + Files + hs-source-dirs: + ex01 + default-extensions: + ScopedTypeVariables + ghc-options: -Werror -W -fwarn-unused-imports -fwarn-unused-binds -fwarn-orphans -fwarn-unused-matches -fwarn-unused-do-bind -fwarn-wrong-do-bind -fwarn-missing-signatures -fno-warn-partial-type-signatures -Wredundant-constraints + build-depends: + HUnit + , base + , directory + , filepath + , text + default-language: Haskell2010 + if flag(test-mode) + build-depends: + bytestring + , directory + , filepath + , haskell-src-meta + , main-tester + , template-haskell + else + +test-suite ex02 + type: exitcode-stdio-1.0 + main-is: MainTests.hs + other-modules: + TicTacToe + hs-source-dirs: + ex02 + default-extensions: + ScopedTypeVariables + ghc-options: -Werror -W -fwarn-unused-imports -fwarn-unused-binds -fwarn-orphans -fwarn-unused-matches -fwarn-unused-do-bind -fwarn-wrong-do-bind -fwarn-missing-signatures -fno-warn-partial-type-signatures -Wredundant-constraints + build-depends: + HUnit + , base + , directory + , filepath + , text + default-language: Haskell2010 + if flag(test-mode) + build-depends: + bytestring + , directory + , filepath + , haskell-src-meta + , main-tester + , template-haskell + else diff --git a/Aufgabe_4/blatt-04.pdf b/Aufgabe_4/blatt-04.pdf new file mode 100644 index 0000000..446a176 Binary files /dev/null and b/Aufgabe_4/blatt-04.pdf differ diff --git a/Aufgabe_4/ex01/Files.hs b/Aufgabe_4/ex01/Files.hs new file mode 100755 index 0000000..22c92e4 --- /dev/null +++ b/Aufgabe_4/ex01/Files.hs @@ -0,0 +1,100 @@ +module Files where + +import Test.HUnit ( assertEqual, Test(..) ) + +import System.IO ( withFile, IOMode(ReadMode) ) + +import qualified Data.Text as T +import qualified Data.Text.IO as T + +import Data.Text(isInfixOf) + +import System.Directory (doesFileExist, doesDirectoryExist, listDirectory) + +allTests :: Test +allTests = TestList [ + TestLabel "testFileContains" testFileContains, + TestLabel "testContainsRecursively" testContainsRecursively + ] + +------------------------------------------------- +-- Aufgabe 1 (a) +------------------------------------------------- +fileContains :: FilePath -> T.Text -> IO Bool +fileContains filePath textToSearch = do + fileExists <- doesFileExist filePath + if not fileExists + then pure False + else do + content <- withFile filePath ReadMode (\handle -> T.hGetContents handle) + pure (textToSearch `isInfixOf` content) + +---------- --------------------------------------- +-- Aufgabe 1 (a) Test +------------------------------------------------- +testFileContains :: Test +testFileContains = TestCase $ do + containsTest1 <- (fileContains "sample-dir/1.txt" (T.pack "fun to lose")) + assertEqual "test1" True containsTest1 + containsTest2 <- (fileContains "sample-dir/2.txt" (T.pack "entertain us")) + assertEqual "test2" True containsTest2 + containsTest3 <- (fileContains "sample-dir/2.txt" (T.pack "entertain yourself")) + assertEqual "test3" False containsTest3 + +------------------------------------------------- +-- Aufgabe 1 (b) +------------------------------------------------- +--listDirectory :: FilePath -> IO [FilePath] +containsRecursively :: FilePath -> T.Text -> IO Bool +containsRecursively filePath textToSearchFor = do + thisIsDirectory <- doesDirectoryExist filePath + if thisIsDirectory + then do + -- Current file path is directory so get all sub directories and files in it. + subDirectories <- listDirectory filePath + case subDirectories of + [] -> pure False + (first:rest) -> do + firstIsDirectory <- doesDirectoryExist (filePath ++ "/" ++ first) + if firstIsDirectory + -- If first is directory go deeper into left directory tree of first directory. + -- After that go into right part trees and search their left branches and right + -- part trees recursively. + then do + containsRec <- containsRecursively (filePath ++ "/" ++ first) textToSearchFor + iterateLi <- iterateList filePath rest textToSearchFor + if containsRec || iterateLi + then pure True + else pure False + else do + -- If first is a file, search file for textToSearchFor. + fileContainsTextInFirst <- fileContains (filePath ++ "/" ++ first) textToSearchFor + if fileContainsTextInFirst + then pure True + -- Iterate through the rest of sub directories. + else do + iterateList filePath rest textToSearchFor + -- Current file path is a file so search for textToSearchFor. + else fileContains filePath textToSearchFor + +iterateList :: FilePath -> [FilePath] -> T.Text -> IO Bool +iterateList mainDirectory subDirectories textToSearchFor = + case subDirectories of + [] -> pure False + (first:rest) -> do + firstContainsTextRecursively <- containsRecursively (mainDirectory ++ "/" ++ first) textToSearchFor + if firstContainsTextRecursively + then pure True + else iterateList mainDirectory rest textToSearchFor + +------------------------------------------------- +-- Aufgabe 1 (b) Test +------------------------------------------------- +testContainsRecursively :: Test +testContainsRecursively = TestCase $ do + containsTest1 <- (containsRecursively "sample-dir" (T.pack "fun to lose")) + assertEqual "test1" True containsTest1 + containsTest2 <- (containsRecursively "sample-dir" (T.pack "entertain us")) + assertEqual "test2" True containsTest2 + containsTest3 <- (containsRecursively "sample-dir" (T.pack "hello, hello")) + assertEqual "test3" True containsTest3 diff --git a/Aufgabe_4/ex01/Main.hs b/Aufgabe_4/ex01/Main.hs new file mode 100755 index 0000000..58ac39d --- /dev/null +++ b/Aufgabe_4/ex01/Main.hs @@ -0,0 +1,7 @@ +module Main where + +import Test.HUnit +import Files (allTests) + +main :: IO () +main = runTestTTAndExit allTests diff --git a/Aufgabe_4/ex02/Main.hs b/Aufgabe_4/ex02/Main.hs new file mode 100755 index 0000000..a675c3b --- /dev/null +++ b/Aufgabe_4/ex02/Main.hs @@ -0,0 +1,6 @@ +module Main where + +import TicTacToe + +main :: IO () +main = fullGame diff --git a/Aufgabe_4/ex02/MainTests.hs b/Aufgabe_4/ex02/MainTests.hs new file mode 100755 index 0000000..b95e4c7 --- /dev/null +++ b/Aufgabe_4/ex02/MainTests.hs @@ -0,0 +1,7 @@ +module Main where + +import Test.HUnit +import TicTacToe (allTests) + +main :: IO () +main = runTestTTAndExit allTests diff --git a/Aufgabe_4/ex02/TicTacToe.hs b/Aufgabe_4/ex02/TicTacToe.hs new file mode 100755 index 0000000..164dd96 --- /dev/null +++ b/Aufgabe_4/ex02/TicTacToe.hs @@ -0,0 +1,294 @@ +{-# LANGUAGE BlockArguments #-} +module TicTacToe where + +import Test.HUnit +import Data.Maybe (isNothing, fromMaybe, isJust) +import Data.Char (digitToInt, intToDigit) +import GHC.Unicode (isDigit) + +allTests :: Test +allTests = TestList [ + testGameFull, + testCheckWinner, + testPlacePlayer, + testGameToString + ] + +data Player = PlayerX | PlayerO + deriving (Eq, Show) + +data Mark = X | O | E + deriving (Eq, Show) + +type Game = [[Mark]] + +------------------------------------------------- +-- Aufgabe 2 (a) +------------------------------------------------- +gameFull :: Game -> Bool +gameFull game = + case game of + [[]] -> False + [firstColumn, secondColumn, thirdColumn] -> + columnFull firstColumn + && columnFull secondColumn + && columnFull thirdColumn + _ -> False + +columnFull :: [Mark] -> Bool +columnFull column = + case column of + [first, second, third] -> (first /= E) && (second /= E) && (third /= E) + _ -> False + +------------------------------------------------- +-- Aufgabe 2 (a) Test +------------------------------------------------- +testGameFull:: Test +testGameFull = TestCase $ do + assertEqual "test1" False (gameFull [[O, X, O],[O, O, O],[X, X, E]]) + assertEqual "test2" True (gameFull [[O, X, O],[O, O, O],[X, X, X]]) + assertEqual "test3" False (gameFull [[O, X, O],[O, E, O],[X, X, O]]) + +------------------------------------------------- +-- Aufgabe 2 (b) +------------------------------------------------- +checkWinner :: Game -> Maybe Player +checkWinner game = + case game of + [firstColumn, secondColumn, thirdColumn] -> + let + winner1 = checkWinnerVertical firstColumn + winner2 = checkWinnerVertical secondColumn + winner3 = checkWinnerVertical thirdColumn + winner4 = checkWinnerHorizontal (mapRow game 0) + winner5 = checkWinnerHorizontal (mapRow game 1) + winner6 = checkWinnerHorizontal (mapRow game 2) + winner7 = checkWinnerDiagonal game + resultList = [winner1, winner2, winner3, winner4, winner5, winner6, winner7] + in + getMaybeWinnerFromPlayerList resultList + _ -> Nothing + +-- Checks list of maybe player if containing a player, returns first +-- element which is a player. +getMaybeWinnerFromPlayerList :: [Maybe Player] -> Maybe Player +getMaybeWinnerFromPlayerList players = + case players of + [] -> Nothing + (first:rest) -> + if isNothing first + then getMaybeWinnerFromPlayerList rest + else first + +-- Maps given mark to player. +mapMarkToPlayer :: Mark -> Maybe Player +mapMarkToPlayer mark = + case mark of + X -> Just PlayerX + O -> Just PlayerO + E -> Nothing + +-- Checks given row for winner. +checkWinnerHorizontal :: [Mark] -> Maybe Player +checkWinnerHorizontal row = + case row of + [first, second, third] -> + if first == second && second == third + then + mapMarkToPlayer first + else Nothing + _ -> Nothing + +-- Checks given column for winner. +checkWinnerVertical :: [Mark] -> Maybe Player +checkWinnerVertical column = + checkWinnerHorizontal column + +-- Takes game and returns list containing elements +-- from one row, indicated by rowID. +mapRow :: Game -> Int -> [Mark] +mapRow game rowID = + case rowID of + 0 -> (\[[first, _, _], [second, _, _], [third, _, _]] -> [first,second,third]) game + 1 -> (\[[_, first, _], [_, second, _], [_, third, _]] -> [first,second,third]) game + 2 -> (\[[_, _, first], [_, _, second], [_, _, third]] -> [first,second,third]) game + _ -> [] + +-- Checks both diagonals for winner. +checkWinnerDiagonal :: Game -> Maybe Player +checkWinnerDiagonal game = + case game of + [[topLeftCorner, _, bottomLeftCorner],[_, middle, _],[topRightCorner, _, bottomRightCorner]] -> + if topLeftCorner == middle && middle == bottomRightCorner + then mapMarkToPlayer topLeftCorner + else if topRightCorner == middle && middle == bottomLeftCorner + then mapMarkToPlayer topRightCorner + else Nothing + _ -> Nothing + +------------------------------------------------- +-- Aufgabe 2 (b) Test +------------------------------------------------- +testCheckWinner:: Test +testCheckWinner = TestCase $ do + assertEqual "test column" (Just PlayerO) (checkWinner [[O, O, O],[E, E, E],[X, X, E]]) + assertEqual "test row" (Just PlayerO) (checkWinner [[O, E, E],[O, E, E],[O, E, E]]) + assertEqual "test empty game" Nothing (checkWinner [[E, E, E],[E, E, E],[E, E, E]]) + assertEqual "test DiagonalTopLeft to BottomRight" (Just PlayerX) (checkWinner [[X, E, E],[E, X, E],[E, E, X]]) + assertEqual "test DiagonalBottomLeft to TopRight" (Just PlayerX) (checkWinner [[E, E, X],[E, X, E],[X, E, E]]) + +------------------------------------------------- +-- Aufgabe 2 (c) +------------------------------------------------- +placePlayer :: Game -> (Int, Int) -> Player -> Maybe Game +placePlayer game (x, y) player = + let [firstColumn, secondColumn, thirdColumn] = game + in + case x of + 0 -> let newFirstColumn = set y (mapPlayerToMark player) firstColumn + in if isNothing newFirstColumn + then Nothing + else Just [fromMaybe [] newFirstColumn, secondColumn, thirdColumn] + 1 -> let newSecondColumn = set y (mapPlayerToMark player) secondColumn + in if isNothing newSecondColumn + then Nothing + else Just [firstColumn, fromMaybe [] newSecondColumn, thirdColumn] + 2 -> let newThirdColumn = set y (mapPlayerToMark player) thirdColumn + in if isNothing newThirdColumn + then Nothing + else Just [firstColumn, secondColumn, fromMaybe [] newThirdColumn] + _ -> Nothing + +-- Maps player to mark. +mapPlayerToMark :: Player -> Mark +mapPlayerToMark player = + case player of + PlayerO -> O + PlayerX -> X + +-- Sets given y position at column to mark, +-- if given position is empty and the index +-- of y is valid. +-- Returns given column, if invalid, and +-- mutated column if valid. +set :: Int -> Mark -> [Mark] -> Maybe [Mark] +set yPosition mark column = + case column of + [first, second, third] -> + case yPosition of + 0 -> if first /= E + then Nothing + else Just [mark, second, third] + 1 -> if second /= E + then Nothing + else Just [first, mark, third] + 2 -> if third /= E + then Nothing + else Just [first, second, mark] + _ -> Nothing + _ -> Nothing + +------------------------------------------------- +-- Aufgabe 2 (c) Test +------------------------------------------------- +testPlacePlayer:: Test +testPlacePlayer = TestCase $ do + assertEqual "test place player O on empty field" (Just [[O, E, E],[E, E, E],[E, E, E]]) (placePlayer [[E, E, E],[E, E, E],[E, E, E]] (0,0) PlayerO) + assertEqual "test place player X on empty field" (Just [[X, E, E],[E, E, E],[E, E, E]]) (placePlayer [[E, E, E],[E, E, E],[E, E, E]] (0,0) PlayerX) + assertEqual "test place player O on X occupied field" Nothing (placePlayer [[X, E, E],[E, E, E],[E, E, E]] (0,0) PlayerO) + assertEqual "test place player X on O occupied field" Nothing (placePlayer [[O, E, E],[E, E, E],[E, E, E]] (0,0) PlayerX) + assertEqual "test place player invalid x index" Nothing (placePlayer [[X, E, E],[E, E, E],[E, E, E]] (3,0) PlayerO) + assertEqual "test place player invalid y index" Nothing (placePlayer [[O, E, E],[E, E, E],[E, E, E]] (0,3) PlayerX) + +------------------------------------------------- +-- Aufgabe 2 (d) +------------------------------------------------- +gameToString :: Game -> String +gameToString game = + let [firstRow, secondRow, thirdRow] = game + in let + [e1, e2, e3] = firstRow + [e4, e5, e6] = secondRow + [e7, e8, e9] = thirdRow + in "| " ++ [markToChar e1] ++ " | " ++ [markToChar e2] ++ " | " ++ [markToChar e3] ++ " |\n" + ++ "| " ++ [markToChar e4] ++ " | " ++ [markToChar e5] ++ " | " ++ [markToChar e6] ++ " |\n" + ++ "| " ++ [markToChar e7] ++ " | " ++ [markToChar e8] ++ " | " ++ [markToChar e9] ++ " |\n" + +markToChar :: Mark -> Char +markToChar mark = + case mark of + O -> 'o' + X -> 'x' + E -> '-' + +------------------------------------------------- +-- Aufgabe 2 (d) Test +------------------------------------------------- +testGameToString:: Test +testGameToString = TestCase $ do + assertEqual "test print empty game" "| - | - | - |\n| - | - | - |\n| - | - | - |\n" (gameToString [[E, E, E],[E, E, E],[E, E, E]]) + assertEqual "test print filled game" "| o | x | o |\n| o | o | o |\n| o | x | o |\n" (gameToString [[O, X, O],[O, O, O],[O, X, O]]) + +------------------------------------------------- +-- Aufgabe 2 (e) +------------------------------------------------- +getMove :: Player -> IO (Int, Int) +getMove player = do + putStrLn ("Eingabe " ++ show player ++ " in der Form Zeile,Spalte:") + input <- getLine + if input /= "" + then + let (x,y) = getXYCoordinate input + in if x > -1 && x < 3 && y > -1 && y < 3 + then pure (x,y) + else do + putStrLn ("Fehler in der Eingabe von " ++ show player ++ " bitte gebe die Koordinaten erneut ein.") + getMove player + else do + putStrLn ("Fehler in der Eingabe von " ++ show player ++ " bitte gebe die Koordinaten erneut ein.") + getMove player + +getXYCoordinate :: String -> (Int,Int) +getXYCoordinate input = + case input of + [x,comma,y] -> + if isDigit x && comma == ',' && isDigit y + then (digitToInt x, digitToInt y) + else (-1,-1) + _ -> (-1,-1) + +------------------------------------------------- +-- Aufgabe 2 (f) +------------------------------------------------- +halfMove :: Game -> Player -> IO (Maybe Game) +halfMove game player = do + putStr(gameToString game) + move <- getMove player + let + nextGame = placePlayer game move player + in + if isJust nextGame + then + if isJust (checkWinner (fromMaybe game nextGame)) + || gameFull (fromMaybe game nextGame) + then pure Nothing + else pure nextGame + else halfMove game player + +------------------------------------------------- +-- Aufgabe 2 (g) +------------------------------------------------- +fullGame :: IO () +fullGame = + fullGameWithTurn 1 emptyGame + +fullGameWithTurn :: Int -> Game -> IO() +fullGameWithTurn turn game = do + putStrLn("Zug " ++ [intToDigit turn]) + gameO <- halfMove game PlayerO + gameX <- halfMove (fromMaybe emptyGame gameO) PlayerX + fullGameWithTurn (turn+1) (fromMaybe emptyGame gameX) + +emptyGame :: Game +emptyGame = [[E,E,E],[E,E,E],[E,E,E]] \ No newline at end of file diff --git a/Aufgabe_4/package.yaml b/Aufgabe_4/package.yaml new file mode 100755 index 0000000..1d0b3a7 --- /dev/null +++ b/Aufgabe_4/package.yaml @@ -0,0 +1,57 @@ +name: ap04 +version: 0.1 +synopsis: ap04 +license: BSD3 + +dependencies: + - base + - HUnit + - text + - directory + - filepath + +executables: + ttt: + main: Main.hs + other-modules: TicTacToe + source-dirs: ex02 + +tests: + ex01: + main: Main.hs + other-modules: Files + source-dirs: ex01 + ex02: + main: MainTests.hs + other-modules: TicTacToe + source-dirs: ex02 + +ghc-options: + - -Werror -W -fwarn-unused-imports -fwarn-unused-binds -fwarn-orphans + - -fwarn-unused-matches -fwarn-unused-do-bind -fwarn-wrong-do-bind + - -fwarn-missing-signatures -fno-warn-partial-type-signatures + - -Wredundant-constraints + +default-extensions: + - ScopedTypeVariables + +# Setup for running tests in praktomat + +flags: + test-mode: + description: "By default, do not run instructor tests" + manual: true + default: false + +when: +- condition: flag(test-mode) + then: + dependencies: + - template-haskell + - haskell-src-meta + - filepath + - bytestring + - directory + - main-tester + else: + dependencies: [] diff --git a/Aufgabe_4/sample-dir/1.txt b/Aufgabe_4/sample-dir/1.txt new file mode 100755 index 0000000..557084f --- /dev/null +++ b/Aufgabe_4/sample-dir/1.txt @@ -0,0 +1,4 @@ +Load up on guns, bring your friends +It's fun to lose and to pretend +She's over-bored and self-assured +Oh no, I know a dirty word \ No newline at end of file diff --git a/Aufgabe_4/sample-dir/2.txt b/Aufgabe_4/sample-dir/2.txt new file mode 100755 index 0000000..9a2f6d4 --- /dev/null +++ b/Aufgabe_4/sample-dir/2.txt @@ -0,0 +1,6 @@ +With the lights out, it's less dangerous +Here we are now, entertain us +I feel stupid and contagious +Here we are now, entertain us +A mulatto, an albino, a mosquito, my libido +Yeah, hey diff --git a/Aufgabe_4/sample-dir/A/3.txt b/Aufgabe_4/sample-dir/A/3.txt new file mode 100755 index 0000000..7c22d80 --- /dev/null +++ b/Aufgabe_4/sample-dir/A/3.txt @@ -0,0 +1,4 @@ +I'm worse at what I do best +And for this gift I feel blessed +Our little group has always been +And always will until the end diff --git a/Aufgabe_4/sample-dir/A/C/4.txt b/Aufgabe_4/sample-dir/A/C/4.txt new file mode 100755 index 0000000..51bf8f4 --- /dev/null +++ b/Aufgabe_4/sample-dir/A/C/4.txt @@ -0,0 +1,4 @@ +And I forget just why I taste +Oh yeah, I guess it makes me smile +I found it hard, was hard to find +Oh well, whatever, never mind diff --git a/Aufgabe_4/sample-dir/B/5.txt b/Aufgabe_4/sample-dir/B/5.txt new file mode 100755 index 0000000..c7d8fac --- /dev/null +++ b/Aufgabe_4/sample-dir/B/5.txt @@ -0,0 +1,4 @@ +Hello, hello, hello, how low +Hello, hello, hello, how low +Hello, hello, hello, how low +Hello, hello, hello diff --git a/Aufgabe_4/stack.yaml b/Aufgabe_4/stack.yaml new file mode 100755 index 0000000..ba6a80f --- /dev/null +++ b/Aufgabe_4/stack.yaml @@ -0,0 +1,3 @@ +resolver: lts-21.14 +packages: +- . diff --git a/Aufgabe_4/stack.yaml.lock b/Aufgabe_4/stack.yaml.lock new file mode 100644 index 0000000..31decf5 --- /dev/null +++ b/Aufgabe_4/stack.yaml.lock @@ -0,0 +1,12 @@ +# This file was autogenerated by Stack. +# You should not edit this file by hand. +# For more information, please see the documentation at: +# https://docs.haskellstack.org/en/stable/lock_files + +packages: [] +snapshots: +- completed: + sha256: 60e54c1ba3c1e7163acf6dafa9d56b2d3b23f88a31ad53a1c9d888f32561f8da + size: 639819 + url: https://raw.githubusercontent.com/commercialhaskell/stackage-snapshots/master/lts/21/14.yaml + original: lts-21.14 diff --git a/Aufgabe_5/05-monads.pdf b/Aufgabe_5/05-monads.pdf new file mode 100644 index 0000000..15b0203 Binary files /dev/null and b/Aufgabe_5/05-monads.pdf differ diff --git a/Aufgabe_5/blatt-05.pdf b/Aufgabe_5/blatt-05.pdf new file mode 100644 index 0000000..f3a7f90 Binary files /dev/null and b/Aufgabe_5/blatt-05.pdf differ diff --git a/Aufgabe_5/code(1).zip b/Aufgabe_5/code(1).zip new file mode 100644 index 0000000..1551184 Binary files /dev/null and b/Aufgabe_5/code(1).zip differ diff --git a/Aufgabe_5/code/.hlint.yaml b/Aufgabe_5/code/.hlint.yaml new file mode 100755 index 0000000..bd7575b --- /dev/null +++ b/Aufgabe_5/code/.hlint.yaml @@ -0,0 +1,31 @@ +# HLint configuration file +# https://github.com/ndmitchell/hlint + +# Ignore some builtin hints +- ignore: {name: "Avoid lambda using `infix`"} +- ignore: {name: "Avoid lambda"} +- ignore: {name: "Eta reduce"} +- ignore: {name: "Move brackets to avoid $"} +- ignore: {name: "Reduce duplication" } +- ignore: {name: "Redundant $!" } +- ignore: {name: "Redundant bracket"} +- ignore: {name: "Redundant do"} +- ignore: {name: "Redundant pure"} +- ignore: {name: "Redundant return"} +- ignore: {name: "Replace case with maybe"} +- ignore: {name: "Use $>" } +- ignore: {name: "Use <$>"} +- ignore: {name: "Use camelCase" } +- ignore: {name: "Use const"} +- ignore: {name: "Use fmap" } +- ignore: {name: "Use foldr"} +- ignore: {name: "Use guards"} +- ignore: {name: "Use if"} +- ignore: {name: "Use list comprehension"} +- ignore: {name: "Use maybe"} +- ignore: {name: "Use newtype instead of data"} +- ignore: {name: "Use notElem"} +- ignore: {name: "Use second" } +- ignore: {name: "Use section" } +- ignore: {name: "Use tuple-section"} +- ignore: {name: "Use uncurry" } diff --git a/Aufgabe_5/code/.stack-work/dist/x86_64-linux/Cabal-3.8.1.0/build-lock b/Aufgabe_5/code/.stack-work/dist/x86_64-linux/Cabal-3.8.1.0/build-lock new file mode 100644 index 0000000..e69de29 diff --git a/Aufgabe_5/code/.stack-work/dist/x86_64-linux/Cabal-3.8.1.0/build/ex01/autogen/Paths_ap05.hs b/Aufgabe_5/code/.stack-work/dist/x86_64-linux/Cabal-3.8.1.0/build/ex01/autogen/Paths_ap05.hs new file mode 100644 index 0000000..dcd3679 --- /dev/null +++ b/Aufgabe_5/code/.stack-work/dist/x86_64-linux/Cabal-3.8.1.0/build/ex01/autogen/Paths_ap05.hs @@ -0,0 +1,74 @@ +{-# LANGUAGE CPP #-} +{-# LANGUAGE NoRebindableSyntax #-} +{-# OPTIONS_GHC -fno-warn-missing-import-lists #-} +{-# OPTIONS_GHC -w #-} +module Paths_ap05 ( + 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] [] + +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 = "/home/student/Documents/Anwendungsentwicklung/Aufgabe_5/code/.stack-work/install/x86_64-linux/c95135353db856bc6efc9bd10e84b1a5a9a219f3607bca4f1889717059c848cc/9.4.7/bin" +libdir = "/home/student/Documents/Anwendungsentwicklung/Aufgabe_5/code/.stack-work/install/x86_64-linux/c95135353db856bc6efc9bd10e84b1a5a9a219f3607bca4f1889717059c848cc/9.4.7/lib/x86_64-linux-ghc-9.4.7/ap05-0.1-1WN5bfNZMxCBk9rV3xcl3T-ex01" +dynlibdir = "/home/student/Documents/Anwendungsentwicklung/Aufgabe_5/code/.stack-work/install/x86_64-linux/c95135353db856bc6efc9bd10e84b1a5a9a219f3607bca4f1889717059c848cc/9.4.7/lib/x86_64-linux-ghc-9.4.7" +datadir = "/home/student/Documents/Anwendungsentwicklung/Aufgabe_5/code/.stack-work/install/x86_64-linux/c95135353db856bc6efc9bd10e84b1a5a9a219f3607bca4f1889717059c848cc/9.4.7/share/x86_64-linux-ghc-9.4.7/ap05-0.1" +libexecdir = "/home/student/Documents/Anwendungsentwicklung/Aufgabe_5/code/.stack-work/install/x86_64-linux/c95135353db856bc6efc9bd10e84b1a5a9a219f3607bca4f1889717059c848cc/9.4.7/libexec/x86_64-linux-ghc-9.4.7/ap05-0.1" +sysconfdir = "/home/student/Documents/Anwendungsentwicklung/Aufgabe_5/code/.stack-work/install/x86_64-linux/c95135353db856bc6efc9bd10e84b1a5a9a219f3607bca4f1889717059c848cc/9.4.7/etc" + +getBinDir = catchIO (getEnv "ap05_bindir") (\_ -> return bindir) +getLibDir = catchIO (getEnv "ap05_libdir") (\_ -> return libdir) +getDynLibDir = catchIO (getEnv "ap05_dynlibdir") (\_ -> return dynlibdir) +getDataDir = catchIO (getEnv "ap05_datadir") (\_ -> return datadir) +getLibexecDir = catchIO (getEnv "ap05_libexecdir") (\_ -> return libexecdir) +getSysconfDir = catchIO (getEnv "ap05_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 == '/' diff --git a/Aufgabe_5/code/.stack-work/dist/x86_64-linux/Cabal-3.8.1.0/build/ex01/autogen/cabal_macros.h b/Aufgabe_5/code/.stack-work/dist/x86_64-linux/Cabal-3.8.1.0/build/ex01/autogen/cabal_macros.h new file mode 100644 index 0000000..fa83a4f --- /dev/null +++ b/Aufgabe_5/code/.stack-work/dist/x86_64-linux/Cabal-3.8.1.0/build/ex01/autogen/cabal_macros.h @@ -0,0 +1,170 @@ +/* DO NOT EDIT: This file is automatically generated by Cabal */ + +/* package ap05-0.1 */ +#ifndef VERSION_ap05 +#define VERSION_ap05 "0.1" +#endif /* VERSION_ap05 */ +#ifndef MIN_VERSION_ap05 +#define MIN_VERSION_ap05(major1,major2,minor) (\ + (major1) < 0 || \ + (major1) == 0 && (major2) < 1 || \ + (major1) == 0 && (major2) == 1 && (minor) <= 0) +#endif /* MIN_VERSION_ap05 */ +/* package HUnit-1.6.2.0 */ +#ifndef VERSION_HUnit +#define VERSION_HUnit "1.6.2.0" +#endif /* VERSION_HUnit */ +#ifndef MIN_VERSION_HUnit +#define MIN_VERSION_HUnit(major1,major2,minor) (\ + (major1) < 1 || \ + (major1) == 1 && (major2) < 6 || \ + (major1) == 1 && (major2) == 6 && (minor) <= 2) +#endif /* MIN_VERSION_HUnit */ +/* package base-4.17.2.0 */ +#ifndef VERSION_base +#define VERSION_base "4.17.2.0" +#endif /* VERSION_base */ +#ifndef MIN_VERSION_base +#define MIN_VERSION_base(major1,major2,minor) (\ + (major1) < 4 || \ + (major1) == 4 && (major2) < 17 || \ + (major1) == 4 && (major2) == 17 && (minor) <= 2) +#endif /* MIN_VERSION_base */ +/* package mtl-2.2.2 */ +#ifndef VERSION_mtl +#define VERSION_mtl "2.2.2" +#endif /* VERSION_mtl */ +#ifndef MIN_VERSION_mtl +#define MIN_VERSION_mtl(major1,major2,minor) (\ + (major1) < 2 || \ + (major1) == 2 && (major2) < 2 || \ + (major1) == 2 && (major2) == 2 && (minor) <= 2) +#endif /* MIN_VERSION_mtl */ +/* package text-2.0.2 */ +#ifndef VERSION_text +#define VERSION_text "2.0.2" +#endif /* VERSION_text */ +#ifndef MIN_VERSION_text +#define MIN_VERSION_text(major1,major2,minor) (\ + (major1) < 2 || \ + (major1) == 2 && (major2) < 0 || \ + (major1) == 2 && (major2) == 0 && (minor) <= 2) +#endif /* MIN_VERSION_text */ + +/* tool alex-3.2.5 */ +#ifndef TOOL_VERSION_alex +#define TOOL_VERSION_alex "3.2.5" +#endif /* TOOL_VERSION_alex */ +#ifndef MIN_TOOL_VERSION_alex +#define MIN_TOOL_VERSION_alex(major1,major2,minor) (\ + (major1) < 3 || \ + (major1) == 3 && (major2) < 2 || \ + (major1) == 3 && (major2) == 2 && (minor) <= 5) +#endif /* MIN_TOOL_VERSION_alex */ +/* tool gcc-11 */ +#ifndef TOOL_VERSION_gcc +#define TOOL_VERSION_gcc "11" +#endif /* TOOL_VERSION_gcc */ +#ifndef MIN_TOOL_VERSION_gcc +#define MIN_TOOL_VERSION_gcc(major1,major2,minor) (\ + (major1) < 11 || \ + (major1) == 11 && (major2) < 0 || \ + (major1) == 11 && (major2) == 0 && (minor) <= 0) +#endif /* MIN_TOOL_VERSION_gcc */ +/* tool ghc-9.4.7 */ +#ifndef TOOL_VERSION_ghc +#define TOOL_VERSION_ghc "9.4.7" +#endif /* TOOL_VERSION_ghc */ +#ifndef MIN_TOOL_VERSION_ghc +#define MIN_TOOL_VERSION_ghc(major1,major2,minor) (\ + (major1) < 9 || \ + (major1) == 9 && (major2) < 4 || \ + (major1) == 9 && (major2) == 4 && (minor) <= 7) +#endif /* MIN_TOOL_VERSION_ghc */ +/* tool ghc-pkg-9.4.7 */ +#ifndef TOOL_VERSION_ghc_pkg +#define TOOL_VERSION_ghc_pkg "9.4.7" +#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) < 4 || \ + (major1) == 9 && (major2) == 4 && (minor) <= 7) +#endif /* MIN_TOOL_VERSION_ghc_pkg */ +/* tool haddock-2.27.0 */ +#ifndef TOOL_VERSION_haddock +#define TOOL_VERSION_haddock "2.27.0" +#endif /* TOOL_VERSION_haddock */ +#ifndef MIN_TOOL_VERSION_haddock +#define MIN_TOOL_VERSION_haddock(major1,major2,minor) (\ + (major1) < 2 || \ + (major1) == 2 && (major2) < 27 || \ + (major1) == 2 && (major2) == 27 && (minor) <= 0) +#endif /* MIN_TOOL_VERSION_haddock */ +/* tool happy-1.19.12 */ +#ifndef TOOL_VERSION_happy +#define TOOL_VERSION_happy "1.19.12" +#endif /* TOOL_VERSION_happy */ +#ifndef MIN_TOOL_VERSION_happy +#define MIN_TOOL_VERSION_happy(major1,major2,minor) (\ + (major1) < 1 || \ + (major1) == 1 && (major2) < 19 || \ + (major1) == 1 && (major2) == 19 && (minor) <= 12) +#endif /* MIN_TOOL_VERSION_happy */ +/* 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 hscolour-1.24 */ +#ifndef TOOL_VERSION_hscolour +#define TOOL_VERSION_hscolour "1.24" +#endif /* TOOL_VERSION_hscolour */ +#ifndef MIN_TOOL_VERSION_hscolour +#define MIN_TOOL_VERSION_hscolour(major1,major2,minor) (\ + (major1) < 1 || \ + (major1) == 1 && (major2) < 24 || \ + (major1) == 1 && (major2) == 24 && (minor) <= 0) +#endif /* MIN_TOOL_VERSION_hscolour */ +/* tool runghc-9.4.7 */ +#ifndef TOOL_VERSION_runghc +#define TOOL_VERSION_runghc "9.4.7" +#endif /* TOOL_VERSION_runghc */ +#ifndef MIN_TOOL_VERSION_runghc +#define MIN_TOOL_VERSION_runghc(major1,major2,minor) (\ + (major1) < 9 || \ + (major1) == 9 && (major2) < 4 || \ + (major1) == 9 && (major2) == 4 && (minor) <= 7) +#endif /* MIN_TOOL_VERSION_runghc */ +/* tool strip-2.38 */ +#ifndef TOOL_VERSION_strip +#define TOOL_VERSION_strip "2.38" +#endif /* TOOL_VERSION_strip */ +#ifndef MIN_TOOL_VERSION_strip +#define MIN_TOOL_VERSION_strip(major1,major2,minor) (\ + (major1) < 2 || \ + (major1) == 2 && (major2) < 38 || \ + (major1) == 2 && (major2) == 38 && (minor) <= 0) +#endif /* MIN_TOOL_VERSION_strip */ + +#ifndef CURRENT_COMPONENT_ID +#define CURRENT_COMPONENT_ID "ap05-0.1-1WN5bfNZMxCBk9rV3xcl3T-ex01" +#endif /* CURRENT_COMPONENT_ID */ +#ifndef CURRENT_PACKAGE_VERSION +#define CURRENT_PACKAGE_VERSION "0.1" +#endif /* CURRENT_PACKAGE_VERSION */ diff --git a/Aufgabe_5/code/.stack-work/dist/x86_64-linux/Cabal-3.8.1.0/build/ex01/ex01 b/Aufgabe_5/code/.stack-work/dist/x86_64-linux/Cabal-3.8.1.0/build/ex01/ex01 new file mode 100755 index 0000000..17938ee Binary files /dev/null and b/Aufgabe_5/code/.stack-work/dist/x86_64-linux/Cabal-3.8.1.0/build/ex01/ex01 differ diff --git a/Aufgabe_5/code/.stack-work/dist/x86_64-linux/Cabal-3.8.1.0/build/ex01/ex01-tmp/Exp.hi b/Aufgabe_5/code/.stack-work/dist/x86_64-linux/Cabal-3.8.1.0/build/ex01/ex01-tmp/Exp.hi new file mode 100644 index 0000000..d1892d0 Binary files /dev/null and b/Aufgabe_5/code/.stack-work/dist/x86_64-linux/Cabal-3.8.1.0/build/ex01/ex01-tmp/Exp.hi differ diff --git a/Aufgabe_5/code/.stack-work/dist/x86_64-linux/Cabal-3.8.1.0/build/ex01/ex01-tmp/Exp.o b/Aufgabe_5/code/.stack-work/dist/x86_64-linux/Cabal-3.8.1.0/build/ex01/ex01-tmp/Exp.o new file mode 100644 index 0000000..b832224 Binary files /dev/null and b/Aufgabe_5/code/.stack-work/dist/x86_64-linux/Cabal-3.8.1.0/build/ex01/ex01-tmp/Exp.o differ diff --git a/Aufgabe_5/code/.stack-work/dist/x86_64-linux/Cabal-3.8.1.0/build/ex01/ex01-tmp/Main.hi b/Aufgabe_5/code/.stack-work/dist/x86_64-linux/Cabal-3.8.1.0/build/ex01/ex01-tmp/Main.hi new file mode 100644 index 0000000..8e1e0b8 Binary files /dev/null and b/Aufgabe_5/code/.stack-work/dist/x86_64-linux/Cabal-3.8.1.0/build/ex01/ex01-tmp/Main.hi differ diff --git a/Aufgabe_5/code/.stack-work/dist/x86_64-linux/Cabal-3.8.1.0/build/ex01/ex01-tmp/Main.o b/Aufgabe_5/code/.stack-work/dist/x86_64-linux/Cabal-3.8.1.0/build/ex01/ex01-tmp/Main.o new file mode 100644 index 0000000..b555211 Binary files /dev/null and b/Aufgabe_5/code/.stack-work/dist/x86_64-linux/Cabal-3.8.1.0/build/ex01/ex01-tmp/Main.o differ diff --git a/Aufgabe_5/code/.stack-work/dist/x86_64-linux/Cabal-3.8.1.0/build/ex01/ex01-tmp/Paths_ap05.hi b/Aufgabe_5/code/.stack-work/dist/x86_64-linux/Cabal-3.8.1.0/build/ex01/ex01-tmp/Paths_ap05.hi new file mode 100644 index 0000000..6af1eaa Binary files /dev/null and b/Aufgabe_5/code/.stack-work/dist/x86_64-linux/Cabal-3.8.1.0/build/ex01/ex01-tmp/Paths_ap05.hi differ diff --git a/Aufgabe_5/code/.stack-work/dist/x86_64-linux/Cabal-3.8.1.0/build/ex01/ex01-tmp/Paths_ap05.o b/Aufgabe_5/code/.stack-work/dist/x86_64-linux/Cabal-3.8.1.0/build/ex01/ex01-tmp/Paths_ap05.o new file mode 100644 index 0000000..3bd69ae Binary files /dev/null and b/Aufgabe_5/code/.stack-work/dist/x86_64-linux/Cabal-3.8.1.0/build/ex01/ex01-tmp/Paths_ap05.o differ diff --git a/Aufgabe_5/code/.stack-work/dist/x86_64-linux/Cabal-3.8.1.0/build/ex02/autogen/Paths_ap05.hs b/Aufgabe_5/code/.stack-work/dist/x86_64-linux/Cabal-3.8.1.0/build/ex02/autogen/Paths_ap05.hs new file mode 100644 index 0000000..5146744 --- /dev/null +++ b/Aufgabe_5/code/.stack-work/dist/x86_64-linux/Cabal-3.8.1.0/build/ex02/autogen/Paths_ap05.hs @@ -0,0 +1,74 @@ +{-# LANGUAGE CPP #-} +{-# LANGUAGE NoRebindableSyntax #-} +{-# OPTIONS_GHC -fno-warn-missing-import-lists #-} +{-# OPTIONS_GHC -w #-} +module Paths_ap05 ( + 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] [] + +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 = "/home/student/Documents/Anwendungsentwicklung/Aufgabe_5/code/.stack-work/install/x86_64-linux/c95135353db856bc6efc9bd10e84b1a5a9a219f3607bca4f1889717059c848cc/9.4.7/bin" +libdir = "/home/student/Documents/Anwendungsentwicklung/Aufgabe_5/code/.stack-work/install/x86_64-linux/c95135353db856bc6efc9bd10e84b1a5a9a219f3607bca4f1889717059c848cc/9.4.7/lib/x86_64-linux-ghc-9.4.7/ap05-0.1-95SecnZIX6WJ1hjkoNBMel-ex02" +dynlibdir = "/home/student/Documents/Anwendungsentwicklung/Aufgabe_5/code/.stack-work/install/x86_64-linux/c95135353db856bc6efc9bd10e84b1a5a9a219f3607bca4f1889717059c848cc/9.4.7/lib/x86_64-linux-ghc-9.4.7" +datadir = "/home/student/Documents/Anwendungsentwicklung/Aufgabe_5/code/.stack-work/install/x86_64-linux/c95135353db856bc6efc9bd10e84b1a5a9a219f3607bca4f1889717059c848cc/9.4.7/share/x86_64-linux-ghc-9.4.7/ap05-0.1" +libexecdir = "/home/student/Documents/Anwendungsentwicklung/Aufgabe_5/code/.stack-work/install/x86_64-linux/c95135353db856bc6efc9bd10e84b1a5a9a219f3607bca4f1889717059c848cc/9.4.7/libexec/x86_64-linux-ghc-9.4.7/ap05-0.1" +sysconfdir = "/home/student/Documents/Anwendungsentwicklung/Aufgabe_5/code/.stack-work/install/x86_64-linux/c95135353db856bc6efc9bd10e84b1a5a9a219f3607bca4f1889717059c848cc/9.4.7/etc" + +getBinDir = catchIO (getEnv "ap05_bindir") (\_ -> return bindir) +getLibDir = catchIO (getEnv "ap05_libdir") (\_ -> return libdir) +getDynLibDir = catchIO (getEnv "ap05_dynlibdir") (\_ -> return dynlibdir) +getDataDir = catchIO (getEnv "ap05_datadir") (\_ -> return datadir) +getLibexecDir = catchIO (getEnv "ap05_libexecdir") (\_ -> return libexecdir) +getSysconfDir = catchIO (getEnv "ap05_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 == '/' diff --git a/Aufgabe_5/code/.stack-work/dist/x86_64-linux/Cabal-3.8.1.0/build/ex02/autogen/cabal_macros.h b/Aufgabe_5/code/.stack-work/dist/x86_64-linux/Cabal-3.8.1.0/build/ex02/autogen/cabal_macros.h new file mode 100644 index 0000000..ce2da36 --- /dev/null +++ b/Aufgabe_5/code/.stack-work/dist/x86_64-linux/Cabal-3.8.1.0/build/ex02/autogen/cabal_macros.h @@ -0,0 +1,170 @@ +/* DO NOT EDIT: This file is automatically generated by Cabal */ + +/* package ap05-0.1 */ +#ifndef VERSION_ap05 +#define VERSION_ap05 "0.1" +#endif /* VERSION_ap05 */ +#ifndef MIN_VERSION_ap05 +#define MIN_VERSION_ap05(major1,major2,minor) (\ + (major1) < 0 || \ + (major1) == 0 && (major2) < 1 || \ + (major1) == 0 && (major2) == 1 && (minor) <= 0) +#endif /* MIN_VERSION_ap05 */ +/* package HUnit-1.6.2.0 */ +#ifndef VERSION_HUnit +#define VERSION_HUnit "1.6.2.0" +#endif /* VERSION_HUnit */ +#ifndef MIN_VERSION_HUnit +#define MIN_VERSION_HUnit(major1,major2,minor) (\ + (major1) < 1 || \ + (major1) == 1 && (major2) < 6 || \ + (major1) == 1 && (major2) == 6 && (minor) <= 2) +#endif /* MIN_VERSION_HUnit */ +/* package base-4.17.2.0 */ +#ifndef VERSION_base +#define VERSION_base "4.17.2.0" +#endif /* VERSION_base */ +#ifndef MIN_VERSION_base +#define MIN_VERSION_base(major1,major2,minor) (\ + (major1) < 4 || \ + (major1) == 4 && (major2) < 17 || \ + (major1) == 4 && (major2) == 17 && (minor) <= 2) +#endif /* MIN_VERSION_base */ +/* package mtl-2.2.2 */ +#ifndef VERSION_mtl +#define VERSION_mtl "2.2.2" +#endif /* VERSION_mtl */ +#ifndef MIN_VERSION_mtl +#define MIN_VERSION_mtl(major1,major2,minor) (\ + (major1) < 2 || \ + (major1) == 2 && (major2) < 2 || \ + (major1) == 2 && (major2) == 2 && (minor) <= 2) +#endif /* MIN_VERSION_mtl */ +/* package text-2.0.2 */ +#ifndef VERSION_text +#define VERSION_text "2.0.2" +#endif /* VERSION_text */ +#ifndef MIN_VERSION_text +#define MIN_VERSION_text(major1,major2,minor) (\ + (major1) < 2 || \ + (major1) == 2 && (major2) < 0 || \ + (major1) == 2 && (major2) == 0 && (minor) <= 2) +#endif /* MIN_VERSION_text */ + +/* tool alex-3.2.5 */ +#ifndef TOOL_VERSION_alex +#define TOOL_VERSION_alex "3.2.5" +#endif /* TOOL_VERSION_alex */ +#ifndef MIN_TOOL_VERSION_alex +#define MIN_TOOL_VERSION_alex(major1,major2,minor) (\ + (major1) < 3 || \ + (major1) == 3 && (major2) < 2 || \ + (major1) == 3 && (major2) == 2 && (minor) <= 5) +#endif /* MIN_TOOL_VERSION_alex */ +/* tool gcc-11 */ +#ifndef TOOL_VERSION_gcc +#define TOOL_VERSION_gcc "11" +#endif /* TOOL_VERSION_gcc */ +#ifndef MIN_TOOL_VERSION_gcc +#define MIN_TOOL_VERSION_gcc(major1,major2,minor) (\ + (major1) < 11 || \ + (major1) == 11 && (major2) < 0 || \ + (major1) == 11 && (major2) == 0 && (minor) <= 0) +#endif /* MIN_TOOL_VERSION_gcc */ +/* tool ghc-9.4.7 */ +#ifndef TOOL_VERSION_ghc +#define TOOL_VERSION_ghc "9.4.7" +#endif /* TOOL_VERSION_ghc */ +#ifndef MIN_TOOL_VERSION_ghc +#define MIN_TOOL_VERSION_ghc(major1,major2,minor) (\ + (major1) < 9 || \ + (major1) == 9 && (major2) < 4 || \ + (major1) == 9 && (major2) == 4 && (minor) <= 7) +#endif /* MIN_TOOL_VERSION_ghc */ +/* tool ghc-pkg-9.4.7 */ +#ifndef TOOL_VERSION_ghc_pkg +#define TOOL_VERSION_ghc_pkg "9.4.7" +#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) < 4 || \ + (major1) == 9 && (major2) == 4 && (minor) <= 7) +#endif /* MIN_TOOL_VERSION_ghc_pkg */ +/* tool haddock-2.27.0 */ +#ifndef TOOL_VERSION_haddock +#define TOOL_VERSION_haddock "2.27.0" +#endif /* TOOL_VERSION_haddock */ +#ifndef MIN_TOOL_VERSION_haddock +#define MIN_TOOL_VERSION_haddock(major1,major2,minor) (\ + (major1) < 2 || \ + (major1) == 2 && (major2) < 27 || \ + (major1) == 2 && (major2) == 27 && (minor) <= 0) +#endif /* MIN_TOOL_VERSION_haddock */ +/* tool happy-1.19.12 */ +#ifndef TOOL_VERSION_happy +#define TOOL_VERSION_happy "1.19.12" +#endif /* TOOL_VERSION_happy */ +#ifndef MIN_TOOL_VERSION_happy +#define MIN_TOOL_VERSION_happy(major1,major2,minor) (\ + (major1) < 1 || \ + (major1) == 1 && (major2) < 19 || \ + (major1) == 1 && (major2) == 19 && (minor) <= 12) +#endif /* MIN_TOOL_VERSION_happy */ +/* 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 hscolour-1.24 */ +#ifndef TOOL_VERSION_hscolour +#define TOOL_VERSION_hscolour "1.24" +#endif /* TOOL_VERSION_hscolour */ +#ifndef MIN_TOOL_VERSION_hscolour +#define MIN_TOOL_VERSION_hscolour(major1,major2,minor) (\ + (major1) < 1 || \ + (major1) == 1 && (major2) < 24 || \ + (major1) == 1 && (major2) == 24 && (minor) <= 0) +#endif /* MIN_TOOL_VERSION_hscolour */ +/* tool runghc-9.4.7 */ +#ifndef TOOL_VERSION_runghc +#define TOOL_VERSION_runghc "9.4.7" +#endif /* TOOL_VERSION_runghc */ +#ifndef MIN_TOOL_VERSION_runghc +#define MIN_TOOL_VERSION_runghc(major1,major2,minor) (\ + (major1) < 9 || \ + (major1) == 9 && (major2) < 4 || \ + (major1) == 9 && (major2) == 4 && (minor) <= 7) +#endif /* MIN_TOOL_VERSION_runghc */ +/* tool strip-2.38 */ +#ifndef TOOL_VERSION_strip +#define TOOL_VERSION_strip "2.38" +#endif /* TOOL_VERSION_strip */ +#ifndef MIN_TOOL_VERSION_strip +#define MIN_TOOL_VERSION_strip(major1,major2,minor) (\ + (major1) < 2 || \ + (major1) == 2 && (major2) < 38 || \ + (major1) == 2 && (major2) == 38 && (minor) <= 0) +#endif /* MIN_TOOL_VERSION_strip */ + +#ifndef CURRENT_COMPONENT_ID +#define CURRENT_COMPONENT_ID "ap05-0.1-95SecnZIX6WJ1hjkoNBMel-ex02" +#endif /* CURRENT_COMPONENT_ID */ +#ifndef CURRENT_PACKAGE_VERSION +#define CURRENT_PACKAGE_VERSION "0.1" +#endif /* CURRENT_PACKAGE_VERSION */ diff --git a/Aufgabe_5/code/.stack-work/dist/x86_64-linux/Cabal-3.8.1.0/build/ex02/ex02 b/Aufgabe_5/code/.stack-work/dist/x86_64-linux/Cabal-3.8.1.0/build/ex02/ex02 new file mode 100755 index 0000000..69be5ff Binary files /dev/null and b/Aufgabe_5/code/.stack-work/dist/x86_64-linux/Cabal-3.8.1.0/build/ex02/ex02 differ diff --git a/Aufgabe_5/code/.stack-work/dist/x86_64-linux/Cabal-3.8.1.0/build/ex02/ex02-tmp/Main.hi b/Aufgabe_5/code/.stack-work/dist/x86_64-linux/Cabal-3.8.1.0/build/ex02/ex02-tmp/Main.hi new file mode 100644 index 0000000..2974b39 Binary files /dev/null and b/Aufgabe_5/code/.stack-work/dist/x86_64-linux/Cabal-3.8.1.0/build/ex02/ex02-tmp/Main.hi differ diff --git a/Aufgabe_5/code/.stack-work/dist/x86_64-linux/Cabal-3.8.1.0/build/ex02/ex02-tmp/Main.o b/Aufgabe_5/code/.stack-work/dist/x86_64-linux/Cabal-3.8.1.0/build/ex02/ex02-tmp/Main.o new file mode 100644 index 0000000..4ad7357 Binary files /dev/null and b/Aufgabe_5/code/.stack-work/dist/x86_64-linux/Cabal-3.8.1.0/build/ex02/ex02-tmp/Main.o differ diff --git a/Aufgabe_5/code/.stack-work/dist/x86_64-linux/Cabal-3.8.1.0/build/ex02/ex02-tmp/Paths_ap05.hi b/Aufgabe_5/code/.stack-work/dist/x86_64-linux/Cabal-3.8.1.0/build/ex02/ex02-tmp/Paths_ap05.hi new file mode 100644 index 0000000..3bdabab Binary files /dev/null and b/Aufgabe_5/code/.stack-work/dist/x86_64-linux/Cabal-3.8.1.0/build/ex02/ex02-tmp/Paths_ap05.hi differ diff --git a/Aufgabe_5/code/.stack-work/dist/x86_64-linux/Cabal-3.8.1.0/build/ex02/ex02-tmp/Paths_ap05.o b/Aufgabe_5/code/.stack-work/dist/x86_64-linux/Cabal-3.8.1.0/build/ex02/ex02-tmp/Paths_ap05.o new file mode 100644 index 0000000..5ccfead Binary files /dev/null and b/Aufgabe_5/code/.stack-work/dist/x86_64-linux/Cabal-3.8.1.0/build/ex02/ex02-tmp/Paths_ap05.o differ diff --git a/Aufgabe_5/code/.stack-work/dist/x86_64-linux/Cabal-3.8.1.0/build/ex02/ex02-tmp/Product.hi b/Aufgabe_5/code/.stack-work/dist/x86_64-linux/Cabal-3.8.1.0/build/ex02/ex02-tmp/Product.hi new file mode 100644 index 0000000..353e18c Binary files /dev/null and b/Aufgabe_5/code/.stack-work/dist/x86_64-linux/Cabal-3.8.1.0/build/ex02/ex02-tmp/Product.hi differ diff --git a/Aufgabe_5/code/.stack-work/dist/x86_64-linux/Cabal-3.8.1.0/build/ex02/ex02-tmp/Product.o b/Aufgabe_5/code/.stack-work/dist/x86_64-linux/Cabal-3.8.1.0/build/ex02/ex02-tmp/Product.o new file mode 100644 index 0000000..67e8c13 Binary files /dev/null and b/Aufgabe_5/code/.stack-work/dist/x86_64-linux/Cabal-3.8.1.0/build/ex02/ex02-tmp/Product.o differ diff --git a/Aufgabe_5/code/.stack-work/dist/x86_64-linux/Cabal-3.8.1.0/build/ex03/autogen/Paths_ap05.hs b/Aufgabe_5/code/.stack-work/dist/x86_64-linux/Cabal-3.8.1.0/build/ex03/autogen/Paths_ap05.hs new file mode 100644 index 0000000..46cefac --- /dev/null +++ b/Aufgabe_5/code/.stack-work/dist/x86_64-linux/Cabal-3.8.1.0/build/ex03/autogen/Paths_ap05.hs @@ -0,0 +1,74 @@ +{-# LANGUAGE CPP #-} +{-# LANGUAGE NoRebindableSyntax #-} +{-# OPTIONS_GHC -fno-warn-missing-import-lists #-} +{-# OPTIONS_GHC -w #-} +module Paths_ap05 ( + 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] [] + +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 = "/home/student/Documents/Anwendungsentwicklung/Aufgabe_5/code/.stack-work/install/x86_64-linux/c95135353db856bc6efc9bd10e84b1a5a9a219f3607bca4f1889717059c848cc/9.4.7/bin" +libdir = "/home/student/Documents/Anwendungsentwicklung/Aufgabe_5/code/.stack-work/install/x86_64-linux/c95135353db856bc6efc9bd10e84b1a5a9a219f3607bca4f1889717059c848cc/9.4.7/lib/x86_64-linux-ghc-9.4.7/ap05-0.1-AJuyaSgzdSw4SJrI0SnuWg-ex03" +dynlibdir = "/home/student/Documents/Anwendungsentwicklung/Aufgabe_5/code/.stack-work/install/x86_64-linux/c95135353db856bc6efc9bd10e84b1a5a9a219f3607bca4f1889717059c848cc/9.4.7/lib/x86_64-linux-ghc-9.4.7" +datadir = "/home/student/Documents/Anwendungsentwicklung/Aufgabe_5/code/.stack-work/install/x86_64-linux/c95135353db856bc6efc9bd10e84b1a5a9a219f3607bca4f1889717059c848cc/9.4.7/share/x86_64-linux-ghc-9.4.7/ap05-0.1" +libexecdir = "/home/student/Documents/Anwendungsentwicklung/Aufgabe_5/code/.stack-work/install/x86_64-linux/c95135353db856bc6efc9bd10e84b1a5a9a219f3607bca4f1889717059c848cc/9.4.7/libexec/x86_64-linux-ghc-9.4.7/ap05-0.1" +sysconfdir = "/home/student/Documents/Anwendungsentwicklung/Aufgabe_5/code/.stack-work/install/x86_64-linux/c95135353db856bc6efc9bd10e84b1a5a9a219f3607bca4f1889717059c848cc/9.4.7/etc" + +getBinDir = catchIO (getEnv "ap05_bindir") (\_ -> return bindir) +getLibDir = catchIO (getEnv "ap05_libdir") (\_ -> return libdir) +getDynLibDir = catchIO (getEnv "ap05_dynlibdir") (\_ -> return dynlibdir) +getDataDir = catchIO (getEnv "ap05_datadir") (\_ -> return datadir) +getLibexecDir = catchIO (getEnv "ap05_libexecdir") (\_ -> return libexecdir) +getSysconfDir = catchIO (getEnv "ap05_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 == '/' diff --git a/Aufgabe_5/code/.stack-work/dist/x86_64-linux/Cabal-3.8.1.0/build/ex03/autogen/cabal_macros.h b/Aufgabe_5/code/.stack-work/dist/x86_64-linux/Cabal-3.8.1.0/build/ex03/autogen/cabal_macros.h new file mode 100644 index 0000000..379912f --- /dev/null +++ b/Aufgabe_5/code/.stack-work/dist/x86_64-linux/Cabal-3.8.1.0/build/ex03/autogen/cabal_macros.h @@ -0,0 +1,170 @@ +/* DO NOT EDIT: This file is automatically generated by Cabal */ + +/* package ap05-0.1 */ +#ifndef VERSION_ap05 +#define VERSION_ap05 "0.1" +#endif /* VERSION_ap05 */ +#ifndef MIN_VERSION_ap05 +#define MIN_VERSION_ap05(major1,major2,minor) (\ + (major1) < 0 || \ + (major1) == 0 && (major2) < 1 || \ + (major1) == 0 && (major2) == 1 && (minor) <= 0) +#endif /* MIN_VERSION_ap05 */ +/* package HUnit-1.6.2.0 */ +#ifndef VERSION_HUnit +#define VERSION_HUnit "1.6.2.0" +#endif /* VERSION_HUnit */ +#ifndef MIN_VERSION_HUnit +#define MIN_VERSION_HUnit(major1,major2,minor) (\ + (major1) < 1 || \ + (major1) == 1 && (major2) < 6 || \ + (major1) == 1 && (major2) == 6 && (minor) <= 2) +#endif /* MIN_VERSION_HUnit */ +/* package base-4.17.2.0 */ +#ifndef VERSION_base +#define VERSION_base "4.17.2.0" +#endif /* VERSION_base */ +#ifndef MIN_VERSION_base +#define MIN_VERSION_base(major1,major2,minor) (\ + (major1) < 4 || \ + (major1) == 4 && (major2) < 17 || \ + (major1) == 4 && (major2) == 17 && (minor) <= 2) +#endif /* MIN_VERSION_base */ +/* package mtl-2.2.2 */ +#ifndef VERSION_mtl +#define VERSION_mtl "2.2.2" +#endif /* VERSION_mtl */ +#ifndef MIN_VERSION_mtl +#define MIN_VERSION_mtl(major1,major2,minor) (\ + (major1) < 2 || \ + (major1) == 2 && (major2) < 2 || \ + (major1) == 2 && (major2) == 2 && (minor) <= 2) +#endif /* MIN_VERSION_mtl */ +/* package text-2.0.2 */ +#ifndef VERSION_text +#define VERSION_text "2.0.2" +#endif /* VERSION_text */ +#ifndef MIN_VERSION_text +#define MIN_VERSION_text(major1,major2,minor) (\ + (major1) < 2 || \ + (major1) == 2 && (major2) < 0 || \ + (major1) == 2 && (major2) == 0 && (minor) <= 2) +#endif /* MIN_VERSION_text */ + +/* tool alex-3.2.5 */ +#ifndef TOOL_VERSION_alex +#define TOOL_VERSION_alex "3.2.5" +#endif /* TOOL_VERSION_alex */ +#ifndef MIN_TOOL_VERSION_alex +#define MIN_TOOL_VERSION_alex(major1,major2,minor) (\ + (major1) < 3 || \ + (major1) == 3 && (major2) < 2 || \ + (major1) == 3 && (major2) == 2 && (minor) <= 5) +#endif /* MIN_TOOL_VERSION_alex */ +/* tool gcc-11 */ +#ifndef TOOL_VERSION_gcc +#define TOOL_VERSION_gcc "11" +#endif /* TOOL_VERSION_gcc */ +#ifndef MIN_TOOL_VERSION_gcc +#define MIN_TOOL_VERSION_gcc(major1,major2,minor) (\ + (major1) < 11 || \ + (major1) == 11 && (major2) < 0 || \ + (major1) == 11 && (major2) == 0 && (minor) <= 0) +#endif /* MIN_TOOL_VERSION_gcc */ +/* tool ghc-9.4.7 */ +#ifndef TOOL_VERSION_ghc +#define TOOL_VERSION_ghc "9.4.7" +#endif /* TOOL_VERSION_ghc */ +#ifndef MIN_TOOL_VERSION_ghc +#define MIN_TOOL_VERSION_ghc(major1,major2,minor) (\ + (major1) < 9 || \ + (major1) == 9 && (major2) < 4 || \ + (major1) == 9 && (major2) == 4 && (minor) <= 7) +#endif /* MIN_TOOL_VERSION_ghc */ +/* tool ghc-pkg-9.4.7 */ +#ifndef TOOL_VERSION_ghc_pkg +#define TOOL_VERSION_ghc_pkg "9.4.7" +#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) < 4 || \ + (major1) == 9 && (major2) == 4 && (minor) <= 7) +#endif /* MIN_TOOL_VERSION_ghc_pkg */ +/* tool haddock-2.27.0 */ +#ifndef TOOL_VERSION_haddock +#define TOOL_VERSION_haddock "2.27.0" +#endif /* TOOL_VERSION_haddock */ +#ifndef MIN_TOOL_VERSION_haddock +#define MIN_TOOL_VERSION_haddock(major1,major2,minor) (\ + (major1) < 2 || \ + (major1) == 2 && (major2) < 27 || \ + (major1) == 2 && (major2) == 27 && (minor) <= 0) +#endif /* MIN_TOOL_VERSION_haddock */ +/* tool happy-1.19.12 */ +#ifndef TOOL_VERSION_happy +#define TOOL_VERSION_happy "1.19.12" +#endif /* TOOL_VERSION_happy */ +#ifndef MIN_TOOL_VERSION_happy +#define MIN_TOOL_VERSION_happy(major1,major2,minor) (\ + (major1) < 1 || \ + (major1) == 1 && (major2) < 19 || \ + (major1) == 1 && (major2) == 19 && (minor) <= 12) +#endif /* MIN_TOOL_VERSION_happy */ +/* 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 hscolour-1.24 */ +#ifndef TOOL_VERSION_hscolour +#define TOOL_VERSION_hscolour "1.24" +#endif /* TOOL_VERSION_hscolour */ +#ifndef MIN_TOOL_VERSION_hscolour +#define MIN_TOOL_VERSION_hscolour(major1,major2,minor) (\ + (major1) < 1 || \ + (major1) == 1 && (major2) < 24 || \ + (major1) == 1 && (major2) == 24 && (minor) <= 0) +#endif /* MIN_TOOL_VERSION_hscolour */ +/* tool runghc-9.4.7 */ +#ifndef TOOL_VERSION_runghc +#define TOOL_VERSION_runghc "9.4.7" +#endif /* TOOL_VERSION_runghc */ +#ifndef MIN_TOOL_VERSION_runghc +#define MIN_TOOL_VERSION_runghc(major1,major2,minor) (\ + (major1) < 9 || \ + (major1) == 9 && (major2) < 4 || \ + (major1) == 9 && (major2) == 4 && (minor) <= 7) +#endif /* MIN_TOOL_VERSION_runghc */ +/* tool strip-2.38 */ +#ifndef TOOL_VERSION_strip +#define TOOL_VERSION_strip "2.38" +#endif /* TOOL_VERSION_strip */ +#ifndef MIN_TOOL_VERSION_strip +#define MIN_TOOL_VERSION_strip(major1,major2,minor) (\ + (major1) < 2 || \ + (major1) == 2 && (major2) < 38 || \ + (major1) == 2 && (major2) == 38 && (minor) <= 0) +#endif /* MIN_TOOL_VERSION_strip */ + +#ifndef CURRENT_COMPONENT_ID +#define CURRENT_COMPONENT_ID "ap05-0.1-AJuyaSgzdSw4SJrI0SnuWg-ex03" +#endif /* CURRENT_COMPONENT_ID */ +#ifndef CURRENT_PACKAGE_VERSION +#define CURRENT_PACKAGE_VERSION "0.1" +#endif /* CURRENT_PACKAGE_VERSION */ diff --git a/Aufgabe_5/code/.stack-work/dist/x86_64-linux/Cabal-3.8.1.0/build/ex03/ex03 b/Aufgabe_5/code/.stack-work/dist/x86_64-linux/Cabal-3.8.1.0/build/ex03/ex03 new file mode 100755 index 0000000..160ba35 Binary files /dev/null and b/Aufgabe_5/code/.stack-work/dist/x86_64-linux/Cabal-3.8.1.0/build/ex03/ex03 differ diff --git a/Aufgabe_5/code/.stack-work/dist/x86_64-linux/Cabal-3.8.1.0/build/ex03/ex03-tmp/Main.hi b/Aufgabe_5/code/.stack-work/dist/x86_64-linux/Cabal-3.8.1.0/build/ex03/ex03-tmp/Main.hi new file mode 100644 index 0000000..c8123f2 Binary files /dev/null and b/Aufgabe_5/code/.stack-work/dist/x86_64-linux/Cabal-3.8.1.0/build/ex03/ex03-tmp/Main.hi differ diff --git a/Aufgabe_5/code/.stack-work/dist/x86_64-linux/Cabal-3.8.1.0/build/ex03/ex03-tmp/Main.o b/Aufgabe_5/code/.stack-work/dist/x86_64-linux/Cabal-3.8.1.0/build/ex03/ex03-tmp/Main.o new file mode 100644 index 0000000..9f97d35 Binary files /dev/null and b/Aufgabe_5/code/.stack-work/dist/x86_64-linux/Cabal-3.8.1.0/build/ex03/ex03-tmp/Main.o differ diff --git a/Aufgabe_5/code/.stack-work/dist/x86_64-linux/Cabal-3.8.1.0/build/ex03/ex03-tmp/Paths_ap05.hi b/Aufgabe_5/code/.stack-work/dist/x86_64-linux/Cabal-3.8.1.0/build/ex03/ex03-tmp/Paths_ap05.hi new file mode 100644 index 0000000..a198237 Binary files /dev/null and b/Aufgabe_5/code/.stack-work/dist/x86_64-linux/Cabal-3.8.1.0/build/ex03/ex03-tmp/Paths_ap05.hi differ diff --git a/Aufgabe_5/code/.stack-work/dist/x86_64-linux/Cabal-3.8.1.0/build/ex03/ex03-tmp/Paths_ap05.o b/Aufgabe_5/code/.stack-work/dist/x86_64-linux/Cabal-3.8.1.0/build/ex03/ex03-tmp/Paths_ap05.o new file mode 100644 index 0000000..2a8382c Binary files /dev/null and b/Aufgabe_5/code/.stack-work/dist/x86_64-linux/Cabal-3.8.1.0/build/ex03/ex03-tmp/Paths_ap05.o differ diff --git a/Aufgabe_5/code/.stack-work/dist/x86_64-linux/Cabal-3.8.1.0/build/ex03/ex03-tmp/Random.hi b/Aufgabe_5/code/.stack-work/dist/x86_64-linux/Cabal-3.8.1.0/build/ex03/ex03-tmp/Random.hi new file mode 100644 index 0000000..6e6f4de Binary files /dev/null and b/Aufgabe_5/code/.stack-work/dist/x86_64-linux/Cabal-3.8.1.0/build/ex03/ex03-tmp/Random.hi differ diff --git a/Aufgabe_5/code/.stack-work/dist/x86_64-linux/Cabal-3.8.1.0/build/ex03/ex03-tmp/Random.o b/Aufgabe_5/code/.stack-work/dist/x86_64-linux/Cabal-3.8.1.0/build/ex03/ex03-tmp/Random.o new file mode 100644 index 0000000..9a00bf4 Binary files /dev/null and b/Aufgabe_5/code/.stack-work/dist/x86_64-linux/Cabal-3.8.1.0/build/ex03/ex03-tmp/Random.o differ diff --git a/Aufgabe_5/code/.stack-work/dist/x86_64-linux/Cabal-3.8.1.0/package.conf.inplace/package.cache b/Aufgabe_5/code/.stack-work/dist/x86_64-linux/Cabal-3.8.1.0/package.conf.inplace/package.cache new file mode 100644 index 0000000..b3cae5c Binary files /dev/null and b/Aufgabe_5/code/.stack-work/dist/x86_64-linux/Cabal-3.8.1.0/package.conf.inplace/package.cache differ diff --git a/Aufgabe_5/code/.stack-work/dist/x86_64-linux/Cabal-3.8.1.0/package.conf.inplace/package.cache.lock b/Aufgabe_5/code/.stack-work/dist/x86_64-linux/Cabal-3.8.1.0/package.conf.inplace/package.cache.lock new file mode 100644 index 0000000..e69de29 diff --git a/Aufgabe_5/code/.stack-work/dist/x86_64-linux/Cabal-3.8.1.0/setup-config b/Aufgabe_5/code/.stack-work/dist/x86_64-linux/Cabal-3.8.1.0/setup-config new file mode 100644 index 0000000..d32896a Binary files /dev/null and b/Aufgabe_5/code/.stack-work/dist/x86_64-linux/Cabal-3.8.1.0/setup-config differ diff --git a/Aufgabe_5/code/.stack-work/dist/x86_64-linux/Cabal-3.8.1.0/stack-build-caches/c95135353db856bc6efc9bd10e84b1a5a9a219f3607bca4f1889717059c848cc/test-ex01 b/Aufgabe_5/code/.stack-work/dist/x86_64-linux/Cabal-3.8.1.0/stack-build-caches/c95135353db856bc6efc9bd10e84b1a5a9a219f3607bca4f1889717059c848cc/test-ex01 new file mode 100644 index 0000000..812e3e3 --- /dev/null +++ b/Aufgabe_5/code/.stack-work/dist/x86_64-linux/Cabal-3.8.1.0/stack-build-caches/c95135353db856bc6efc9bd10e84b1a5a9a219f3607bca4f1889717059c848cc/test-ex01 @@ -0,0 +1,16 @@ +/home/student/.ghcup/ghc/9.4.7/lib/ghc-9.4.7/lib/x86_64-linux-ghc-9.4.7/rts-1.0.2/include/ghcversion.h: + hash: ee548d48ca5c94d7c7fab127ec07be47b01afa24d6495358aa9ff6cfc8541c81 +? /home/student/Documents/Anwendungsentwicklung/Aufgabe_5/code/.stack-work/dist/x86_64-linux/Cabal-3.8.1.0/build/ex01/autogen/Paths_ap05.hs +: hash: ea62a1766305d9d88bc1c20fe7f041291db673338209a94073400a1e6477a20c +? /home/student/Documents/Anwendungsentwicklung/Aufgabe_5/code/.stack-work/dist/x86_64-linux/Cabal-3.8.1.0/build/ex01/autogen/cabal_macros.h +: hash: aa7ad43ed234b77ede973e75efadbc79b54a247eb8a5f2858bac7504baba7c42 +/home/student/Documents/Anwendungsentwicklung/Aufgabe_5/code/ap05.cabal: + hash: a07b6ceaeb4882a8c1f0acce9358a1bfcd0035462c93d8e9d3dc939f3d7f7f50 +/home/student/Documents/Anwendungsentwicklung/Aufgabe_5/code/ex01/Exp.hs: + hash: 95999cd9ea895c25fa8aeb31bd97511f57ce053ccb4d0ae771aa10309a5f1ae2 +/home/student/Documents/Anwendungsentwicklung/Aufgabe_5/code/ex01/Main.hs: + hash: 48a50a80e54019a5245ec1b6b6544041d3e2933dc3cab863923a28ce6acab550 +/home/student/Documents/Anwendungsentwicklung/Aufgabe_5/code/package.yaml: + hash: 674de3e373c6c79404da40d6c80571b7003ffa06887f7231e6bbe78805c72bec +/usr/include/stdc-predef.h: + hash: cb08cd5d4cc059a90833ac48a284d25016e8d56ded8ad4cd98d8ac59cc5053f3 diff --git a/Aufgabe_5/code/.stack-work/dist/x86_64-linux/Cabal-3.8.1.0/stack-build-caches/c95135353db856bc6efc9bd10e84b1a5a9a219f3607bca4f1889717059c848cc/test-ex02 b/Aufgabe_5/code/.stack-work/dist/x86_64-linux/Cabal-3.8.1.0/stack-build-caches/c95135353db856bc6efc9bd10e84b1a5a9a219f3607bca4f1889717059c848cc/test-ex02 new file mode 100644 index 0000000..7017095 --- /dev/null +++ b/Aufgabe_5/code/.stack-work/dist/x86_64-linux/Cabal-3.8.1.0/stack-build-caches/c95135353db856bc6efc9bd10e84b1a5a9a219f3607bca4f1889717059c848cc/test-ex02 @@ -0,0 +1,16 @@ +/home/student/.ghcup/ghc/9.4.7/lib/ghc-9.4.7/lib/x86_64-linux-ghc-9.4.7/rts-1.0.2/include/ghcversion.h: + hash: ee548d48ca5c94d7c7fab127ec07be47b01afa24d6495358aa9ff6cfc8541c81 +? /home/student/Documents/Anwendungsentwicklung/Aufgabe_5/code/.stack-work/dist/x86_64-linux/Cabal-3.8.1.0/build/ex02/autogen/Paths_ap05.hs +: hash: 766dbbcb550b3d864eadd2d99498c17e5f5854b3bd29c77ef6c085c9859d030a +? /home/student/Documents/Anwendungsentwicklung/Aufgabe_5/code/.stack-work/dist/x86_64-linux/Cabal-3.8.1.0/build/ex02/autogen/cabal_macros.h +: hash: d6d267687b0bb2a89083ca3345303cf461119b190e3ffd16dde105446b793807 +/home/student/Documents/Anwendungsentwicklung/Aufgabe_5/code/ap05.cabal: + hash: a07b6ceaeb4882a8c1f0acce9358a1bfcd0035462c93d8e9d3dc939f3d7f7f50 +/home/student/Documents/Anwendungsentwicklung/Aufgabe_5/code/ex02/Main.hs: + hash: 5b6c7511e3656092cf4f360106bc7907880c820ad838283fe4cade5dce67933e +/home/student/Documents/Anwendungsentwicklung/Aufgabe_5/code/ex02/Product.hs: + hash: b48f5b9b9e122dc9f11142791d67bd6473c9bd719f72340ab81e2dff7b1b9097 +/home/student/Documents/Anwendungsentwicklung/Aufgabe_5/code/package.yaml: + hash: 674de3e373c6c79404da40d6c80571b7003ffa06887f7231e6bbe78805c72bec +/usr/include/stdc-predef.h: + hash: cb08cd5d4cc059a90833ac48a284d25016e8d56ded8ad4cd98d8ac59cc5053f3 diff --git a/Aufgabe_5/code/.stack-work/dist/x86_64-linux/Cabal-3.8.1.0/stack-build-caches/c95135353db856bc6efc9bd10e84b1a5a9a219f3607bca4f1889717059c848cc/test-ex03 b/Aufgabe_5/code/.stack-work/dist/x86_64-linux/Cabal-3.8.1.0/stack-build-caches/c95135353db856bc6efc9bd10e84b1a5a9a219f3607bca4f1889717059c848cc/test-ex03 new file mode 100644 index 0000000..8b5846d --- /dev/null +++ b/Aufgabe_5/code/.stack-work/dist/x86_64-linux/Cabal-3.8.1.0/stack-build-caches/c95135353db856bc6efc9bd10e84b1a5a9a219f3607bca4f1889717059c848cc/test-ex03 @@ -0,0 +1,16 @@ +/home/student/.ghcup/ghc/9.4.7/lib/ghc-9.4.7/lib/x86_64-linux-ghc-9.4.7/rts-1.0.2/include/ghcversion.h: + hash: ee548d48ca5c94d7c7fab127ec07be47b01afa24d6495358aa9ff6cfc8541c81 +? /home/student/Documents/Anwendungsentwicklung/Aufgabe_5/code/.stack-work/dist/x86_64-linux/Cabal-3.8.1.0/build/ex03/autogen/Paths_ap05.hs +: hash: 44ce1aa62f8495e9e9dfff9c523aafbcffaa83cf13346d994768a1844a7ab936 +? /home/student/Documents/Anwendungsentwicklung/Aufgabe_5/code/.stack-work/dist/x86_64-linux/Cabal-3.8.1.0/build/ex03/autogen/cabal_macros.h +: hash: 867b960dc72510472b1b8dbdb1f770cf5d1d31dbe1453749f0730c93e6aa00e6 +/home/student/Documents/Anwendungsentwicklung/Aufgabe_5/code/ap05.cabal: + hash: a07b6ceaeb4882a8c1f0acce9358a1bfcd0035462c93d8e9d3dc939f3d7f7f50 +/home/student/Documents/Anwendungsentwicklung/Aufgabe_5/code/ex03/Main.hs: + hash: f2a96b62d2f30f5a0dc67978e48265e92be65e7370af8a1f92ce6fc5fae6b664 +/home/student/Documents/Anwendungsentwicklung/Aufgabe_5/code/ex03/Random.hs: + hash: 92851e93732e58f12b94e33c308f5fa92cc31dfa153cb9eb9c68119ed7106d99 +/home/student/Documents/Anwendungsentwicklung/Aufgabe_5/code/package.yaml: + hash: 674de3e373c6c79404da40d6c80571b7003ffa06887f7231e6bbe78805c72bec +/usr/include/stdc-predef.h: + hash: cb08cd5d4cc059a90833ac48a284d25016e8d56ded8ad4cd98d8ac59cc5053f3 diff --git a/Aufgabe_5/code/.stack-work/dist/x86_64-linux/Cabal-3.8.1.0/stack-cabal-mod b/Aufgabe_5/code/.stack-work/dist/x86_64-linux/Cabal-3.8.1.0/stack-cabal-mod new file mode 100644 index 0000000..5b04457 --- /dev/null +++ b/Aufgabe_5/code/.stack-work/dist/x86_64-linux/Cabal-3.8.1.0/stack-cabal-mod @@ -0,0 +1 @@ +Just used for its modification time \ No newline at end of file diff --git a/Aufgabe_5/code/.stack-work/dist/x86_64-linux/Cabal-3.8.1.0/stack-project-root b/Aufgabe_5/code/.stack-work/dist/x86_64-linux/Cabal-3.8.1.0/stack-project-root new file mode 100644 index 0000000..475c25e --- /dev/null +++ b/Aufgabe_5/code/.stack-work/dist/x86_64-linux/Cabal-3.8.1.0/stack-project-root @@ -0,0 +1 @@ +/home/student/Documents/Anwendungsentwicklung/Aufgabe_5/code/ \ No newline at end of file diff --git a/Aufgabe_5/code/.stack-work/dist/x86_64-linux/Cabal-3.8.1.0/stack-setup-config-mod b/Aufgabe_5/code/.stack-work/dist/x86_64-linux/Cabal-3.8.1.0/stack-setup-config-mod new file mode 100644 index 0000000..5b04457 --- /dev/null +++ b/Aufgabe_5/code/.stack-work/dist/x86_64-linux/Cabal-3.8.1.0/stack-setup-config-mod @@ -0,0 +1 @@ +Just used for its modification time \ No newline at end of file diff --git a/Aufgabe_5/code/.stack-work/dist/x86_64-linux/Cabal-3.8.1.0/stack-test-success b/Aufgabe_5/code/.stack-work/dist/x86_64-linux/Cabal-3.8.1.0/stack-test-success new file mode 100644 index 0000000..0f0c913 --- /dev/null +++ b/Aufgabe_5/code/.stack-work/dist/x86_64-linux/Cabal-3.8.1.0/stack-test-success @@ -0,0 +1 @@ +success \ No newline at end of file diff --git a/Aufgabe_5/code/.stack-work/ghci/7534489a/cabal_macros.h b/Aufgabe_5/code/.stack-work/ghci/7534489a/cabal_macros.h new file mode 100644 index 0000000..03f7858 --- /dev/null +++ b/Aufgabe_5/code/.stack-work/ghci/7534489a/cabal_macros.h @@ -0,0 +1,173 @@ +/* DO NOT EDIT: This file is automatically generated by Cabal */ + +/* package ap05-0.1 */ +#ifndef VERSION_ap05 +#define VERSION_ap05 "0.1" +#endif /* VERSION_ap05 */ +#ifndef MIN_VERSION_ap05 +#define MIN_VERSION_ap05(major1,major2,minor) (\ + (major1) < 0 || \ + (major1) == 0 && (major2) < 1 || \ + (major1) == 0 && (major2) == 1 && (minor) <= 0) +#endif /* MIN_VERSION_ap05 */ +/* package HUnit-1.6.2.0 */ +#ifndef VERSION_HUnit +#define VERSION_HUnit "1.6.2.0" +#endif /* VERSION_HUnit */ +#ifndef MIN_VERSION_HUnit +#define MIN_VERSION_HUnit(major1,major2,minor) (\ + (major1) < 1 || \ + (major1) == 1 && (major2) < 6 || \ + (major1) == 1 && (major2) == 6 && (minor) <= 2) +#endif /* MIN_VERSION_HUnit */ +/* package base-4.17.2.0 */ +#ifndef VERSION_base +#define VERSION_base "4.17.2.0" +#endif /* VERSION_base */ +#ifndef MIN_VERSION_base +#define MIN_VERSION_base(major1,major2,minor) (\ + (major1) < 4 || \ + (major1) == 4 && (major2) < 17 || \ + (major1) == 4 && (major2) == 17 && (minor) <= 2) +#endif /* MIN_VERSION_base */ +/* package mtl-2.2.2 */ +#ifndef VERSION_mtl +#define VERSION_mtl "2.2.2" +#endif /* VERSION_mtl */ +#ifndef MIN_VERSION_mtl +#define MIN_VERSION_mtl(major1,major2,minor) (\ + (major1) < 2 || \ + (major1) == 2 && (major2) < 2 || \ + (major1) == 2 && (major2) == 2 && (minor) <= 2) +#endif /* MIN_VERSION_mtl */ +/* package text-2.0.2 */ +#ifndef VERSION_text +#define VERSION_text "2.0.2" +#endif /* VERSION_text */ +#ifndef MIN_VERSION_text +#define MIN_VERSION_text(major1,major2,minor) (\ + (major1) < 2 || \ + (major1) == 2 && (major2) < 0 || \ + (major1) == 2 && (major2) == 0 && (minor) <= 2) +#endif /* MIN_VERSION_text */ + +/* tool alex-3.2.5 */ +#ifndef TOOL_VERSION_alex +#define TOOL_VERSION_alex "3.2.5" +#endif /* TOOL_VERSION_alex */ +#ifndef MIN_TOOL_VERSION_alex +#define MIN_TOOL_VERSION_alex(major1,major2,minor) (\ + (major1) < 3 || \ + (major1) == 3 && (major2) < 2 || \ + (major1) == 3 && (major2) == 2 && (minor) <= 5) +#endif /* MIN_TOOL_VERSION_alex */ +/* tool gcc-11 */ +#ifndef TOOL_VERSION_gcc +#define TOOL_VERSION_gcc "11" +#endif /* TOOL_VERSION_gcc */ +#ifndef MIN_TOOL_VERSION_gcc +#define MIN_TOOL_VERSION_gcc(major1,major2,minor) (\ + (major1) < 11 || \ + (major1) == 11 && (major2) < 0 || \ + (major1) == 11 && (major2) == 0 && (minor) <= 0) +#endif /* MIN_TOOL_VERSION_gcc */ +/* tool ghc-9.4.7 */ +#ifndef TOOL_VERSION_ghc +#define TOOL_VERSION_ghc "9.4.7" +#endif /* TOOL_VERSION_ghc */ +#ifndef MIN_TOOL_VERSION_ghc +#define MIN_TOOL_VERSION_ghc(major1,major2,minor) (\ + (major1) < 9 || \ + (major1) == 9 && (major2) < 4 || \ + (major1) == 9 && (major2) == 4 && (minor) <= 7) +#endif /* MIN_TOOL_VERSION_ghc */ +/* tool ghc-pkg-9.4.7 */ +#ifndef TOOL_VERSION_ghc_pkg +#define TOOL_VERSION_ghc_pkg "9.4.7" +#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) < 4 || \ + (major1) == 9 && (major2) == 4 && (minor) <= 7) +#endif /* MIN_TOOL_VERSION_ghc_pkg */ +/* tool haddock-2.27.0 */ +#ifndef TOOL_VERSION_haddock +#define TOOL_VERSION_haddock "2.27.0" +#endif /* TOOL_VERSION_haddock */ +#ifndef MIN_TOOL_VERSION_haddock +#define MIN_TOOL_VERSION_haddock(major1,major2,minor) (\ + (major1) < 2 || \ + (major1) == 2 && (major2) < 27 || \ + (major1) == 2 && (major2) == 27 && (minor) <= 0) +#endif /* MIN_TOOL_VERSION_haddock */ +/* tool happy-1.19.12 */ +#ifndef TOOL_VERSION_happy +#define TOOL_VERSION_happy "1.19.12" +#endif /* TOOL_VERSION_happy */ +#ifndef MIN_TOOL_VERSION_happy +#define MIN_TOOL_VERSION_happy(major1,major2,minor) (\ + (major1) < 1 || \ + (major1) == 1 && (major2) < 19 || \ + (major1) == 1 && (major2) == 19 && (minor) <= 12) +#endif /* MIN_TOOL_VERSION_happy */ +/* 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 hscolour-1.24 */ +#ifndef TOOL_VERSION_hscolour +#define TOOL_VERSION_hscolour "1.24" +#endif /* TOOL_VERSION_hscolour */ +#ifndef MIN_TOOL_VERSION_hscolour +#define MIN_TOOL_VERSION_hscolour(major1,major2,minor) (\ + (major1) < 1 || \ + (major1) == 1 && (major2) < 24 || \ + (major1) == 1 && (major2) == 24 && (minor) <= 0) +#endif /* MIN_TOOL_VERSION_hscolour */ +/* tool runghc-9.4.7 */ +#ifndef TOOL_VERSION_runghc +#define TOOL_VERSION_runghc "9.4.7" +#endif /* TOOL_VERSION_runghc */ +#ifndef MIN_TOOL_VERSION_runghc +#define MIN_TOOL_VERSION_runghc(major1,major2,minor) (\ + (major1) < 9 || \ + (major1) == 9 && (major2) < 4 || \ + (major1) == 9 && (major2) == 4 && (minor) <= 7) +#endif /* MIN_TOOL_VERSION_runghc */ +/* tool strip-2.38 */ +#ifndef TOOL_VERSION_strip +#define TOOL_VERSION_strip "2.38" +#endif /* TOOL_VERSION_strip */ +#ifndef MIN_TOOL_VERSION_strip +#define MIN_TOOL_VERSION_strip(major1,major2,minor) (\ + (major1) < 2 || \ + (major1) == 2 && (major2) < 38 || \ + (major1) == 2 && (major2) == 38 && (minor) <= 0) +#endif /* MIN_TOOL_VERSION_strip */ + +#ifndef CURRENT_COMPONENT_ID +#define CURRENT_COMPONENT_ID "ap05-0.1-AJuyaSgzdSw4SJrI0SnuWg-ex03" +#endif /* CURRENT_COMPONENT_ID */ +#ifndef CURRENT_PACKAGE_VERSION +#define CURRENT_PACKAGE_VERSION "0.1" +#endif /* CURRENT_PACKAGE_VERSION */ + +#undef CURRENT_PACKAGE_KEY +#undef CURRENT_COMPONENT_ID diff --git a/Aufgabe_5/code/.stack-work/ghci/a56c7444/cabal_macros.h b/Aufgabe_5/code/.stack-work/ghci/a56c7444/cabal_macros.h new file mode 100644 index 0000000..d6afa67 --- /dev/null +++ b/Aufgabe_5/code/.stack-work/ghci/a56c7444/cabal_macros.h @@ -0,0 +1,173 @@ +/* DO NOT EDIT: This file is automatically generated by Cabal */ + +/* package ap05-0.1 */ +#ifndef VERSION_ap05 +#define VERSION_ap05 "0.1" +#endif /* VERSION_ap05 */ +#ifndef MIN_VERSION_ap05 +#define MIN_VERSION_ap05(major1,major2,minor) (\ + (major1) < 0 || \ + (major1) == 0 && (major2) < 1 || \ + (major1) == 0 && (major2) == 1 && (minor) <= 0) +#endif /* MIN_VERSION_ap05 */ +/* package HUnit-1.6.2.0 */ +#ifndef VERSION_HUnit +#define VERSION_HUnit "1.6.2.0" +#endif /* VERSION_HUnit */ +#ifndef MIN_VERSION_HUnit +#define MIN_VERSION_HUnit(major1,major2,minor) (\ + (major1) < 1 || \ + (major1) == 1 && (major2) < 6 || \ + (major1) == 1 && (major2) == 6 && (minor) <= 2) +#endif /* MIN_VERSION_HUnit */ +/* package base-4.17.2.0 */ +#ifndef VERSION_base +#define VERSION_base "4.17.2.0" +#endif /* VERSION_base */ +#ifndef MIN_VERSION_base +#define MIN_VERSION_base(major1,major2,minor) (\ + (major1) < 4 || \ + (major1) == 4 && (major2) < 17 || \ + (major1) == 4 && (major2) == 17 && (minor) <= 2) +#endif /* MIN_VERSION_base */ +/* package mtl-2.2.2 */ +#ifndef VERSION_mtl +#define VERSION_mtl "2.2.2" +#endif /* VERSION_mtl */ +#ifndef MIN_VERSION_mtl +#define MIN_VERSION_mtl(major1,major2,minor) (\ + (major1) < 2 || \ + (major1) == 2 && (major2) < 2 || \ + (major1) == 2 && (major2) == 2 && (minor) <= 2) +#endif /* MIN_VERSION_mtl */ +/* package text-2.0.2 */ +#ifndef VERSION_text +#define VERSION_text "2.0.2" +#endif /* VERSION_text */ +#ifndef MIN_VERSION_text +#define MIN_VERSION_text(major1,major2,minor) (\ + (major1) < 2 || \ + (major1) == 2 && (major2) < 0 || \ + (major1) == 2 && (major2) == 0 && (minor) <= 2) +#endif /* MIN_VERSION_text */ + +/* tool alex-3.2.5 */ +#ifndef TOOL_VERSION_alex +#define TOOL_VERSION_alex "3.2.5" +#endif /* TOOL_VERSION_alex */ +#ifndef MIN_TOOL_VERSION_alex +#define MIN_TOOL_VERSION_alex(major1,major2,minor) (\ + (major1) < 3 || \ + (major1) == 3 && (major2) < 2 || \ + (major1) == 3 && (major2) == 2 && (minor) <= 5) +#endif /* MIN_TOOL_VERSION_alex */ +/* tool gcc-11 */ +#ifndef TOOL_VERSION_gcc +#define TOOL_VERSION_gcc "11" +#endif /* TOOL_VERSION_gcc */ +#ifndef MIN_TOOL_VERSION_gcc +#define MIN_TOOL_VERSION_gcc(major1,major2,minor) (\ + (major1) < 11 || \ + (major1) == 11 && (major2) < 0 || \ + (major1) == 11 && (major2) == 0 && (minor) <= 0) +#endif /* MIN_TOOL_VERSION_gcc */ +/* tool ghc-9.4.7 */ +#ifndef TOOL_VERSION_ghc +#define TOOL_VERSION_ghc "9.4.7" +#endif /* TOOL_VERSION_ghc */ +#ifndef MIN_TOOL_VERSION_ghc +#define MIN_TOOL_VERSION_ghc(major1,major2,minor) (\ + (major1) < 9 || \ + (major1) == 9 && (major2) < 4 || \ + (major1) == 9 && (major2) == 4 && (minor) <= 7) +#endif /* MIN_TOOL_VERSION_ghc */ +/* tool ghc-pkg-9.4.7 */ +#ifndef TOOL_VERSION_ghc_pkg +#define TOOL_VERSION_ghc_pkg "9.4.7" +#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) < 4 || \ + (major1) == 9 && (major2) == 4 && (minor) <= 7) +#endif /* MIN_TOOL_VERSION_ghc_pkg */ +/* tool haddock-2.27.0 */ +#ifndef TOOL_VERSION_haddock +#define TOOL_VERSION_haddock "2.27.0" +#endif /* TOOL_VERSION_haddock */ +#ifndef MIN_TOOL_VERSION_haddock +#define MIN_TOOL_VERSION_haddock(major1,major2,minor) (\ + (major1) < 2 || \ + (major1) == 2 && (major2) < 27 || \ + (major1) == 2 && (major2) == 27 && (minor) <= 0) +#endif /* MIN_TOOL_VERSION_haddock */ +/* tool happy-1.19.12 */ +#ifndef TOOL_VERSION_happy +#define TOOL_VERSION_happy "1.19.12" +#endif /* TOOL_VERSION_happy */ +#ifndef MIN_TOOL_VERSION_happy +#define MIN_TOOL_VERSION_happy(major1,major2,minor) (\ + (major1) < 1 || \ + (major1) == 1 && (major2) < 19 || \ + (major1) == 1 && (major2) == 19 && (minor) <= 12) +#endif /* MIN_TOOL_VERSION_happy */ +/* 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 hscolour-1.24 */ +#ifndef TOOL_VERSION_hscolour +#define TOOL_VERSION_hscolour "1.24" +#endif /* TOOL_VERSION_hscolour */ +#ifndef MIN_TOOL_VERSION_hscolour +#define MIN_TOOL_VERSION_hscolour(major1,major2,minor) (\ + (major1) < 1 || \ + (major1) == 1 && (major2) < 24 || \ + (major1) == 1 && (major2) == 24 && (minor) <= 0) +#endif /* MIN_TOOL_VERSION_hscolour */ +/* tool runghc-9.4.7 */ +#ifndef TOOL_VERSION_runghc +#define TOOL_VERSION_runghc "9.4.7" +#endif /* TOOL_VERSION_runghc */ +#ifndef MIN_TOOL_VERSION_runghc +#define MIN_TOOL_VERSION_runghc(major1,major2,minor) (\ + (major1) < 9 || \ + (major1) == 9 && (major2) < 4 || \ + (major1) == 9 && (major2) == 4 && (minor) <= 7) +#endif /* MIN_TOOL_VERSION_runghc */ +/* tool strip-2.38 */ +#ifndef TOOL_VERSION_strip +#define TOOL_VERSION_strip "2.38" +#endif /* TOOL_VERSION_strip */ +#ifndef MIN_TOOL_VERSION_strip +#define MIN_TOOL_VERSION_strip(major1,major2,minor) (\ + (major1) < 2 || \ + (major1) == 2 && (major2) < 38 || \ + (major1) == 2 && (major2) == 38 && (minor) <= 0) +#endif /* MIN_TOOL_VERSION_strip */ + +#ifndef CURRENT_COMPONENT_ID +#define CURRENT_COMPONENT_ID "ap05-0.1-1WN5bfNZMxCBk9rV3xcl3T-ex01" +#endif /* CURRENT_COMPONENT_ID */ +#ifndef CURRENT_PACKAGE_VERSION +#define CURRENT_PACKAGE_VERSION "0.1" +#endif /* CURRENT_PACKAGE_VERSION */ + +#undef CURRENT_PACKAGE_KEY +#undef CURRENT_COMPONENT_ID diff --git a/Aufgabe_5/code/.stack-work/ghci/bd96ddf2/cabal_macros.h b/Aufgabe_5/code/.stack-work/ghci/bd96ddf2/cabal_macros.h new file mode 100644 index 0000000..faa6585 --- /dev/null +++ b/Aufgabe_5/code/.stack-work/ghci/bd96ddf2/cabal_macros.h @@ -0,0 +1,173 @@ +/* DO NOT EDIT: This file is automatically generated by Cabal */ + +/* package ap05-0.1 */ +#ifndef VERSION_ap05 +#define VERSION_ap05 "0.1" +#endif /* VERSION_ap05 */ +#ifndef MIN_VERSION_ap05 +#define MIN_VERSION_ap05(major1,major2,minor) (\ + (major1) < 0 || \ + (major1) == 0 && (major2) < 1 || \ + (major1) == 0 && (major2) == 1 && (minor) <= 0) +#endif /* MIN_VERSION_ap05 */ +/* package HUnit-1.6.2.0 */ +#ifndef VERSION_HUnit +#define VERSION_HUnit "1.6.2.0" +#endif /* VERSION_HUnit */ +#ifndef MIN_VERSION_HUnit +#define MIN_VERSION_HUnit(major1,major2,minor) (\ + (major1) < 1 || \ + (major1) == 1 && (major2) < 6 || \ + (major1) == 1 && (major2) == 6 && (minor) <= 2) +#endif /* MIN_VERSION_HUnit */ +/* package base-4.17.2.0 */ +#ifndef VERSION_base +#define VERSION_base "4.17.2.0" +#endif /* VERSION_base */ +#ifndef MIN_VERSION_base +#define MIN_VERSION_base(major1,major2,minor) (\ + (major1) < 4 || \ + (major1) == 4 && (major2) < 17 || \ + (major1) == 4 && (major2) == 17 && (minor) <= 2) +#endif /* MIN_VERSION_base */ +/* package mtl-2.2.2 */ +#ifndef VERSION_mtl +#define VERSION_mtl "2.2.2" +#endif /* VERSION_mtl */ +#ifndef MIN_VERSION_mtl +#define MIN_VERSION_mtl(major1,major2,minor) (\ + (major1) < 2 || \ + (major1) == 2 && (major2) < 2 || \ + (major1) == 2 && (major2) == 2 && (minor) <= 2) +#endif /* MIN_VERSION_mtl */ +/* package text-2.0.2 */ +#ifndef VERSION_text +#define VERSION_text "2.0.2" +#endif /* VERSION_text */ +#ifndef MIN_VERSION_text +#define MIN_VERSION_text(major1,major2,minor) (\ + (major1) < 2 || \ + (major1) == 2 && (major2) < 0 || \ + (major1) == 2 && (major2) == 0 && (minor) <= 2) +#endif /* MIN_VERSION_text */ + +/* tool alex-3.2.5 */ +#ifndef TOOL_VERSION_alex +#define TOOL_VERSION_alex "3.2.5" +#endif /* TOOL_VERSION_alex */ +#ifndef MIN_TOOL_VERSION_alex +#define MIN_TOOL_VERSION_alex(major1,major2,minor) (\ + (major1) < 3 || \ + (major1) == 3 && (major2) < 2 || \ + (major1) == 3 && (major2) == 2 && (minor) <= 5) +#endif /* MIN_TOOL_VERSION_alex */ +/* tool gcc-11 */ +#ifndef TOOL_VERSION_gcc +#define TOOL_VERSION_gcc "11" +#endif /* TOOL_VERSION_gcc */ +#ifndef MIN_TOOL_VERSION_gcc +#define MIN_TOOL_VERSION_gcc(major1,major2,minor) (\ + (major1) < 11 || \ + (major1) == 11 && (major2) < 0 || \ + (major1) == 11 && (major2) == 0 && (minor) <= 0) +#endif /* MIN_TOOL_VERSION_gcc */ +/* tool ghc-9.4.7 */ +#ifndef TOOL_VERSION_ghc +#define TOOL_VERSION_ghc "9.4.7" +#endif /* TOOL_VERSION_ghc */ +#ifndef MIN_TOOL_VERSION_ghc +#define MIN_TOOL_VERSION_ghc(major1,major2,minor) (\ + (major1) < 9 || \ + (major1) == 9 && (major2) < 4 || \ + (major1) == 9 && (major2) == 4 && (minor) <= 7) +#endif /* MIN_TOOL_VERSION_ghc */ +/* tool ghc-pkg-9.4.7 */ +#ifndef TOOL_VERSION_ghc_pkg +#define TOOL_VERSION_ghc_pkg "9.4.7" +#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) < 4 || \ + (major1) == 9 && (major2) == 4 && (minor) <= 7) +#endif /* MIN_TOOL_VERSION_ghc_pkg */ +/* tool haddock-2.27.0 */ +#ifndef TOOL_VERSION_haddock +#define TOOL_VERSION_haddock "2.27.0" +#endif /* TOOL_VERSION_haddock */ +#ifndef MIN_TOOL_VERSION_haddock +#define MIN_TOOL_VERSION_haddock(major1,major2,minor) (\ + (major1) < 2 || \ + (major1) == 2 && (major2) < 27 || \ + (major1) == 2 && (major2) == 27 && (minor) <= 0) +#endif /* MIN_TOOL_VERSION_haddock */ +/* tool happy-1.19.12 */ +#ifndef TOOL_VERSION_happy +#define TOOL_VERSION_happy "1.19.12" +#endif /* TOOL_VERSION_happy */ +#ifndef MIN_TOOL_VERSION_happy +#define MIN_TOOL_VERSION_happy(major1,major2,minor) (\ + (major1) < 1 || \ + (major1) == 1 && (major2) < 19 || \ + (major1) == 1 && (major2) == 19 && (minor) <= 12) +#endif /* MIN_TOOL_VERSION_happy */ +/* 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 hscolour-1.24 */ +#ifndef TOOL_VERSION_hscolour +#define TOOL_VERSION_hscolour "1.24" +#endif /* TOOL_VERSION_hscolour */ +#ifndef MIN_TOOL_VERSION_hscolour +#define MIN_TOOL_VERSION_hscolour(major1,major2,minor) (\ + (major1) < 1 || \ + (major1) == 1 && (major2) < 24 || \ + (major1) == 1 && (major2) == 24 && (minor) <= 0) +#endif /* MIN_TOOL_VERSION_hscolour */ +/* tool runghc-9.4.7 */ +#ifndef TOOL_VERSION_runghc +#define TOOL_VERSION_runghc "9.4.7" +#endif /* TOOL_VERSION_runghc */ +#ifndef MIN_TOOL_VERSION_runghc +#define MIN_TOOL_VERSION_runghc(major1,major2,minor) (\ + (major1) < 9 || \ + (major1) == 9 && (major2) < 4 || \ + (major1) == 9 && (major2) == 4 && (minor) <= 7) +#endif /* MIN_TOOL_VERSION_runghc */ +/* tool strip-2.38 */ +#ifndef TOOL_VERSION_strip +#define TOOL_VERSION_strip "2.38" +#endif /* TOOL_VERSION_strip */ +#ifndef MIN_TOOL_VERSION_strip +#define MIN_TOOL_VERSION_strip(major1,major2,minor) (\ + (major1) < 2 || \ + (major1) == 2 && (major2) < 38 || \ + (major1) == 2 && (major2) == 38 && (minor) <= 0) +#endif /* MIN_TOOL_VERSION_strip */ + +#ifndef CURRENT_COMPONENT_ID +#define CURRENT_COMPONENT_ID "ap05-0.1-95SecnZIX6WJ1hjkoNBMel-ex02" +#endif /* CURRENT_COMPONENT_ID */ +#ifndef CURRENT_PACKAGE_VERSION +#define CURRENT_PACKAGE_VERSION "0.1" +#endif /* CURRENT_PACKAGE_VERSION */ + +#undef CURRENT_PACKAGE_KEY +#undef CURRENT_COMPONENT_ID diff --git a/Aufgabe_5/code/.stack-work/install/x86_64-linux/1006e3a79413cac00f66edc2857535513565a12ac86ee78bec0bc75edc5e5501/9.4.7/pkgdb/package.cache b/Aufgabe_5/code/.stack-work/install/x86_64-linux/1006e3a79413cac00f66edc2857535513565a12ac86ee78bec0bc75edc5e5501/9.4.7/pkgdb/package.cache new file mode 100644 index 0000000..b3cae5c Binary files /dev/null and b/Aufgabe_5/code/.stack-work/install/x86_64-linux/1006e3a79413cac00f66edc2857535513565a12ac86ee78bec0bc75edc5e5501/9.4.7/pkgdb/package.cache differ diff --git a/Aufgabe_5/code/.stack-work/install/x86_64-linux/1006e3a79413cac00f66edc2857535513565a12ac86ee78bec0bc75edc5e5501/9.4.7/pkgdb/package.cache.lock b/Aufgabe_5/code/.stack-work/install/x86_64-linux/1006e3a79413cac00f66edc2857535513565a12ac86ee78bec0bc75edc5e5501/9.4.7/pkgdb/package.cache.lock new file mode 100644 index 0000000..e69de29 diff --git a/Aufgabe_5/code/.stack-work/install/x86_64-linux/c95135353db856bc6efc9bd10e84b1a5a9a219f3607bca4f1889717059c848cc/9.4.7/installed-packages/ap05-0.1 b/Aufgabe_5/code/.stack-work/install/x86_64-linux/c95135353db856bc6efc9bd10e84b1a5a9a219f3607bca4f1889717059c848cc/9.4.7/installed-packages/ap05-0.1 new file mode 100644 index 0000000..795f563 --- /dev/null +++ b/Aufgabe_5/code/.stack-work/install/x86_64-linux/c95135353db856bc6efc9bd10e84b1a5a9a219f3607bca4f1889717059c848cc/9.4.7/installed-packages/ap05-0.1 @@ -0,0 +1 @@ +Installed \ No newline at end of file diff --git a/Aufgabe_5/code/.stack-work/install/x86_64-linux/c95135353db856bc6efc9bd10e84b1a5a9a219f3607bca4f1889717059c848cc/9.4.7/pkgdb/package.cache b/Aufgabe_5/code/.stack-work/install/x86_64-linux/c95135353db856bc6efc9bd10e84b1a5a9a219f3607bca4f1889717059c848cc/9.4.7/pkgdb/package.cache new file mode 100644 index 0000000..b3cae5c Binary files /dev/null and b/Aufgabe_5/code/.stack-work/install/x86_64-linux/c95135353db856bc6efc9bd10e84b1a5a9a219f3607bca4f1889717059c848cc/9.4.7/pkgdb/package.cache differ diff --git a/Aufgabe_5/code/.stack-work/install/x86_64-linux/c95135353db856bc6efc9bd10e84b1a5a9a219f3607bca4f1889717059c848cc/9.4.7/pkgdb/package.cache.lock b/Aufgabe_5/code/.stack-work/install/x86_64-linux/c95135353db856bc6efc9bd10e84b1a5a9a219f3607bca4f1889717059c848cc/9.4.7/pkgdb/package.cache.lock new file mode 100644 index 0000000..e69de29 diff --git a/Aufgabe_5/code/.stack-work/stack.sqlite3 b/Aufgabe_5/code/.stack-work/stack.sqlite3 new file mode 100644 index 0000000..47c5d2e Binary files /dev/null and b/Aufgabe_5/code/.stack-work/stack.sqlite3 differ diff --git a/Aufgabe_5/code/.stack-work/stack.sqlite3.pantry-write-lock b/Aufgabe_5/code/.stack-work/stack.sqlite3.pantry-write-lock new file mode 100644 index 0000000..e69de29 diff --git a/Aufgabe_5/code/.vscode/settings.json b/Aufgabe_5/code/.vscode/settings.json new file mode 100755 index 0000000..41a9e4b --- /dev/null +++ b/Aufgabe_5/code/.vscode/settings.json @@ -0,0 +1,3 @@ +{ + "haskell.plugin.hlint.codeActionsOn": false +} diff --git a/Aufgabe_5/code/AaronMoser_187648.zip b/Aufgabe_5/code/AaronMoser_187648.zip new file mode 100644 index 0000000..7e29bb8 Binary files /dev/null and b/Aufgabe_5/code/AaronMoser_187648.zip differ diff --git a/Aufgabe_5/code/ap05.cabal b/Aufgabe_5/code/ap05.cabal new file mode 100644 index 0000000..fcf016e --- /dev/null +++ b/Aufgabe_5/code/ap05.cabal @@ -0,0 +1,97 @@ +cabal-version: 1.12 + +-- This file has been generated from package.yaml by hpack version 0.35.2. +-- +-- see: https://github.com/sol/hpack + +name: ap05 +version: 0.1 +synopsis: ap05 +license: BSD3 +build-type: Simple + +flag test-mode + description: By default, do not run instructor tests + manual: True + default: False + +test-suite ex01 + type: exitcode-stdio-1.0 + main-is: Main.hs + other-modules: + Exp + Paths_ap05 + hs-source-dirs: + ex01 + default-extensions: + ScopedTypeVariables + ghc-options: -Werror -W -fwarn-unused-binds -fwarn-orphans -fwarn-unused-matches -fwarn-unused-do-bind -fwarn-wrong-do-bind -fwarn-missing-signatures -fno-warn-partial-type-signatures -Wredundant-constraints + build-depends: + HUnit + , base + , mtl + , text + default-language: Haskell2010 + if flag(test-mode) + build-depends: + bytestring + , directory + , filepath + , haskell-src-meta + , main-tester + , template-haskell + else + +test-suite ex02 + type: exitcode-stdio-1.0 + main-is: Main.hs + other-modules: + Product + Paths_ap05 + hs-source-dirs: + ex02 + default-extensions: + ScopedTypeVariables + ghc-options: -Werror -W -fwarn-unused-binds -fwarn-orphans -fwarn-unused-matches -fwarn-unused-do-bind -fwarn-wrong-do-bind -fwarn-missing-signatures -fno-warn-partial-type-signatures -Wredundant-constraints + build-depends: + HUnit + , base + , mtl + , text + default-language: Haskell2010 + if flag(test-mode) + build-depends: + bytestring + , directory + , filepath + , haskell-src-meta + , main-tester + , template-haskell + else + +test-suite ex03 + type: exitcode-stdio-1.0 + main-is: Main.hs + other-modules: + Random + Paths_ap05 + hs-source-dirs: + ex03 + default-extensions: + ScopedTypeVariables + ghc-options: -Werror -W -fwarn-unused-binds -fwarn-orphans -fwarn-unused-matches -fwarn-unused-do-bind -fwarn-wrong-do-bind -fwarn-missing-signatures -fno-warn-partial-type-signatures -Wredundant-constraints + build-depends: + HUnit + , base + , mtl + , text + default-language: Haskell2010 + if flag(test-mode) + build-depends: + bytestring + , directory + , filepath + , haskell-src-meta + , main-tester + , template-haskell + else diff --git a/Aufgabe_5/code/ex01/Exp.hs b/Aufgabe_5/code/ex01/Exp.hs new file mode 100755 index 0000000..fa0d4d0 --- /dev/null +++ b/Aufgabe_5/code/ex01/Exp.hs @@ -0,0 +1,128 @@ +module Exp where + +import Test.HUnit + +import Data.Maybe (fromMaybe) + +-- Tests +allTests :: Test +allTests = TestList [ + TestLabel "testEval1" testEval1, + TestLabel "testEval2" testEval2, + TestLabel "testEval3" testEval3 + ] + +data Exp = ExpAdd Exp Exp + | ExpMult Exp Exp + | ExpDiv Exp Exp + | Const Integer + +--------------------------------------------- +-- eval1 +--------------------------------------------- + +eval1 :: Exp -> Maybe Integer +eval1 exp = + case exp of + ExpAdd exp1 exp2 -> + let outcomeExp1 = eval1 exp1 + outcomeExp2 = eval1 exp2 + in + case outcomeExp1 of + Nothing -> Nothing + _ -> case outcomeExp2 of + Nothing -> Nothing + _ -> Just (fromMaybe 0 outcomeExp1 + fromMaybe 0 outcomeExp2) + ExpMult exp1 exp2 -> + let outcomeExp1 = eval1 exp1 + outcomeExp2 = eval1 exp2 + in + case outcomeExp1 of + Nothing -> Nothing + _ -> case outcomeExp2 of + Nothing -> Nothing + _ -> Just (fromMaybe 0 outcomeExp1 * fromMaybe 0 outcomeExp2) + ExpDiv exp1 exp2 -> + let outcomeExp1 = eval1 exp1 + outcomeExp2 = eval1 exp2 + in + case outcomeExp1 of + Nothing -> Nothing + _ -> case outcomeExp2 of + Nothing -> Nothing + Just 0 -> Nothing + _ -> Just (fromMaybe 0 outcomeExp1 `div` fromMaybe 0 outcomeExp2) + Const value -> Just value + +--------------------------------------------- +-- Test eval1 +--------------------------------------------- +testEval1 :: Test +testEval1 = TestCase $ do + assertEqual "test1" (Just 4) (eval1 (Const 4)) + assertEqual "test2" (Nothing) (eval1 (ExpDiv (ExpAdd (Const 4) (Const 5)) (Const 0))) + assertEqual "test3" (Just 2) (eval1 (ExpDiv (ExpAdd (Const 4) (Const 10)) (Const 7))) + +--------------------------------------------- +-- eval2 +--------------------------------------------- +eval2 :: Exp -> Maybe Integer +eval2 exp = + case exp of + ExpAdd exp1 exp2 -> do + outcomeExp1 <- eval2 exp1 + outcomeExp2 <- eval2 exp2 + pure (outcomeExp1 + outcomeExp2) + ExpMult exp1 exp2 -> do + outcomeExp1 <- eval2 exp1 + outcomeExp2 <- eval2 exp2 + pure (outcomeExp1 * outcomeExp2) + ExpDiv exp1 exp2 -> do + outcomeExp1 <- eval2 exp1 + outcomeExp2 <- eval2 exp2 + if outcomeExp2 == 0 + then Nothing + else pure (outcomeExp1 `div` outcomeExp2) + Const x -> + pure x + +--------------------------------------------- +-- Test eval2 +--------------------------------------------- +testEval2 :: Test +testEval2 = TestCase $ do + assertEqual "test1" (Just 4) (eval2 (Const 4)) + assertEqual "test2" (Nothing) (eval2 (ExpDiv (ExpAdd (Const 4) (Const 5)) (Const 0))) + assertEqual "test3" (Just 2) (eval2 (ExpDiv (ExpAdd (Const 4) (Const 10)) (Const 7))) + +--------------------------------------------- +-- eval3 +--------------------------------------------- +eval3 :: Exp -> Maybe Integer +eval3 exp = + case exp of + ExpAdd exp1 exp2 -> + eval3 exp1 >>= \x1 -> + eval3 exp2 >>= \x2 -> + pure (x1 + x2) + ExpMult exp1 exp2 -> + eval3 exp1 >>= \x1 -> + eval3 exp2 >>= \x2 -> + pure (x1 * x2) + ExpDiv exp1 exp2 -> + eval3 exp1 >>= \x1 -> + eval3 exp2 >>= \x2 -> + if x2 == 0 + then Nothing + else pure (x1 `div` x2) + Const x -> + pure x + +--------------------------------------------- +-- Test eval3 +--------------------------------------------- +testEval3 :: Test +testEval3 = TestCase $ do + assertEqual "test1" (Just 4) (eval3 (Const 4)) + assertEqual "test2" Nothing (eval3 (ExpDiv (ExpAdd (Const 4) (Const 5)) (Const 0))) + assertEqual "test3" (Just 2) (eval3 (ExpDiv (ExpAdd (Const 4) (Const 10)) (Const 7))) diff --git a/Aufgabe_5/code/ex01/Main.hs b/Aufgabe_5/code/ex01/Main.hs new file mode 100755 index 0000000..c90ada2 --- /dev/null +++ b/Aufgabe_5/code/ex01/Main.hs @@ -0,0 +1,7 @@ +module Main where + +import Exp (allTests) +import Test.HUnit (runTestTTAndExit) + +main :: IO () +main = runTestTTAndExit allTests diff --git a/Aufgabe_5/code/ex02/Main.hs b/Aufgabe_5/code/ex02/Main.hs new file mode 100755 index 0000000..271b743 --- /dev/null +++ b/Aufgabe_5/code/ex02/Main.hs @@ -0,0 +1,7 @@ +module Main where + +import Product (allTests) +import Test.HUnit (runTestTTAndExit) + +main :: IO () +main = runTestTTAndExit allTests diff --git a/Aufgabe_5/code/ex02/Product.hs b/Aufgabe_5/code/ex02/Product.hs new file mode 100755 index 0000000..3377d4b --- /dev/null +++ b/Aufgabe_5/code/ex02/Product.hs @@ -0,0 +1,71 @@ +module Product where + +import Control.Monad.Reader +import Test.HUnit +import Data.List (intercalate) + +-- Beispielwerte +-- 1 Euro kostet 1,14 Dollar +-- 1 Euro kostet 1,05 CHF + +data Config = Config { dollarRate :: Double, chfRate :: Double } + +data Price + = PriceEuro Double + | PriceDollar Double + | PriceCHF Double + +data Product + = Product + { productName :: String + , productQuantity :: Int + , productSinglePrice :: Price + } + +data Invoice + = Invoice + { invoiceCustomer :: String + , invoiceProducts :: [Product] + } + +sampleInvoice :: Invoice +sampleInvoice = + Invoice + { invoiceCustomer = "Stefan Wehr" + , invoiceProducts = [p1, p2] + } + where + p1 = Product "Feinstimmer Geige" 2 (PriceDollar 9.1086) + p2 = Product "HX Effects" 1 (PriceCHF 523.95) + +formatInvoice :: Invoice -> Reader Config String +formatInvoice invoice = do + productStrings <- traverse formatProduct (invoiceProducts invoice) + let customer = invoiceCustomer invoice ++ "\n\n" + let products = intercalate "\n" productStrings + return $ customer ++ products + +formatProduct :: Product -> Reader Config String +formatProduct product = do + price <- convertPrice $ productSinglePrice product + return $ productName product ++ " (" ++ show (productQuantity product) ++ "x) " ++ show price ++ " EUR" + +convertPrice :: Price -> Reader Config Double +convertPrice price = do + priceRates <- ask + case price of + PriceEuro euro -> return euro + PriceDollar dollar -> return $ if dollarRate priceRates <= 0 then error "Dollar rate is 0 or negative" else dollar / dollarRate priceRates + PriceCHF chf -> return $ if chfRate priceRates <= 0 then error "CHF rate is 0 or negative." else chf / chfRate priceRates + +-- Tests +allTests :: Test +allTests = TestList [ + TestLabel "testFormatInvoice" testFormatInvoice + ] + +testFormatInvoice :: Test +testFormatInvoice = TestCase $ do + let config = Config 1.14 1.05 + let formattedInvoice = runReader (formatInvoice sampleInvoice) config + assertEqual "test1" "Stefan Wehr\n\nFeinstimmer Geige (2x) 7.99 EUR\nHX Effects (1x) 499.0 EUR" formattedInvoice \ No newline at end of file diff --git a/Aufgabe_5/code/ex03/Main.hs b/Aufgabe_5/code/ex03/Main.hs new file mode 100755 index 0000000..3bd04ae --- /dev/null +++ b/Aufgabe_5/code/ex03/Main.hs @@ -0,0 +1,7 @@ +module Main where + +import Random (allTests) +import Test.HUnit (runTestTTAndExit) + +main :: IO () +main = runTestTTAndExit allTests diff --git a/Aufgabe_5/code/ex03/Random.hs b/Aufgabe_5/code/ex03/Random.hs new file mode 100755 index 0000000..fa34578 --- /dev/null +++ b/Aufgabe_5/code/ex03/Random.hs @@ -0,0 +1,37 @@ +module Random where + +import Control.Monad.State.Lazy +import Test.HUnit hiding (State) + +type Random a = State Integer a + +-- X <- (aX + c) mod m +fresh :: Random Integer +fresh = do + lastRand <- get + let newRand = (6364136223846793005 * lastRand + 1442695040888963407) `mod` 2 ^ 64 + put newRand + return newRand + +runPRNG :: Random a -> Integer -> a +runPRNG action init = fst $ runState action init + +threeRandomNumbers :: Random [Integer] +threeRandomNumbers = do + rand1 <- fresh + rand2 <- fresh + rand3 <- fresh + return [rand1, rand2, rand3] + +testThreeRandomNumbers :: Test +testThreeRandomNumbers = TestCase $ + let seed = 1 + randomNumbers = runPRNG threeRandomNumbers seed + in do + assertEqual "test1" [7806831264735756412, 9396908728118811419, 11960119808228829710] randomNumbers + +-- Tests +allTests :: Test +allTests = TestList [ + TestLabel "testThreeRandomNumbers" testThreeRandomNumbers + ] diff --git a/Aufgabe_5/code/package.yaml b/Aufgabe_5/code/package.yaml new file mode 100755 index 0000000..d0aa6c3 --- /dev/null +++ b/Aufgabe_5/code/package.yaml @@ -0,0 +1,51 @@ +name: ap05 +version: 0.1 +synopsis: ap05 +license: BSD3 + +dependencies: + - base + - HUnit + - mtl + - text + +tests: + ex01: + main: Main.hs + source-dirs: ex01 + ex02: + main: Main.hs + source-dirs: ex02 + ex03: + main: Main.hs + source-dirs: ex03 + +ghc-options: + - -Werror -W -fwarn-unused-binds -fwarn-orphans + - -fwarn-unused-matches -fwarn-unused-do-bind -fwarn-wrong-do-bind + - -fwarn-missing-signatures -fno-warn-partial-type-signatures + - -Wredundant-constraints + +default-extensions: + - ScopedTypeVariables + +# Setup for running tests in praktomat + +flags: + test-mode: + description: "By default, do not run instructor tests" + manual: true + default: false + +when: +- condition: flag(test-mode) + then: + dependencies: + - template-haskell + - haskell-src-meta + - filepath + - bytestring + - directory + - main-tester + else: + dependencies: [] diff --git a/Aufgabe_5/code/stack.yaml b/Aufgabe_5/code/stack.yaml new file mode 100755 index 0000000..ba6a80f --- /dev/null +++ b/Aufgabe_5/code/stack.yaml @@ -0,0 +1,3 @@ +resolver: lts-21.14 +packages: +- . diff --git a/Aufgabe_5/code/stack.yaml.lock b/Aufgabe_5/code/stack.yaml.lock new file mode 100644 index 0000000..31decf5 --- /dev/null +++ b/Aufgabe_5/code/stack.yaml.lock @@ -0,0 +1,12 @@ +# This file was autogenerated by Stack. +# You should not edit this file by hand. +# For more information, please see the documentation at: +# https://docs.haskellstack.org/en/stable/lock_files + +packages: [] +snapshots: +- completed: + sha256: 60e54c1ba3c1e7163acf6dafa9d56b2d3b23f88a31ad53a1c9d888f32561f8da + size: 639819 + url: https://raw.githubusercontent.com/commercialhaskell/stackage-snapshots/master/lts/21/14.yaml + original: lts-21.14 diff --git a/Aufgabe_6/CHANGES.txt b/Aufgabe_6/CHANGES.txt new file mode 100755 index 0000000..3a983fa --- /dev/null +++ b/Aufgabe_6/CHANGES.txt @@ -0,0 +1,20 @@ +ÄNDERUNGSHISTORIE + +2023-12-11T14:08:41+01:00 + Geänderte, hinzugefügte oder gelöschte Dateien: + * ./ + * huffman.pdf + * code/ + * code/.hlint.yaml + * code/hitchhiker.txt + * code/package.yaml + * code/stack.yaml + * code/.vscode/ + * code/.vscode/settings.json + * code/exe/ + * code/exe/Main.hs + * code/src/ + * code/src/Auxiliaries.hs + * code/src/Huffman.hs + * code/test/ + * code/test/Tests.hs \ No newline at end of file diff --git a/Aufgabe_6/P06-final-project.zip b/Aufgabe_6/P06-final-project.zip new file mode 100644 index 0000000..1e11173 Binary files /dev/null and b/Aufgabe_6/P06-final-project.zip differ diff --git a/Aufgabe_6/code/.hlint.yaml b/Aufgabe_6/code/.hlint.yaml new file mode 100755 index 0000000..bd7575b --- /dev/null +++ b/Aufgabe_6/code/.hlint.yaml @@ -0,0 +1,31 @@ +# HLint configuration file +# https://github.com/ndmitchell/hlint + +# Ignore some builtin hints +- ignore: {name: "Avoid lambda using `infix`"} +- ignore: {name: "Avoid lambda"} +- ignore: {name: "Eta reduce"} +- ignore: {name: "Move brackets to avoid $"} +- ignore: {name: "Reduce duplication" } +- ignore: {name: "Redundant $!" } +- ignore: {name: "Redundant bracket"} +- ignore: {name: "Redundant do"} +- ignore: {name: "Redundant pure"} +- ignore: {name: "Redundant return"} +- ignore: {name: "Replace case with maybe"} +- ignore: {name: "Use $>" } +- ignore: {name: "Use <$>"} +- ignore: {name: "Use camelCase" } +- ignore: {name: "Use const"} +- ignore: {name: "Use fmap" } +- ignore: {name: "Use foldr"} +- ignore: {name: "Use guards"} +- ignore: {name: "Use if"} +- ignore: {name: "Use list comprehension"} +- ignore: {name: "Use maybe"} +- ignore: {name: "Use newtype instead of data"} +- ignore: {name: "Use notElem"} +- ignore: {name: "Use second" } +- ignore: {name: "Use section" } +- ignore: {name: "Use tuple-section"} +- ignore: {name: "Use uncurry" } diff --git a/Aufgabe_6/code/.stack-work/dist/x86_64-linux/Cabal-3.8.1.0/build-lock b/Aufgabe_6/code/.stack-work/dist/x86_64-linux/Cabal-3.8.1.0/build-lock new file mode 100644 index 0000000..e69de29 diff --git a/Aufgabe_6/code/.stack-work/dist/x86_64-linux/Cabal-3.8.1.0/build/Auxiliaries.dyn_hi b/Aufgabe_6/code/.stack-work/dist/x86_64-linux/Cabal-3.8.1.0/build/Auxiliaries.dyn_hi new file mode 100644 index 0000000..47329a8 Binary files /dev/null and b/Aufgabe_6/code/.stack-work/dist/x86_64-linux/Cabal-3.8.1.0/build/Auxiliaries.dyn_hi differ diff --git a/Aufgabe_6/code/.stack-work/dist/x86_64-linux/Cabal-3.8.1.0/build/Auxiliaries.dyn_o b/Aufgabe_6/code/.stack-work/dist/x86_64-linux/Cabal-3.8.1.0/build/Auxiliaries.dyn_o new file mode 100644 index 0000000..6cbf0ef Binary files /dev/null and b/Aufgabe_6/code/.stack-work/dist/x86_64-linux/Cabal-3.8.1.0/build/Auxiliaries.dyn_o differ diff --git a/Aufgabe_6/code/.stack-work/dist/x86_64-linux/Cabal-3.8.1.0/build/Auxiliaries.hi b/Aufgabe_6/code/.stack-work/dist/x86_64-linux/Cabal-3.8.1.0/build/Auxiliaries.hi new file mode 100644 index 0000000..bd9d187 Binary files /dev/null and b/Aufgabe_6/code/.stack-work/dist/x86_64-linux/Cabal-3.8.1.0/build/Auxiliaries.hi differ diff --git a/Aufgabe_6/code/.stack-work/dist/x86_64-linux/Cabal-3.8.1.0/build/Auxiliaries.o b/Aufgabe_6/code/.stack-work/dist/x86_64-linux/Cabal-3.8.1.0/build/Auxiliaries.o new file mode 100644 index 0000000..265d975 Binary files /dev/null and b/Aufgabe_6/code/.stack-work/dist/x86_64-linux/Cabal-3.8.1.0/build/Auxiliaries.o differ diff --git a/Aufgabe_6/code/.stack-work/dist/x86_64-linux/Cabal-3.8.1.0/build/Huffman.dyn_hi b/Aufgabe_6/code/.stack-work/dist/x86_64-linux/Cabal-3.8.1.0/build/Huffman.dyn_hi new file mode 100644 index 0000000..4dd1c0c Binary files /dev/null and b/Aufgabe_6/code/.stack-work/dist/x86_64-linux/Cabal-3.8.1.0/build/Huffman.dyn_hi differ diff --git a/Aufgabe_6/code/.stack-work/dist/x86_64-linux/Cabal-3.8.1.0/build/Huffman.dyn_o b/Aufgabe_6/code/.stack-work/dist/x86_64-linux/Cabal-3.8.1.0/build/Huffman.dyn_o new file mode 100644 index 0000000..c856a34 Binary files /dev/null and b/Aufgabe_6/code/.stack-work/dist/x86_64-linux/Cabal-3.8.1.0/build/Huffman.dyn_o differ diff --git a/Aufgabe_6/code/.stack-work/dist/x86_64-linux/Cabal-3.8.1.0/build/Huffman.hi b/Aufgabe_6/code/.stack-work/dist/x86_64-linux/Cabal-3.8.1.0/build/Huffman.hi new file mode 100644 index 0000000..1524701 Binary files /dev/null and b/Aufgabe_6/code/.stack-work/dist/x86_64-linux/Cabal-3.8.1.0/build/Huffman.hi differ diff --git a/Aufgabe_6/code/.stack-work/dist/x86_64-linux/Cabal-3.8.1.0/build/Huffman.o b/Aufgabe_6/code/.stack-work/dist/x86_64-linux/Cabal-3.8.1.0/build/Huffman.o new file mode 100644 index 0000000..818de89 Binary files /dev/null and b/Aufgabe_6/code/.stack-work/dist/x86_64-linux/Cabal-3.8.1.0/build/Huffman.o differ diff --git a/Aufgabe_6/code/.stack-work/dist/x86_64-linux/Cabal-3.8.1.0/build/Paths_huffman.dyn_hi b/Aufgabe_6/code/.stack-work/dist/x86_64-linux/Cabal-3.8.1.0/build/Paths_huffman.dyn_hi new file mode 100644 index 0000000..a6c65f5 Binary files /dev/null and b/Aufgabe_6/code/.stack-work/dist/x86_64-linux/Cabal-3.8.1.0/build/Paths_huffman.dyn_hi differ diff --git a/Aufgabe_6/code/.stack-work/dist/x86_64-linux/Cabal-3.8.1.0/build/Paths_huffman.dyn_o b/Aufgabe_6/code/.stack-work/dist/x86_64-linux/Cabal-3.8.1.0/build/Paths_huffman.dyn_o new file mode 100644 index 0000000..bfd5106 Binary files /dev/null and b/Aufgabe_6/code/.stack-work/dist/x86_64-linux/Cabal-3.8.1.0/build/Paths_huffman.dyn_o differ diff --git a/Aufgabe_6/code/.stack-work/dist/x86_64-linux/Cabal-3.8.1.0/build/Paths_huffman.hi b/Aufgabe_6/code/.stack-work/dist/x86_64-linux/Cabal-3.8.1.0/build/Paths_huffman.hi new file mode 100644 index 0000000..cd7563b Binary files /dev/null and b/Aufgabe_6/code/.stack-work/dist/x86_64-linux/Cabal-3.8.1.0/build/Paths_huffman.hi differ diff --git a/Aufgabe_6/code/.stack-work/dist/x86_64-linux/Cabal-3.8.1.0/build/Paths_huffman.o b/Aufgabe_6/code/.stack-work/dist/x86_64-linux/Cabal-3.8.1.0/build/Paths_huffman.o new file mode 100644 index 0000000..a7ac3df Binary files /dev/null and b/Aufgabe_6/code/.stack-work/dist/x86_64-linux/Cabal-3.8.1.0/build/Paths_huffman.o differ diff --git a/Aufgabe_6/code/.stack-work/dist/x86_64-linux/Cabal-3.8.1.0/build/autogen/Paths_huffman.hs b/Aufgabe_6/code/.stack-work/dist/x86_64-linux/Cabal-3.8.1.0/build/autogen/Paths_huffman.hs new file mode 100644 index 0000000..3a0df0e --- /dev/null +++ b/Aufgabe_6/code/.stack-work/dist/x86_64-linux/Cabal-3.8.1.0/build/autogen/Paths_huffman.hs @@ -0,0 +1,74 @@ +{-# LANGUAGE CPP #-} +{-# LANGUAGE NoRebindableSyntax #-} +{-# OPTIONS_GHC -fno-warn-missing-import-lists #-} +{-# OPTIONS_GHC -w #-} +module Paths_huffman ( + 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] [] + +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 = "/home/student/Documents/Anwendungsentwicklung/Aufgabe_6/code/.stack-work/install/x86_64-linux/c95135353db856bc6efc9bd10e84b1a5a9a219f3607bca4f1889717059c848cc/9.4.7/bin" +libdir = "/home/student/Documents/Anwendungsentwicklung/Aufgabe_6/code/.stack-work/install/x86_64-linux/c95135353db856bc6efc9bd10e84b1a5a9a219f3607bca4f1889717059c848cc/9.4.7/lib/x86_64-linux-ghc-9.4.7/huffman-0.1-5hb8DvQH04kAhx22YvzXdK" +dynlibdir = "/home/student/Documents/Anwendungsentwicklung/Aufgabe_6/code/.stack-work/install/x86_64-linux/c95135353db856bc6efc9bd10e84b1a5a9a219f3607bca4f1889717059c848cc/9.4.7/lib/x86_64-linux-ghc-9.4.7" +datadir = "/home/student/Documents/Anwendungsentwicklung/Aufgabe_6/code/.stack-work/install/x86_64-linux/c95135353db856bc6efc9bd10e84b1a5a9a219f3607bca4f1889717059c848cc/9.4.7/share/x86_64-linux-ghc-9.4.7/huffman-0.1" +libexecdir = "/home/student/Documents/Anwendungsentwicklung/Aufgabe_6/code/.stack-work/install/x86_64-linux/c95135353db856bc6efc9bd10e84b1a5a9a219f3607bca4f1889717059c848cc/9.4.7/libexec/x86_64-linux-ghc-9.4.7/huffman-0.1" +sysconfdir = "/home/student/Documents/Anwendungsentwicklung/Aufgabe_6/code/.stack-work/install/x86_64-linux/c95135353db856bc6efc9bd10e84b1a5a9a219f3607bca4f1889717059c848cc/9.4.7/etc" + +getBinDir = catchIO (getEnv "huffman_bindir") (\_ -> return bindir) +getLibDir = catchIO (getEnv "huffman_libdir") (\_ -> return libdir) +getDynLibDir = catchIO (getEnv "huffman_dynlibdir") (\_ -> return dynlibdir) +getDataDir = catchIO (getEnv "huffman_datadir") (\_ -> return datadir) +getLibexecDir = catchIO (getEnv "huffman_libexecdir") (\_ -> return libexecdir) +getSysconfDir = catchIO (getEnv "huffman_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 == '/' diff --git a/Aufgabe_6/code/.stack-work/dist/x86_64-linux/Cabal-3.8.1.0/build/autogen/cabal_macros.h b/Aufgabe_6/code/.stack-work/dist/x86_64-linux/Cabal-3.8.1.0/build/autogen/cabal_macros.h new file mode 100644 index 0000000..84a9b45 --- /dev/null +++ b/Aufgabe_6/code/.stack-work/dist/x86_64-linux/Cabal-3.8.1.0/build/autogen/cabal_macros.h @@ -0,0 +1,183 @@ +/* DO NOT EDIT: This file is automatically generated by Cabal */ + +/* package huffman-0.1 */ +#ifndef VERSION_huffman +#define VERSION_huffman "0.1" +#endif /* VERSION_huffman */ +#ifndef MIN_VERSION_huffman +#define MIN_VERSION_huffman(major1,major2,minor) (\ + (major1) < 0 || \ + (major1) == 0 && (major2) < 1 || \ + (major1) == 0 && (major2) == 1 && (minor) <= 0) +#endif /* MIN_VERSION_huffman */ +/* package base-4.17.2.0 */ +#ifndef VERSION_base +#define VERSION_base "4.17.2.0" +#endif /* VERSION_base */ +#ifndef MIN_VERSION_base +#define MIN_VERSION_base(major1,major2,minor) (\ + (major1) < 4 || \ + (major1) == 4 && (major2) < 17 || \ + (major1) == 4 && (major2) == 17 && (minor) <= 2) +#endif /* MIN_VERSION_base */ +/* package binary-0.8.9.1 */ +#ifndef VERSION_binary +#define VERSION_binary "0.8.9.1" +#endif /* VERSION_binary */ +#ifndef MIN_VERSION_binary +#define MIN_VERSION_binary(major1,major2,minor) (\ + (major1) < 0 || \ + (major1) == 0 && (major2) < 8 || \ + (major1) == 0 && (major2) == 8 && (minor) <= 9) +#endif /* MIN_VERSION_binary */ +/* package bytestring-0.11.5.2 */ +#ifndef VERSION_bytestring +#define VERSION_bytestring "0.11.5.2" +#endif /* VERSION_bytestring */ +#ifndef MIN_VERSION_bytestring +#define MIN_VERSION_bytestring(major1,major2,minor) (\ + (major1) < 0 || \ + (major1) == 0 && (major2) < 11 || \ + (major1) == 0 && (major2) == 11 && (minor) <= 5) +#endif /* MIN_VERSION_bytestring */ +/* package containers-0.6.7 */ +#ifndef VERSION_containers +#define VERSION_containers "0.6.7" +#endif /* VERSION_containers */ +#ifndef MIN_VERSION_containers +#define MIN_VERSION_containers(major1,major2,minor) (\ + (major1) < 0 || \ + (major1) == 0 && (major2) < 6 || \ + (major1) == 0 && (major2) == 6 && (minor) <= 7) +#endif /* MIN_VERSION_containers */ +/* package filepath-1.4.2.2 */ +#ifndef VERSION_filepath +#define VERSION_filepath "1.4.2.2" +#endif /* VERSION_filepath */ +#ifndef MIN_VERSION_filepath +#define MIN_VERSION_filepath(major1,major2,minor) (\ + (major1) < 1 || \ + (major1) == 1 && (major2) < 4 || \ + (major1) == 1 && (major2) == 4 && (minor) <= 2) +#endif /* MIN_VERSION_filepath */ + +/* tool alex-3.2.5 */ +#ifndef TOOL_VERSION_alex +#define TOOL_VERSION_alex "3.2.5" +#endif /* TOOL_VERSION_alex */ +#ifndef MIN_TOOL_VERSION_alex +#define MIN_TOOL_VERSION_alex(major1,major2,minor) (\ + (major1) < 3 || \ + (major1) == 3 && (major2) < 2 || \ + (major1) == 3 && (major2) == 2 && (minor) <= 5) +#endif /* MIN_TOOL_VERSION_alex */ +/* tool gcc-11 */ +#ifndef TOOL_VERSION_gcc +#define TOOL_VERSION_gcc "11" +#endif /* TOOL_VERSION_gcc */ +#ifndef MIN_TOOL_VERSION_gcc +#define MIN_TOOL_VERSION_gcc(major1,major2,minor) (\ + (major1) < 11 || \ + (major1) == 11 && (major2) < 0 || \ + (major1) == 11 && (major2) == 0 && (minor) <= 0) +#endif /* MIN_TOOL_VERSION_gcc */ +/* tool ghc-9.4.7 */ +#ifndef TOOL_VERSION_ghc +#define TOOL_VERSION_ghc "9.4.7" +#endif /* TOOL_VERSION_ghc */ +#ifndef MIN_TOOL_VERSION_ghc +#define MIN_TOOL_VERSION_ghc(major1,major2,minor) (\ + (major1) < 9 || \ + (major1) == 9 && (major2) < 4 || \ + (major1) == 9 && (major2) == 4 && (minor) <= 7) +#endif /* MIN_TOOL_VERSION_ghc */ +/* tool ghc-pkg-9.4.7 */ +#ifndef TOOL_VERSION_ghc_pkg +#define TOOL_VERSION_ghc_pkg "9.4.7" +#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) < 4 || \ + (major1) == 9 && (major2) == 4 && (minor) <= 7) +#endif /* MIN_TOOL_VERSION_ghc_pkg */ +/* tool haddock-2.27.0 */ +#ifndef TOOL_VERSION_haddock +#define TOOL_VERSION_haddock "2.27.0" +#endif /* TOOL_VERSION_haddock */ +#ifndef MIN_TOOL_VERSION_haddock +#define MIN_TOOL_VERSION_haddock(major1,major2,minor) (\ + (major1) < 2 || \ + (major1) == 2 && (major2) < 27 || \ + (major1) == 2 && (major2) == 27 && (minor) <= 0) +#endif /* MIN_TOOL_VERSION_haddock */ +/* tool happy-1.19.12 */ +#ifndef TOOL_VERSION_happy +#define TOOL_VERSION_happy "1.19.12" +#endif /* TOOL_VERSION_happy */ +#ifndef MIN_TOOL_VERSION_happy +#define MIN_TOOL_VERSION_happy(major1,major2,minor) (\ + (major1) < 1 || \ + (major1) == 1 && (major2) < 19 || \ + (major1) == 1 && (major2) == 19 && (minor) <= 12) +#endif /* MIN_TOOL_VERSION_happy */ +/* 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 hscolour-1.24 */ +#ifndef TOOL_VERSION_hscolour +#define TOOL_VERSION_hscolour "1.24" +#endif /* TOOL_VERSION_hscolour */ +#ifndef MIN_TOOL_VERSION_hscolour +#define MIN_TOOL_VERSION_hscolour(major1,major2,minor) (\ + (major1) < 1 || \ + (major1) == 1 && (major2) < 24 || \ + (major1) == 1 && (major2) == 24 && (minor) <= 0) +#endif /* MIN_TOOL_VERSION_hscolour */ +/* tool runghc-9.4.7 */ +#ifndef TOOL_VERSION_runghc +#define TOOL_VERSION_runghc "9.4.7" +#endif /* TOOL_VERSION_runghc */ +#ifndef MIN_TOOL_VERSION_runghc +#define MIN_TOOL_VERSION_runghc(major1,major2,minor) (\ + (major1) < 9 || \ + (major1) == 9 && (major2) < 4 || \ + (major1) == 9 && (major2) == 4 && (minor) <= 7) +#endif /* MIN_TOOL_VERSION_runghc */ +/* tool strip-2.38 */ +#ifndef TOOL_VERSION_strip +#define TOOL_VERSION_strip "2.38" +#endif /* TOOL_VERSION_strip */ +#ifndef MIN_TOOL_VERSION_strip +#define MIN_TOOL_VERSION_strip(major1,major2,minor) (\ + (major1) < 2 || \ + (major1) == 2 && (major2) < 38 || \ + (major1) == 2 && (major2) == 38 && (minor) <= 0) +#endif /* MIN_TOOL_VERSION_strip */ + +#ifndef CURRENT_PACKAGE_KEY +#define CURRENT_PACKAGE_KEY "huffman-0.1-5hb8DvQH04kAhx22YvzXdK" +#endif /* CURRENT_packageKey */ +#ifndef CURRENT_COMPONENT_ID +#define CURRENT_COMPONENT_ID "huffman-0.1-5hb8DvQH04kAhx22YvzXdK" +#endif /* CURRENT_COMPONENT_ID */ +#ifndef CURRENT_PACKAGE_VERSION +#define CURRENT_PACKAGE_VERSION "0.1" +#endif /* CURRENT_PACKAGE_VERSION */ diff --git a/Aufgabe_6/code/.stack-work/dist/x86_64-linux/Cabal-3.8.1.0/build/huffman-exe/autogen/Paths_huffman.hs b/Aufgabe_6/code/.stack-work/dist/x86_64-linux/Cabal-3.8.1.0/build/huffman-exe/autogen/Paths_huffman.hs new file mode 100644 index 0000000..ec226e5 --- /dev/null +++ b/Aufgabe_6/code/.stack-work/dist/x86_64-linux/Cabal-3.8.1.0/build/huffman-exe/autogen/Paths_huffman.hs @@ -0,0 +1,74 @@ +{-# LANGUAGE CPP #-} +{-# LANGUAGE NoRebindableSyntax #-} +{-# OPTIONS_GHC -fno-warn-missing-import-lists #-} +{-# OPTIONS_GHC -w #-} +module Paths_huffman ( + 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] [] + +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 = "/home/student/Documents/Anwendungsentwicklung/Aufgabe_6/code/.stack-work/install/x86_64-linux/c95135353db856bc6efc9bd10e84b1a5a9a219f3607bca4f1889717059c848cc/9.4.7/bin" +libdir = "/home/student/Documents/Anwendungsentwicklung/Aufgabe_6/code/.stack-work/install/x86_64-linux/c95135353db856bc6efc9bd10e84b1a5a9a219f3607bca4f1889717059c848cc/9.4.7/lib/x86_64-linux-ghc-9.4.7/huffman-0.1-7oGsPwnMV4MIdxe92R26Zp-huffman-exe" +dynlibdir = "/home/student/Documents/Anwendungsentwicklung/Aufgabe_6/code/.stack-work/install/x86_64-linux/c95135353db856bc6efc9bd10e84b1a5a9a219f3607bca4f1889717059c848cc/9.4.7/lib/x86_64-linux-ghc-9.4.7" +datadir = "/home/student/Documents/Anwendungsentwicklung/Aufgabe_6/code/.stack-work/install/x86_64-linux/c95135353db856bc6efc9bd10e84b1a5a9a219f3607bca4f1889717059c848cc/9.4.7/share/x86_64-linux-ghc-9.4.7/huffman-0.1" +libexecdir = "/home/student/Documents/Anwendungsentwicklung/Aufgabe_6/code/.stack-work/install/x86_64-linux/c95135353db856bc6efc9bd10e84b1a5a9a219f3607bca4f1889717059c848cc/9.4.7/libexec/x86_64-linux-ghc-9.4.7/huffman-0.1" +sysconfdir = "/home/student/Documents/Anwendungsentwicklung/Aufgabe_6/code/.stack-work/install/x86_64-linux/c95135353db856bc6efc9bd10e84b1a5a9a219f3607bca4f1889717059c848cc/9.4.7/etc" + +getBinDir = catchIO (getEnv "huffman_bindir") (\_ -> return bindir) +getLibDir = catchIO (getEnv "huffman_libdir") (\_ -> return libdir) +getDynLibDir = catchIO (getEnv "huffman_dynlibdir") (\_ -> return dynlibdir) +getDataDir = catchIO (getEnv "huffman_datadir") (\_ -> return datadir) +getLibexecDir = catchIO (getEnv "huffman_libexecdir") (\_ -> return libexecdir) +getSysconfDir = catchIO (getEnv "huffman_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 == '/' diff --git a/Aufgabe_6/code/.stack-work/dist/x86_64-linux/Cabal-3.8.1.0/build/huffman-exe/autogen/cabal_macros.h b/Aufgabe_6/code/.stack-work/dist/x86_64-linux/Cabal-3.8.1.0/build/huffman-exe/autogen/cabal_macros.h new file mode 100644 index 0000000..ab0f44d --- /dev/null +++ b/Aufgabe_6/code/.stack-work/dist/x86_64-linux/Cabal-3.8.1.0/build/huffman-exe/autogen/cabal_macros.h @@ -0,0 +1,150 @@ +/* DO NOT EDIT: This file is automatically generated by Cabal */ + +/* package huffman-0.1 */ +#ifndef VERSION_huffman +#define VERSION_huffman "0.1" +#endif /* VERSION_huffman */ +#ifndef MIN_VERSION_huffman +#define MIN_VERSION_huffman(major1,major2,minor) (\ + (major1) < 0 || \ + (major1) == 0 && (major2) < 1 || \ + (major1) == 0 && (major2) == 1 && (minor) <= 0) +#endif /* MIN_VERSION_huffman */ +/* package base-4.17.2.0 */ +#ifndef VERSION_base +#define VERSION_base "4.17.2.0" +#endif /* VERSION_base */ +#ifndef MIN_VERSION_base +#define MIN_VERSION_base(major1,major2,minor) (\ + (major1) < 4 || \ + (major1) == 4 && (major2) < 17 || \ + (major1) == 4 && (major2) == 17 && (minor) <= 2) +#endif /* MIN_VERSION_base */ +/* package huffman-0.1 */ +#ifndef VERSION_huffman +#define VERSION_huffman "0.1" +#endif /* VERSION_huffman */ +#ifndef MIN_VERSION_huffman +#define MIN_VERSION_huffman(major1,major2,minor) (\ + (major1) < 0 || \ + (major1) == 0 && (major2) < 1 || \ + (major1) == 0 && (major2) == 1 && (minor) <= 0) +#endif /* MIN_VERSION_huffman */ + +/* tool alex-3.2.5 */ +#ifndef TOOL_VERSION_alex +#define TOOL_VERSION_alex "3.2.5" +#endif /* TOOL_VERSION_alex */ +#ifndef MIN_TOOL_VERSION_alex +#define MIN_TOOL_VERSION_alex(major1,major2,minor) (\ + (major1) < 3 || \ + (major1) == 3 && (major2) < 2 || \ + (major1) == 3 && (major2) == 2 && (minor) <= 5) +#endif /* MIN_TOOL_VERSION_alex */ +/* tool gcc-11 */ +#ifndef TOOL_VERSION_gcc +#define TOOL_VERSION_gcc "11" +#endif /* TOOL_VERSION_gcc */ +#ifndef MIN_TOOL_VERSION_gcc +#define MIN_TOOL_VERSION_gcc(major1,major2,minor) (\ + (major1) < 11 || \ + (major1) == 11 && (major2) < 0 || \ + (major1) == 11 && (major2) == 0 && (minor) <= 0) +#endif /* MIN_TOOL_VERSION_gcc */ +/* tool ghc-9.4.7 */ +#ifndef TOOL_VERSION_ghc +#define TOOL_VERSION_ghc "9.4.7" +#endif /* TOOL_VERSION_ghc */ +#ifndef MIN_TOOL_VERSION_ghc +#define MIN_TOOL_VERSION_ghc(major1,major2,minor) (\ + (major1) < 9 || \ + (major1) == 9 && (major2) < 4 || \ + (major1) == 9 && (major2) == 4 && (minor) <= 7) +#endif /* MIN_TOOL_VERSION_ghc */ +/* tool ghc-pkg-9.4.7 */ +#ifndef TOOL_VERSION_ghc_pkg +#define TOOL_VERSION_ghc_pkg "9.4.7" +#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) < 4 || \ + (major1) == 9 && (major2) == 4 && (minor) <= 7) +#endif /* MIN_TOOL_VERSION_ghc_pkg */ +/* tool haddock-2.27.0 */ +#ifndef TOOL_VERSION_haddock +#define TOOL_VERSION_haddock "2.27.0" +#endif /* TOOL_VERSION_haddock */ +#ifndef MIN_TOOL_VERSION_haddock +#define MIN_TOOL_VERSION_haddock(major1,major2,minor) (\ + (major1) < 2 || \ + (major1) == 2 && (major2) < 27 || \ + (major1) == 2 && (major2) == 27 && (minor) <= 0) +#endif /* MIN_TOOL_VERSION_haddock */ +/* tool happy-1.19.12 */ +#ifndef TOOL_VERSION_happy +#define TOOL_VERSION_happy "1.19.12" +#endif /* TOOL_VERSION_happy */ +#ifndef MIN_TOOL_VERSION_happy +#define MIN_TOOL_VERSION_happy(major1,major2,minor) (\ + (major1) < 1 || \ + (major1) == 1 && (major2) < 19 || \ + (major1) == 1 && (major2) == 19 && (minor) <= 12) +#endif /* MIN_TOOL_VERSION_happy */ +/* 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 hscolour-1.24 */ +#ifndef TOOL_VERSION_hscolour +#define TOOL_VERSION_hscolour "1.24" +#endif /* TOOL_VERSION_hscolour */ +#ifndef MIN_TOOL_VERSION_hscolour +#define MIN_TOOL_VERSION_hscolour(major1,major2,minor) (\ + (major1) < 1 || \ + (major1) == 1 && (major2) < 24 || \ + (major1) == 1 && (major2) == 24 && (minor) <= 0) +#endif /* MIN_TOOL_VERSION_hscolour */ +/* tool runghc-9.4.7 */ +#ifndef TOOL_VERSION_runghc +#define TOOL_VERSION_runghc "9.4.7" +#endif /* TOOL_VERSION_runghc */ +#ifndef MIN_TOOL_VERSION_runghc +#define MIN_TOOL_VERSION_runghc(major1,major2,minor) (\ + (major1) < 9 || \ + (major1) == 9 && (major2) < 4 || \ + (major1) == 9 && (major2) == 4 && (minor) <= 7) +#endif /* MIN_TOOL_VERSION_runghc */ +/* tool strip-2.38 */ +#ifndef TOOL_VERSION_strip +#define TOOL_VERSION_strip "2.38" +#endif /* TOOL_VERSION_strip */ +#ifndef MIN_TOOL_VERSION_strip +#define MIN_TOOL_VERSION_strip(major1,major2,minor) (\ + (major1) < 2 || \ + (major1) == 2 && (major2) < 38 || \ + (major1) == 2 && (major2) == 38 && (minor) <= 0) +#endif /* MIN_TOOL_VERSION_strip */ + +#ifndef CURRENT_COMPONENT_ID +#define CURRENT_COMPONENT_ID "huffman-0.1-7oGsPwnMV4MIdxe92R26Zp-huffman-exe" +#endif /* CURRENT_COMPONENT_ID */ +#ifndef CURRENT_PACKAGE_VERSION +#define CURRENT_PACKAGE_VERSION "0.1" +#endif /* CURRENT_PACKAGE_VERSION */ diff --git a/Aufgabe_6/code/.stack-work/dist/x86_64-linux/Cabal-3.8.1.0/build/huffman-exe/huffman-exe b/Aufgabe_6/code/.stack-work/dist/x86_64-linux/Cabal-3.8.1.0/build/huffman-exe/huffman-exe new file mode 100755 index 0000000..6048212 Binary files /dev/null and b/Aufgabe_6/code/.stack-work/dist/x86_64-linux/Cabal-3.8.1.0/build/huffman-exe/huffman-exe differ diff --git a/Aufgabe_6/code/.stack-work/dist/x86_64-linux/Cabal-3.8.1.0/build/huffman-exe/huffman-exe-tmp/Main.hi b/Aufgabe_6/code/.stack-work/dist/x86_64-linux/Cabal-3.8.1.0/build/huffman-exe/huffman-exe-tmp/Main.hi new file mode 100644 index 0000000..a092b0c Binary files /dev/null and b/Aufgabe_6/code/.stack-work/dist/x86_64-linux/Cabal-3.8.1.0/build/huffman-exe/huffman-exe-tmp/Main.hi differ diff --git a/Aufgabe_6/code/.stack-work/dist/x86_64-linux/Cabal-3.8.1.0/build/huffman-exe/huffman-exe-tmp/Main.o b/Aufgabe_6/code/.stack-work/dist/x86_64-linux/Cabal-3.8.1.0/build/huffman-exe/huffman-exe-tmp/Main.o new file mode 100644 index 0000000..bb568c2 Binary files /dev/null and b/Aufgabe_6/code/.stack-work/dist/x86_64-linux/Cabal-3.8.1.0/build/huffman-exe/huffman-exe-tmp/Main.o differ diff --git a/Aufgabe_6/code/.stack-work/dist/x86_64-linux/Cabal-3.8.1.0/build/huffman-exe/huffman-exe-tmp/Paths_huffman.hi b/Aufgabe_6/code/.stack-work/dist/x86_64-linux/Cabal-3.8.1.0/build/huffman-exe/huffman-exe-tmp/Paths_huffman.hi new file mode 100644 index 0000000..f245429 Binary files /dev/null and b/Aufgabe_6/code/.stack-work/dist/x86_64-linux/Cabal-3.8.1.0/build/huffman-exe/huffman-exe-tmp/Paths_huffman.hi differ diff --git a/Aufgabe_6/code/.stack-work/dist/x86_64-linux/Cabal-3.8.1.0/build/huffman-exe/huffman-exe-tmp/Paths_huffman.o b/Aufgabe_6/code/.stack-work/dist/x86_64-linux/Cabal-3.8.1.0/build/huffman-exe/huffman-exe-tmp/Paths_huffman.o new file mode 100644 index 0000000..d2a0b70 Binary files /dev/null and b/Aufgabe_6/code/.stack-work/dist/x86_64-linux/Cabal-3.8.1.0/build/huffman-exe/huffman-exe-tmp/Paths_huffman.o differ diff --git a/Aufgabe_6/code/.stack-work/dist/x86_64-linux/Cabal-3.8.1.0/build/libHShuffman-0.1-FYSjga9JLF2kZjOZ6zeLt-ghc9.4.7.so b/Aufgabe_6/code/.stack-work/dist/x86_64-linux/Cabal-3.8.1.0/build/libHShuffman-0.1-FYSjga9JLF2kZjOZ6zeLt-ghc9.4.7.so new file mode 100755 index 0000000..9ee6073 Binary files /dev/null and b/Aufgabe_6/code/.stack-work/dist/x86_64-linux/Cabal-3.8.1.0/build/libHShuffman-0.1-FYSjga9JLF2kZjOZ6zeLt-ghc9.4.7.so differ diff --git a/Aufgabe_6/code/.stack-work/dist/x86_64-linux/Cabal-3.8.1.0/build/libHShuffman-0.1-FYSjga9JLF2kZjOZ6zeLt.a b/Aufgabe_6/code/.stack-work/dist/x86_64-linux/Cabal-3.8.1.0/build/libHShuffman-0.1-FYSjga9JLF2kZjOZ6zeLt.a new file mode 100644 index 0000000..7fed5a8 Binary files /dev/null and b/Aufgabe_6/code/.stack-work/dist/x86_64-linux/Cabal-3.8.1.0/build/libHShuffman-0.1-FYSjga9JLF2kZjOZ6zeLt.a differ diff --git a/Aufgabe_6/code/.stack-work/dist/x86_64-linux/Cabal-3.8.1.0/build/unit-tests/autogen/Paths_huffman.hs b/Aufgabe_6/code/.stack-work/dist/x86_64-linux/Cabal-3.8.1.0/build/unit-tests/autogen/Paths_huffman.hs new file mode 100644 index 0000000..5871014 --- /dev/null +++ b/Aufgabe_6/code/.stack-work/dist/x86_64-linux/Cabal-3.8.1.0/build/unit-tests/autogen/Paths_huffman.hs @@ -0,0 +1,74 @@ +{-# LANGUAGE CPP #-} +{-# LANGUAGE NoRebindableSyntax #-} +{-# OPTIONS_GHC -fno-warn-missing-import-lists #-} +{-# OPTIONS_GHC -w #-} +module Paths_huffman ( + 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] [] + +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 = "/home/student/Documents/Anwendungsentwicklung/Aufgabe_6/code/.stack-work/install/x86_64-linux/c95135353db856bc6efc9bd10e84b1a5a9a219f3607bca4f1889717059c848cc/9.4.7/bin" +libdir = "/home/student/Documents/Anwendungsentwicklung/Aufgabe_6/code/.stack-work/install/x86_64-linux/c95135353db856bc6efc9bd10e84b1a5a9a219f3607bca4f1889717059c848cc/9.4.7/lib/x86_64-linux-ghc-9.4.7/huffman-0.1-7He5PbLnsBEFUTWGgrF0f-unit-tests" +dynlibdir = "/home/student/Documents/Anwendungsentwicklung/Aufgabe_6/code/.stack-work/install/x86_64-linux/c95135353db856bc6efc9bd10e84b1a5a9a219f3607bca4f1889717059c848cc/9.4.7/lib/x86_64-linux-ghc-9.4.7" +datadir = "/home/student/Documents/Anwendungsentwicklung/Aufgabe_6/code/.stack-work/install/x86_64-linux/c95135353db856bc6efc9bd10e84b1a5a9a219f3607bca4f1889717059c848cc/9.4.7/share/x86_64-linux-ghc-9.4.7/huffman-0.1" +libexecdir = "/home/student/Documents/Anwendungsentwicklung/Aufgabe_6/code/.stack-work/install/x86_64-linux/c95135353db856bc6efc9bd10e84b1a5a9a219f3607bca4f1889717059c848cc/9.4.7/libexec/x86_64-linux-ghc-9.4.7/huffman-0.1" +sysconfdir = "/home/student/Documents/Anwendungsentwicklung/Aufgabe_6/code/.stack-work/install/x86_64-linux/c95135353db856bc6efc9bd10e84b1a5a9a219f3607bca4f1889717059c848cc/9.4.7/etc" + +getBinDir = catchIO (getEnv "huffman_bindir") (\_ -> return bindir) +getLibDir = catchIO (getEnv "huffman_libdir") (\_ -> return libdir) +getDynLibDir = catchIO (getEnv "huffman_dynlibdir") (\_ -> return dynlibdir) +getDataDir = catchIO (getEnv "huffman_datadir") (\_ -> return datadir) +getLibexecDir = catchIO (getEnv "huffman_libexecdir") (\_ -> return libexecdir) +getSysconfDir = catchIO (getEnv "huffman_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 == '/' diff --git a/Aufgabe_6/code/.stack-work/dist/x86_64-linux/Cabal-3.8.1.0/build/unit-tests/autogen/cabal_macros.h b/Aufgabe_6/code/.stack-work/dist/x86_64-linux/Cabal-3.8.1.0/build/unit-tests/autogen/cabal_macros.h new file mode 100644 index 0000000..ef3f143 --- /dev/null +++ b/Aufgabe_6/code/.stack-work/dist/x86_64-linux/Cabal-3.8.1.0/build/unit-tests/autogen/cabal_macros.h @@ -0,0 +1,170 @@ +/* DO NOT EDIT: This file is automatically generated by Cabal */ + +/* package huffman-0.1 */ +#ifndef VERSION_huffman +#define VERSION_huffman "0.1" +#endif /* VERSION_huffman */ +#ifndef MIN_VERSION_huffman +#define MIN_VERSION_huffman(major1,major2,minor) (\ + (major1) < 0 || \ + (major1) == 0 && (major2) < 1 || \ + (major1) == 0 && (major2) == 1 && (minor) <= 0) +#endif /* MIN_VERSION_huffman */ +/* package HUnit-1.6.2.0 */ +#ifndef VERSION_HUnit +#define VERSION_HUnit "1.6.2.0" +#endif /* VERSION_HUnit */ +#ifndef MIN_VERSION_HUnit +#define MIN_VERSION_HUnit(major1,major2,minor) (\ + (major1) < 1 || \ + (major1) == 1 && (major2) < 6 || \ + (major1) == 1 && (major2) == 6 && (minor) <= 2) +#endif /* MIN_VERSION_HUnit */ +/* package base-4.17.2.0 */ +#ifndef VERSION_base +#define VERSION_base "4.17.2.0" +#endif /* VERSION_base */ +#ifndef MIN_VERSION_base +#define MIN_VERSION_base(major1,major2,minor) (\ + (major1) < 4 || \ + (major1) == 4 && (major2) < 17 || \ + (major1) == 4 && (major2) == 17 && (minor) <= 2) +#endif /* MIN_VERSION_base */ +/* package containers-0.6.7 */ +#ifndef VERSION_containers +#define VERSION_containers "0.6.7" +#endif /* VERSION_containers */ +#ifndef MIN_VERSION_containers +#define MIN_VERSION_containers(major1,major2,minor) (\ + (major1) < 0 || \ + (major1) == 0 && (major2) < 6 || \ + (major1) == 0 && (major2) == 6 && (minor) <= 7) +#endif /* MIN_VERSION_containers */ +/* package huffman-0.1 */ +#ifndef VERSION_huffman +#define VERSION_huffman "0.1" +#endif /* VERSION_huffman */ +#ifndef MIN_VERSION_huffman +#define MIN_VERSION_huffman(major1,major2,minor) (\ + (major1) < 0 || \ + (major1) == 0 && (major2) < 1 || \ + (major1) == 0 && (major2) == 1 && (minor) <= 0) +#endif /* MIN_VERSION_huffman */ + +/* tool alex-3.2.5 */ +#ifndef TOOL_VERSION_alex +#define TOOL_VERSION_alex "3.2.5" +#endif /* TOOL_VERSION_alex */ +#ifndef MIN_TOOL_VERSION_alex +#define MIN_TOOL_VERSION_alex(major1,major2,minor) (\ + (major1) < 3 || \ + (major1) == 3 && (major2) < 2 || \ + (major1) == 3 && (major2) == 2 && (minor) <= 5) +#endif /* MIN_TOOL_VERSION_alex */ +/* tool gcc-11 */ +#ifndef TOOL_VERSION_gcc +#define TOOL_VERSION_gcc "11" +#endif /* TOOL_VERSION_gcc */ +#ifndef MIN_TOOL_VERSION_gcc +#define MIN_TOOL_VERSION_gcc(major1,major2,minor) (\ + (major1) < 11 || \ + (major1) == 11 && (major2) < 0 || \ + (major1) == 11 && (major2) == 0 && (minor) <= 0) +#endif /* MIN_TOOL_VERSION_gcc */ +/* tool ghc-9.4.7 */ +#ifndef TOOL_VERSION_ghc +#define TOOL_VERSION_ghc "9.4.7" +#endif /* TOOL_VERSION_ghc */ +#ifndef MIN_TOOL_VERSION_ghc +#define MIN_TOOL_VERSION_ghc(major1,major2,minor) (\ + (major1) < 9 || \ + (major1) == 9 && (major2) < 4 || \ + (major1) == 9 && (major2) == 4 && (minor) <= 7) +#endif /* MIN_TOOL_VERSION_ghc */ +/* tool ghc-pkg-9.4.7 */ +#ifndef TOOL_VERSION_ghc_pkg +#define TOOL_VERSION_ghc_pkg "9.4.7" +#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) < 4 || \ + (major1) == 9 && (major2) == 4 && (minor) <= 7) +#endif /* MIN_TOOL_VERSION_ghc_pkg */ +/* tool haddock-2.27.0 */ +#ifndef TOOL_VERSION_haddock +#define TOOL_VERSION_haddock "2.27.0" +#endif /* TOOL_VERSION_haddock */ +#ifndef MIN_TOOL_VERSION_haddock +#define MIN_TOOL_VERSION_haddock(major1,major2,minor) (\ + (major1) < 2 || \ + (major1) == 2 && (major2) < 27 || \ + (major1) == 2 && (major2) == 27 && (minor) <= 0) +#endif /* MIN_TOOL_VERSION_haddock */ +/* tool happy-1.19.12 */ +#ifndef TOOL_VERSION_happy +#define TOOL_VERSION_happy "1.19.12" +#endif /* TOOL_VERSION_happy */ +#ifndef MIN_TOOL_VERSION_happy +#define MIN_TOOL_VERSION_happy(major1,major2,minor) (\ + (major1) < 1 || \ + (major1) == 1 && (major2) < 19 || \ + (major1) == 1 && (major2) == 19 && (minor) <= 12) +#endif /* MIN_TOOL_VERSION_happy */ +/* 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 hscolour-1.24 */ +#ifndef TOOL_VERSION_hscolour +#define TOOL_VERSION_hscolour "1.24" +#endif /* TOOL_VERSION_hscolour */ +#ifndef MIN_TOOL_VERSION_hscolour +#define MIN_TOOL_VERSION_hscolour(major1,major2,minor) (\ + (major1) < 1 || \ + (major1) == 1 && (major2) < 24 || \ + (major1) == 1 && (major2) == 24 && (minor) <= 0) +#endif /* MIN_TOOL_VERSION_hscolour */ +/* tool runghc-9.4.7 */ +#ifndef TOOL_VERSION_runghc +#define TOOL_VERSION_runghc "9.4.7" +#endif /* TOOL_VERSION_runghc */ +#ifndef MIN_TOOL_VERSION_runghc +#define MIN_TOOL_VERSION_runghc(major1,major2,minor) (\ + (major1) < 9 || \ + (major1) == 9 && (major2) < 4 || \ + (major1) == 9 && (major2) == 4 && (minor) <= 7) +#endif /* MIN_TOOL_VERSION_runghc */ +/* tool strip-2.38 */ +#ifndef TOOL_VERSION_strip +#define TOOL_VERSION_strip "2.38" +#endif /* TOOL_VERSION_strip */ +#ifndef MIN_TOOL_VERSION_strip +#define MIN_TOOL_VERSION_strip(major1,major2,minor) (\ + (major1) < 2 || \ + (major1) == 2 && (major2) < 38 || \ + (major1) == 2 && (major2) == 38 && (minor) <= 0) +#endif /* MIN_TOOL_VERSION_strip */ + +#ifndef CURRENT_COMPONENT_ID +#define CURRENT_COMPONENT_ID "huffman-0.1-7He5PbLnsBEFUTWGgrF0f-unit-tests" +#endif /* CURRENT_COMPONENT_ID */ +#ifndef CURRENT_PACKAGE_VERSION +#define CURRENT_PACKAGE_VERSION "0.1" +#endif /* CURRENT_PACKAGE_VERSION */ diff --git a/Aufgabe_6/code/.stack-work/dist/x86_64-linux/Cabal-3.8.1.0/build/unit-tests/unit-tests b/Aufgabe_6/code/.stack-work/dist/x86_64-linux/Cabal-3.8.1.0/build/unit-tests/unit-tests new file mode 100755 index 0000000..761e1b2 Binary files /dev/null and b/Aufgabe_6/code/.stack-work/dist/x86_64-linux/Cabal-3.8.1.0/build/unit-tests/unit-tests differ diff --git a/Aufgabe_6/code/.stack-work/dist/x86_64-linux/Cabal-3.8.1.0/build/unit-tests/unit-tests-tmp/Main.hi b/Aufgabe_6/code/.stack-work/dist/x86_64-linux/Cabal-3.8.1.0/build/unit-tests/unit-tests-tmp/Main.hi new file mode 100644 index 0000000..2d7dcc7 Binary files /dev/null and b/Aufgabe_6/code/.stack-work/dist/x86_64-linux/Cabal-3.8.1.0/build/unit-tests/unit-tests-tmp/Main.hi differ diff --git a/Aufgabe_6/code/.stack-work/dist/x86_64-linux/Cabal-3.8.1.0/build/unit-tests/unit-tests-tmp/Main.o b/Aufgabe_6/code/.stack-work/dist/x86_64-linux/Cabal-3.8.1.0/build/unit-tests/unit-tests-tmp/Main.o new file mode 100644 index 0000000..8fea1db Binary files /dev/null and b/Aufgabe_6/code/.stack-work/dist/x86_64-linux/Cabal-3.8.1.0/build/unit-tests/unit-tests-tmp/Main.o differ diff --git a/Aufgabe_6/code/.stack-work/dist/x86_64-linux/Cabal-3.8.1.0/build/unit-tests/unit-tests-tmp/Paths_huffman.hi b/Aufgabe_6/code/.stack-work/dist/x86_64-linux/Cabal-3.8.1.0/build/unit-tests/unit-tests-tmp/Paths_huffman.hi new file mode 100644 index 0000000..32658f8 Binary files /dev/null and b/Aufgabe_6/code/.stack-work/dist/x86_64-linux/Cabal-3.8.1.0/build/unit-tests/unit-tests-tmp/Paths_huffman.hi differ diff --git a/Aufgabe_6/code/.stack-work/dist/x86_64-linux/Cabal-3.8.1.0/build/unit-tests/unit-tests-tmp/Paths_huffman.o b/Aufgabe_6/code/.stack-work/dist/x86_64-linux/Cabal-3.8.1.0/build/unit-tests/unit-tests-tmp/Paths_huffman.o new file mode 100644 index 0000000..4251788 Binary files /dev/null and b/Aufgabe_6/code/.stack-work/dist/x86_64-linux/Cabal-3.8.1.0/build/unit-tests/unit-tests-tmp/Paths_huffman.o differ diff --git a/Aufgabe_6/code/.stack-work/dist/x86_64-linux/Cabal-3.8.1.0/package.conf.inplace/huffman-0.1-FYSjga9JLF2kZjOZ6zeLt.conf b/Aufgabe_6/code/.stack-work/dist/x86_64-linux/Cabal-3.8.1.0/package.conf.inplace/huffman-0.1-FYSjga9JLF2kZjOZ6zeLt.conf new file mode 100644 index 0000000..04909a4 --- /dev/null +++ b/Aufgabe_6/code/.stack-work/dist/x86_64-linux/Cabal-3.8.1.0/package.conf.inplace/huffman-0.1-FYSjga9JLF2kZjOZ6zeLt.conf @@ -0,0 +1,36 @@ +name: huffman +version: 0.1 +visibility: public +id: huffman-0.1-FYSjga9JLF2kZjOZ6zeLt +key: huffman-0.1-FYSjga9JLF2kZjOZ6zeLt +license: BSD-3-Clause +synopsis: huffman +abi: inplace +exposed: True +exposed-modules: Auxiliaries Huffman +hidden-modules: Paths_huffman +import-dirs: + /home/student/Documents/Anwendungsentwicklung/Aufgabe_6/code/.stack-work/dist/x86_64-linux/Cabal-3.8.1.0/build + +library-dirs: + /home/student/Documents/Anwendungsentwicklung/Aufgabe_6/code/.stack-work/dist/x86_64-linux/Cabal-3.8.1.0/build + +library-dirs-static: + /home/student/Documents/Anwendungsentwicklung/Aufgabe_6/code/.stack-work/dist/x86_64-linux/Cabal-3.8.1.0/build + +dynamic-library-dirs: + /home/student/Documents/Anwendungsentwicklung/Aufgabe_6/code/.stack-work/dist/x86_64-linux/Cabal-3.8.1.0/build + +data-dir: + /home/student/Documents/Anwendungsentwicklung/Aufgabe_6/code/. + +hs-libraries: HShuffman-0.1-FYSjga9JLF2kZjOZ6zeLt +depends: + base-4.17.2.0 binary-0.8.9.1 bytestring-0.11.5.2 containers-0.6.7 + filepath-1.4.2.2 + +haddock-interfaces: + /home/student/Documents/Anwendungsentwicklung/Aufgabe_6/code/.stack-work/dist/x86_64-linux/Cabal-3.8.1.0/doc/html/huffman/huffman.haddock + +haddock-html: + /home/student/Documents/Anwendungsentwicklung/Aufgabe_6/code/.stack-work/dist/x86_64-linux/Cabal-3.8.1.0/doc/html/huffman diff --git a/Aufgabe_6/code/.stack-work/dist/x86_64-linux/Cabal-3.8.1.0/package.conf.inplace/package.cache b/Aufgabe_6/code/.stack-work/dist/x86_64-linux/Cabal-3.8.1.0/package.conf.inplace/package.cache new file mode 100644 index 0000000..15974d8 Binary files /dev/null and b/Aufgabe_6/code/.stack-work/dist/x86_64-linux/Cabal-3.8.1.0/package.conf.inplace/package.cache differ diff --git a/Aufgabe_6/code/.stack-work/dist/x86_64-linux/Cabal-3.8.1.0/package.conf.inplace/package.cache.lock b/Aufgabe_6/code/.stack-work/dist/x86_64-linux/Cabal-3.8.1.0/package.conf.inplace/package.cache.lock new file mode 100644 index 0000000..e69de29 diff --git a/Aufgabe_6/code/.stack-work/dist/x86_64-linux/Cabal-3.8.1.0/setup-config b/Aufgabe_6/code/.stack-work/dist/x86_64-linux/Cabal-3.8.1.0/setup-config new file mode 100644 index 0000000..b13bfd9 Binary files /dev/null and b/Aufgabe_6/code/.stack-work/dist/x86_64-linux/Cabal-3.8.1.0/setup-config differ diff --git a/Aufgabe_6/code/.stack-work/dist/x86_64-linux/Cabal-3.8.1.0/stack-build-caches/c95135353db856bc6efc9bd10e84b1a5a9a219f3607bca4f1889717059c848cc/exe-huffman-exe b/Aufgabe_6/code/.stack-work/dist/x86_64-linux/Cabal-3.8.1.0/stack-build-caches/c95135353db856bc6efc9bd10e84b1a5a9a219f3607bca4f1889717059c848cc/exe-huffman-exe new file mode 100644 index 0000000..a5b9c77 --- /dev/null +++ b/Aufgabe_6/code/.stack-work/dist/x86_64-linux/Cabal-3.8.1.0/stack-build-caches/c95135353db856bc6efc9bd10e84b1a5a9a219f3607bca4f1889717059c848cc/exe-huffman-exe @@ -0,0 +1,14 @@ +/home/student/.ghcup/ghc/9.4.7/lib/ghc-9.4.7/lib/x86_64-linux-ghc-9.4.7/rts-1.0.2/include/ghcversion.h: + hash: ee548d48ca5c94d7c7fab127ec07be47b01afa24d6495358aa9ff6cfc8541c81 +? /home/student/Documents/Anwendungsentwicklung/Aufgabe_6/code/.stack-work/dist/x86_64-linux/Cabal-3.8.1.0/build/huffman-exe/autogen/Paths_huffman.hs +: hash: 8a456e753c1244bc62514cb60e0675fd1c93561cf1c05e7aceb12c1288b9818e +? /home/student/Documents/Anwendungsentwicklung/Aufgabe_6/code/.stack-work/dist/x86_64-linux/Cabal-3.8.1.0/build/huffman-exe/autogen/cabal_macros.h +: hash: 2f9b0927bc6eda0e1f672edabce3ffeca3f2772f9f0ab8ca374e4001e76f2f30 +/home/student/Documents/Anwendungsentwicklung/Aufgabe_6/code/exe/Main.hs: + hash: bc321c5e6dea106198eca53ccb8e31b17746ac198c7de206483c2989e73b1fd0 +/home/student/Documents/Anwendungsentwicklung/Aufgabe_6/code/huffman.cabal: + hash: 0f828acaf94c12587e96d013bb3f48a4c4abac1e2efe6cce31dbffe48864d1f2 +/home/student/Documents/Anwendungsentwicklung/Aufgabe_6/code/package.yaml: + hash: e9fcddf7857388c0e51188152e25a1d446e2e46628ed45552bdc3b635472171c +/usr/include/stdc-predef.h: + hash: cb08cd5d4cc059a90833ac48a284d25016e8d56ded8ad4cd98d8ac59cc5053f3 diff --git a/Aufgabe_6/code/.stack-work/dist/x86_64-linux/Cabal-3.8.1.0/stack-build-caches/c95135353db856bc6efc9bd10e84b1a5a9a219f3607bca4f1889717059c848cc/lib b/Aufgabe_6/code/.stack-work/dist/x86_64-linux/Cabal-3.8.1.0/stack-build-caches/c95135353db856bc6efc9bd10e84b1a5a9a219f3607bca4f1889717059c848cc/lib new file mode 100644 index 0000000..2acce91 --- /dev/null +++ b/Aufgabe_6/code/.stack-work/dist/x86_64-linux/Cabal-3.8.1.0/stack-build-caches/c95135353db856bc6efc9bd10e84b1a5a9a219f3607bca4f1889717059c848cc/lib @@ -0,0 +1,16 @@ +/home/student/.ghcup/ghc/9.4.7/lib/ghc-9.4.7/lib/x86_64-linux-ghc-9.4.7/rts-1.0.2/include/ghcversion.h: + hash: ee548d48ca5c94d7c7fab127ec07be47b01afa24d6495358aa9ff6cfc8541c81 +? /home/student/Documents/Anwendungsentwicklung/Aufgabe_6/code/.stack-work/dist/x86_64-linux/Cabal-3.8.1.0/build/autogen/Paths_huffman.hs +: hash: 8181da2c9859111448e558f18f8211c15a827d375fbd1d790a980cf7333f9975 +? /home/student/Documents/Anwendungsentwicklung/Aufgabe_6/code/.stack-work/dist/x86_64-linux/Cabal-3.8.1.0/build/autogen/cabal_macros.h +: hash: 7a75b0f56b750cd2d8d0f5377a45d228da9ded0ce02d89ee1902fc9712840c62 +/home/student/Documents/Anwendungsentwicklung/Aufgabe_6/code/huffman.cabal: + hash: 0f828acaf94c12587e96d013bb3f48a4c4abac1e2efe6cce31dbffe48864d1f2 +/home/student/Documents/Anwendungsentwicklung/Aufgabe_6/code/package.yaml: + hash: e9fcddf7857388c0e51188152e25a1d446e2e46628ed45552bdc3b635472171c +/home/student/Documents/Anwendungsentwicklung/Aufgabe_6/code/src/Auxiliaries.hs: + hash: 5a404af397ad51d6d268ac0a318157dd9511d113c3fbfce35cc238d42974425f +/home/student/Documents/Anwendungsentwicklung/Aufgabe_6/code/src/Huffman.hs: + hash: 73ec1a50a698556eb56e225b69c8712a3cd2fd1406496741e1c60b1b9b85b185 +/usr/include/stdc-predef.h: + hash: cb08cd5d4cc059a90833ac48a284d25016e8d56ded8ad4cd98d8ac59cc5053f3 diff --git a/Aufgabe_6/code/.stack-work/dist/x86_64-linux/Cabal-3.8.1.0/stack-build-caches/c95135353db856bc6efc9bd10e84b1a5a9a219f3607bca4f1889717059c848cc/test-unit-tests b/Aufgabe_6/code/.stack-work/dist/x86_64-linux/Cabal-3.8.1.0/stack-build-caches/c95135353db856bc6efc9bd10e84b1a5a9a219f3607bca4f1889717059c848cc/test-unit-tests new file mode 100644 index 0000000..4ee949f --- /dev/null +++ b/Aufgabe_6/code/.stack-work/dist/x86_64-linux/Cabal-3.8.1.0/stack-build-caches/c95135353db856bc6efc9bd10e84b1a5a9a219f3607bca4f1889717059c848cc/test-unit-tests @@ -0,0 +1,14 @@ +/home/student/.ghcup/ghc/9.4.7/lib/ghc-9.4.7/lib/x86_64-linux-ghc-9.4.7/rts-1.0.2/include/ghcversion.h: + hash: ee548d48ca5c94d7c7fab127ec07be47b01afa24d6495358aa9ff6cfc8541c81 +? /home/student/Documents/Anwendungsentwicklung/Aufgabe_6/code/.stack-work/dist/x86_64-linux/Cabal-3.8.1.0/build/unit-tests/autogen/Paths_huffman.hs +: hash: 0de0de783b417d7503ea205681e0ae630d9c29c741bcd02496561b575c86aea8 +? /home/student/Documents/Anwendungsentwicklung/Aufgabe_6/code/.stack-work/dist/x86_64-linux/Cabal-3.8.1.0/build/unit-tests/autogen/cabal_macros.h +: hash: 959dd270a53e0bbac74b1139154d612f8e91d1560400991d552c1b6d84bd8dba +/home/student/Documents/Anwendungsentwicklung/Aufgabe_6/code/huffman.cabal: + hash: 0f828acaf94c12587e96d013bb3f48a4c4abac1e2efe6cce31dbffe48864d1f2 +/home/student/Documents/Anwendungsentwicklung/Aufgabe_6/code/package.yaml: + hash: e9fcddf7857388c0e51188152e25a1d446e2e46628ed45552bdc3b635472171c +/home/student/Documents/Anwendungsentwicklung/Aufgabe_6/code/test/Tests.hs: + hash: 0189e9ebf9498389b73efcb50cf30fc46f21889d0185d806168aff69fa099fe1 +/usr/include/stdc-predef.h: + hash: cb08cd5d4cc059a90833ac48a284d25016e8d56ded8ad4cd98d8ac59cc5053f3 diff --git a/Aufgabe_6/code/.stack-work/dist/x86_64-linux/Cabal-3.8.1.0/stack-cabal-mod b/Aufgabe_6/code/.stack-work/dist/x86_64-linux/Cabal-3.8.1.0/stack-cabal-mod new file mode 100644 index 0000000..5b04457 --- /dev/null +++ b/Aufgabe_6/code/.stack-work/dist/x86_64-linux/Cabal-3.8.1.0/stack-cabal-mod @@ -0,0 +1 @@ +Just used for its modification time \ No newline at end of file diff --git a/Aufgabe_6/code/.stack-work/dist/x86_64-linux/Cabal-3.8.1.0/stack-project-root b/Aufgabe_6/code/.stack-work/dist/x86_64-linux/Cabal-3.8.1.0/stack-project-root new file mode 100644 index 0000000..fc84d29 --- /dev/null +++ b/Aufgabe_6/code/.stack-work/dist/x86_64-linux/Cabal-3.8.1.0/stack-project-root @@ -0,0 +1 @@ +/home/student/Documents/Anwendungsentwicklung/Aufgabe_6/code/ \ No newline at end of file diff --git a/Aufgabe_6/code/.stack-work/dist/x86_64-linux/Cabal-3.8.1.0/stack-setup-config-mod b/Aufgabe_6/code/.stack-work/dist/x86_64-linux/Cabal-3.8.1.0/stack-setup-config-mod new file mode 100644 index 0000000..5b04457 --- /dev/null +++ b/Aufgabe_6/code/.stack-work/dist/x86_64-linux/Cabal-3.8.1.0/stack-setup-config-mod @@ -0,0 +1 @@ +Just used for its modification time \ No newline at end of file diff --git a/Aufgabe_6/code/.stack-work/dist/x86_64-linux/Cabal-3.8.1.0/stack-test-success b/Aufgabe_6/code/.stack-work/dist/x86_64-linux/Cabal-3.8.1.0/stack-test-success new file mode 100644 index 0000000..0f0c913 --- /dev/null +++ b/Aufgabe_6/code/.stack-work/dist/x86_64-linux/Cabal-3.8.1.0/stack-test-success @@ -0,0 +1 @@ +success \ No newline at end of file diff --git a/Aufgabe_6/code/.stack-work/ghci/2b59291b/cabal_macros.h b/Aufgabe_6/code/.stack-work/ghci/2b59291b/cabal_macros.h new file mode 100644 index 0000000..f7cfc43 --- /dev/null +++ b/Aufgabe_6/code/.stack-work/ghci/2b59291b/cabal_macros.h @@ -0,0 +1,186 @@ +/* DO NOT EDIT: This file is automatically generated by Cabal */ + +/* package huffman-0.1 */ +#ifndef VERSION_huffman +#define VERSION_huffman "0.1" +#endif /* VERSION_huffman */ +#ifndef MIN_VERSION_huffman +#define MIN_VERSION_huffman(major1,major2,minor) (\ + (major1) < 0 || \ + (major1) == 0 && (major2) < 1 || \ + (major1) == 0 && (major2) == 1 && (minor) <= 0) +#endif /* MIN_VERSION_huffman */ +/* package base-4.17.2.0 */ +#ifndef VERSION_base +#define VERSION_base "4.17.2.0" +#endif /* VERSION_base */ +#ifndef MIN_VERSION_base +#define MIN_VERSION_base(major1,major2,minor) (\ + (major1) < 4 || \ + (major1) == 4 && (major2) < 17 || \ + (major1) == 4 && (major2) == 17 && (minor) <= 2) +#endif /* MIN_VERSION_base */ +/* package binary-0.8.9.1 */ +#ifndef VERSION_binary +#define VERSION_binary "0.8.9.1" +#endif /* VERSION_binary */ +#ifndef MIN_VERSION_binary +#define MIN_VERSION_binary(major1,major2,minor) (\ + (major1) < 0 || \ + (major1) == 0 && (major2) < 8 || \ + (major1) == 0 && (major2) == 8 && (minor) <= 9) +#endif /* MIN_VERSION_binary */ +/* package bytestring-0.11.5.2 */ +#ifndef VERSION_bytestring +#define VERSION_bytestring "0.11.5.2" +#endif /* VERSION_bytestring */ +#ifndef MIN_VERSION_bytestring +#define MIN_VERSION_bytestring(major1,major2,minor) (\ + (major1) < 0 || \ + (major1) == 0 && (major2) < 11 || \ + (major1) == 0 && (major2) == 11 && (minor) <= 5) +#endif /* MIN_VERSION_bytestring */ +/* package containers-0.6.7 */ +#ifndef VERSION_containers +#define VERSION_containers "0.6.7" +#endif /* VERSION_containers */ +#ifndef MIN_VERSION_containers +#define MIN_VERSION_containers(major1,major2,minor) (\ + (major1) < 0 || \ + (major1) == 0 && (major2) < 6 || \ + (major1) == 0 && (major2) == 6 && (minor) <= 7) +#endif /* MIN_VERSION_containers */ +/* package filepath-1.4.2.2 */ +#ifndef VERSION_filepath +#define VERSION_filepath "1.4.2.2" +#endif /* VERSION_filepath */ +#ifndef MIN_VERSION_filepath +#define MIN_VERSION_filepath(major1,major2,minor) (\ + (major1) < 1 || \ + (major1) == 1 && (major2) < 4 || \ + (major1) == 1 && (major2) == 4 && (minor) <= 2) +#endif /* MIN_VERSION_filepath */ + +/* tool alex-3.2.5 */ +#ifndef TOOL_VERSION_alex +#define TOOL_VERSION_alex "3.2.5" +#endif /* TOOL_VERSION_alex */ +#ifndef MIN_TOOL_VERSION_alex +#define MIN_TOOL_VERSION_alex(major1,major2,minor) (\ + (major1) < 3 || \ + (major1) == 3 && (major2) < 2 || \ + (major1) == 3 && (major2) == 2 && (minor) <= 5) +#endif /* MIN_TOOL_VERSION_alex */ +/* tool gcc-11 */ +#ifndef TOOL_VERSION_gcc +#define TOOL_VERSION_gcc "11" +#endif /* TOOL_VERSION_gcc */ +#ifndef MIN_TOOL_VERSION_gcc +#define MIN_TOOL_VERSION_gcc(major1,major2,minor) (\ + (major1) < 11 || \ + (major1) == 11 && (major2) < 0 || \ + (major1) == 11 && (major2) == 0 && (minor) <= 0) +#endif /* MIN_TOOL_VERSION_gcc */ +/* tool ghc-9.4.7 */ +#ifndef TOOL_VERSION_ghc +#define TOOL_VERSION_ghc "9.4.7" +#endif /* TOOL_VERSION_ghc */ +#ifndef MIN_TOOL_VERSION_ghc +#define MIN_TOOL_VERSION_ghc(major1,major2,minor) (\ + (major1) < 9 || \ + (major1) == 9 && (major2) < 4 || \ + (major1) == 9 && (major2) == 4 && (minor) <= 7) +#endif /* MIN_TOOL_VERSION_ghc */ +/* tool ghc-pkg-9.4.7 */ +#ifndef TOOL_VERSION_ghc_pkg +#define TOOL_VERSION_ghc_pkg "9.4.7" +#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) < 4 || \ + (major1) == 9 && (major2) == 4 && (minor) <= 7) +#endif /* MIN_TOOL_VERSION_ghc_pkg */ +/* tool haddock-2.27.0 */ +#ifndef TOOL_VERSION_haddock +#define TOOL_VERSION_haddock "2.27.0" +#endif /* TOOL_VERSION_haddock */ +#ifndef MIN_TOOL_VERSION_haddock +#define MIN_TOOL_VERSION_haddock(major1,major2,minor) (\ + (major1) < 2 || \ + (major1) == 2 && (major2) < 27 || \ + (major1) == 2 && (major2) == 27 && (minor) <= 0) +#endif /* MIN_TOOL_VERSION_haddock */ +/* tool happy-1.19.12 */ +#ifndef TOOL_VERSION_happy +#define TOOL_VERSION_happy "1.19.12" +#endif /* TOOL_VERSION_happy */ +#ifndef MIN_TOOL_VERSION_happy +#define MIN_TOOL_VERSION_happy(major1,major2,minor) (\ + (major1) < 1 || \ + (major1) == 1 && (major2) < 19 || \ + (major1) == 1 && (major2) == 19 && (minor) <= 12) +#endif /* MIN_TOOL_VERSION_happy */ +/* 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 hscolour-1.24 */ +#ifndef TOOL_VERSION_hscolour +#define TOOL_VERSION_hscolour "1.24" +#endif /* TOOL_VERSION_hscolour */ +#ifndef MIN_TOOL_VERSION_hscolour +#define MIN_TOOL_VERSION_hscolour(major1,major2,minor) (\ + (major1) < 1 || \ + (major1) == 1 && (major2) < 24 || \ + (major1) == 1 && (major2) == 24 && (minor) <= 0) +#endif /* MIN_TOOL_VERSION_hscolour */ +/* tool runghc-9.4.7 */ +#ifndef TOOL_VERSION_runghc +#define TOOL_VERSION_runghc "9.4.7" +#endif /* TOOL_VERSION_runghc */ +#ifndef MIN_TOOL_VERSION_runghc +#define MIN_TOOL_VERSION_runghc(major1,major2,minor) (\ + (major1) < 9 || \ + (major1) == 9 && (major2) < 4 || \ + (major1) == 9 && (major2) == 4 && (minor) <= 7) +#endif /* MIN_TOOL_VERSION_runghc */ +/* tool strip-2.38 */ +#ifndef TOOL_VERSION_strip +#define TOOL_VERSION_strip "2.38" +#endif /* TOOL_VERSION_strip */ +#ifndef MIN_TOOL_VERSION_strip +#define MIN_TOOL_VERSION_strip(major1,major2,minor) (\ + (major1) < 2 || \ + (major1) == 2 && (major2) < 38 || \ + (major1) == 2 && (major2) == 38 && (minor) <= 0) +#endif /* MIN_TOOL_VERSION_strip */ + +#ifndef CURRENT_PACKAGE_KEY +#define CURRENT_PACKAGE_KEY "huffman-0.1-5hb8DvQH04kAhx22YvzXdK" +#endif /* CURRENT_packageKey */ +#ifndef CURRENT_COMPONENT_ID +#define CURRENT_COMPONENT_ID "huffman-0.1-5hb8DvQH04kAhx22YvzXdK" +#endif /* CURRENT_COMPONENT_ID */ +#ifndef CURRENT_PACKAGE_VERSION +#define CURRENT_PACKAGE_VERSION "0.1" +#endif /* CURRENT_PACKAGE_VERSION */ + +#undef CURRENT_PACKAGE_KEY +#undef CURRENT_COMPONENT_ID diff --git a/Aufgabe_6/code/.stack-work/install/x86_64-linux/1006e3a79413cac00f66edc2857535513565a12ac86ee78bec0bc75edc5e5501/9.4.7/pkgdb/package.cache b/Aufgabe_6/code/.stack-work/install/x86_64-linux/1006e3a79413cac00f66edc2857535513565a12ac86ee78bec0bc75edc5e5501/9.4.7/pkgdb/package.cache new file mode 100644 index 0000000..b3cae5c Binary files /dev/null and b/Aufgabe_6/code/.stack-work/install/x86_64-linux/1006e3a79413cac00f66edc2857535513565a12ac86ee78bec0bc75edc5e5501/9.4.7/pkgdb/package.cache differ diff --git a/Aufgabe_6/code/.stack-work/install/x86_64-linux/1006e3a79413cac00f66edc2857535513565a12ac86ee78bec0bc75edc5e5501/9.4.7/pkgdb/package.cache.lock b/Aufgabe_6/code/.stack-work/install/x86_64-linux/1006e3a79413cac00f66edc2857535513565a12ac86ee78bec0bc75edc5e5501/9.4.7/pkgdb/package.cache.lock new file mode 100644 index 0000000..e69de29 diff --git a/Aufgabe_6/code/.stack-work/install/x86_64-linux/c95135353db856bc6efc9bd10e84b1a5a9a219f3607bca4f1889717059c848cc/9.4.7/bin/huffman-exe b/Aufgabe_6/code/.stack-work/install/x86_64-linux/c95135353db856bc6efc9bd10e84b1a5a9a219f3607bca4f1889717059c848cc/9.4.7/bin/huffman-exe new file mode 100755 index 0000000..ba057c8 Binary files /dev/null and b/Aufgabe_6/code/.stack-work/install/x86_64-linux/c95135353db856bc6efc9bd10e84b1a5a9a219f3607bca4f1889717059c848cc/9.4.7/bin/huffman-exe differ diff --git a/Aufgabe_6/code/.stack-work/install/x86_64-linux/c95135353db856bc6efc9bd10e84b1a5a9a219f3607bca4f1889717059c848cc/9.4.7/lib/x86_64-linux-ghc-9.4.7/huffman-0.1-FYSjga9JLF2kZjOZ6zeLt/Auxiliaries.dyn_hi b/Aufgabe_6/code/.stack-work/install/x86_64-linux/c95135353db856bc6efc9bd10e84b1a5a9a219f3607bca4f1889717059c848cc/9.4.7/lib/x86_64-linux-ghc-9.4.7/huffman-0.1-FYSjga9JLF2kZjOZ6zeLt/Auxiliaries.dyn_hi new file mode 100644 index 0000000..47329a8 Binary files /dev/null and b/Aufgabe_6/code/.stack-work/install/x86_64-linux/c95135353db856bc6efc9bd10e84b1a5a9a219f3607bca4f1889717059c848cc/9.4.7/lib/x86_64-linux-ghc-9.4.7/huffman-0.1-FYSjga9JLF2kZjOZ6zeLt/Auxiliaries.dyn_hi differ diff --git a/Aufgabe_6/code/.stack-work/install/x86_64-linux/c95135353db856bc6efc9bd10e84b1a5a9a219f3607bca4f1889717059c848cc/9.4.7/lib/x86_64-linux-ghc-9.4.7/huffman-0.1-FYSjga9JLF2kZjOZ6zeLt/Auxiliaries.hi b/Aufgabe_6/code/.stack-work/install/x86_64-linux/c95135353db856bc6efc9bd10e84b1a5a9a219f3607bca4f1889717059c848cc/9.4.7/lib/x86_64-linux-ghc-9.4.7/huffman-0.1-FYSjga9JLF2kZjOZ6zeLt/Auxiliaries.hi new file mode 100644 index 0000000..bd9d187 Binary files /dev/null and b/Aufgabe_6/code/.stack-work/install/x86_64-linux/c95135353db856bc6efc9bd10e84b1a5a9a219f3607bca4f1889717059c848cc/9.4.7/lib/x86_64-linux-ghc-9.4.7/huffman-0.1-FYSjga9JLF2kZjOZ6zeLt/Auxiliaries.hi differ diff --git a/Aufgabe_6/code/.stack-work/install/x86_64-linux/c95135353db856bc6efc9bd10e84b1a5a9a219f3607bca4f1889717059c848cc/9.4.7/lib/x86_64-linux-ghc-9.4.7/huffman-0.1-FYSjga9JLF2kZjOZ6zeLt/Huffman.dyn_hi b/Aufgabe_6/code/.stack-work/install/x86_64-linux/c95135353db856bc6efc9bd10e84b1a5a9a219f3607bca4f1889717059c848cc/9.4.7/lib/x86_64-linux-ghc-9.4.7/huffman-0.1-FYSjga9JLF2kZjOZ6zeLt/Huffman.dyn_hi new file mode 100644 index 0000000..4dd1c0c Binary files /dev/null and b/Aufgabe_6/code/.stack-work/install/x86_64-linux/c95135353db856bc6efc9bd10e84b1a5a9a219f3607bca4f1889717059c848cc/9.4.7/lib/x86_64-linux-ghc-9.4.7/huffman-0.1-FYSjga9JLF2kZjOZ6zeLt/Huffman.dyn_hi differ diff --git a/Aufgabe_6/code/.stack-work/install/x86_64-linux/c95135353db856bc6efc9bd10e84b1a5a9a219f3607bca4f1889717059c848cc/9.4.7/lib/x86_64-linux-ghc-9.4.7/huffman-0.1-FYSjga9JLF2kZjOZ6zeLt/Huffman.hi b/Aufgabe_6/code/.stack-work/install/x86_64-linux/c95135353db856bc6efc9bd10e84b1a5a9a219f3607bca4f1889717059c848cc/9.4.7/lib/x86_64-linux-ghc-9.4.7/huffman-0.1-FYSjga9JLF2kZjOZ6zeLt/Huffman.hi new file mode 100644 index 0000000..1524701 Binary files /dev/null and b/Aufgabe_6/code/.stack-work/install/x86_64-linux/c95135353db856bc6efc9bd10e84b1a5a9a219f3607bca4f1889717059c848cc/9.4.7/lib/x86_64-linux-ghc-9.4.7/huffman-0.1-FYSjga9JLF2kZjOZ6zeLt/Huffman.hi differ diff --git a/Aufgabe_6/code/.stack-work/install/x86_64-linux/c95135353db856bc6efc9bd10e84b1a5a9a219f3607bca4f1889717059c848cc/9.4.7/lib/x86_64-linux-ghc-9.4.7/huffman-0.1-FYSjga9JLF2kZjOZ6zeLt/Paths_huffman.dyn_hi b/Aufgabe_6/code/.stack-work/install/x86_64-linux/c95135353db856bc6efc9bd10e84b1a5a9a219f3607bca4f1889717059c848cc/9.4.7/lib/x86_64-linux-ghc-9.4.7/huffman-0.1-FYSjga9JLF2kZjOZ6zeLt/Paths_huffman.dyn_hi new file mode 100644 index 0000000..a6c65f5 Binary files /dev/null and b/Aufgabe_6/code/.stack-work/install/x86_64-linux/c95135353db856bc6efc9bd10e84b1a5a9a219f3607bca4f1889717059c848cc/9.4.7/lib/x86_64-linux-ghc-9.4.7/huffman-0.1-FYSjga9JLF2kZjOZ6zeLt/Paths_huffman.dyn_hi differ diff --git a/Aufgabe_6/code/.stack-work/install/x86_64-linux/c95135353db856bc6efc9bd10e84b1a5a9a219f3607bca4f1889717059c848cc/9.4.7/lib/x86_64-linux-ghc-9.4.7/huffman-0.1-FYSjga9JLF2kZjOZ6zeLt/Paths_huffman.hi b/Aufgabe_6/code/.stack-work/install/x86_64-linux/c95135353db856bc6efc9bd10e84b1a5a9a219f3607bca4f1889717059c848cc/9.4.7/lib/x86_64-linux-ghc-9.4.7/huffman-0.1-FYSjga9JLF2kZjOZ6zeLt/Paths_huffman.hi new file mode 100644 index 0000000..cd7563b Binary files /dev/null and b/Aufgabe_6/code/.stack-work/install/x86_64-linux/c95135353db856bc6efc9bd10e84b1a5a9a219f3607bca4f1889717059c848cc/9.4.7/lib/x86_64-linux-ghc-9.4.7/huffman-0.1-FYSjga9JLF2kZjOZ6zeLt/Paths_huffman.hi differ diff --git a/Aufgabe_6/code/.stack-work/install/x86_64-linux/c95135353db856bc6efc9bd10e84b1a5a9a219f3607bca4f1889717059c848cc/9.4.7/lib/x86_64-linux-ghc-9.4.7/huffman-0.1-FYSjga9JLF2kZjOZ6zeLt/libHShuffman-0.1-FYSjga9JLF2kZjOZ6zeLt.a b/Aufgabe_6/code/.stack-work/install/x86_64-linux/c95135353db856bc6efc9bd10e84b1a5a9a219f3607bca4f1889717059c848cc/9.4.7/lib/x86_64-linux-ghc-9.4.7/huffman-0.1-FYSjga9JLF2kZjOZ6zeLt/libHShuffman-0.1-FYSjga9JLF2kZjOZ6zeLt.a new file mode 100644 index 0000000..27766f8 Binary files /dev/null and b/Aufgabe_6/code/.stack-work/install/x86_64-linux/c95135353db856bc6efc9bd10e84b1a5a9a219f3607bca4f1889717059c848cc/9.4.7/lib/x86_64-linux-ghc-9.4.7/huffman-0.1-FYSjga9JLF2kZjOZ6zeLt/libHShuffman-0.1-FYSjga9JLF2kZjOZ6zeLt.a differ diff --git a/Aufgabe_6/code/.stack-work/install/x86_64-linux/c95135353db856bc6efc9bd10e84b1a5a9a219f3607bca4f1889717059c848cc/9.4.7/lib/x86_64-linux-ghc-9.4.7/libHShuffman-0.1-FYSjga9JLF2kZjOZ6zeLt-ghc9.4.7.so b/Aufgabe_6/code/.stack-work/install/x86_64-linux/c95135353db856bc6efc9bd10e84b1a5a9a219f3607bca4f1889717059c848cc/9.4.7/lib/x86_64-linux-ghc-9.4.7/libHShuffman-0.1-FYSjga9JLF2kZjOZ6zeLt-ghc9.4.7.so new file mode 100755 index 0000000..5be0eaf Binary files /dev/null and b/Aufgabe_6/code/.stack-work/install/x86_64-linux/c95135353db856bc6efc9bd10e84b1a5a9a219f3607bca4f1889717059c848cc/9.4.7/lib/x86_64-linux-ghc-9.4.7/libHShuffman-0.1-FYSjga9JLF2kZjOZ6zeLt-ghc9.4.7.so differ diff --git a/Aufgabe_6/code/.stack-work/install/x86_64-linux/c95135353db856bc6efc9bd10e84b1a5a9a219f3607bca4f1889717059c848cc/9.4.7/pkgdb/huffman-0.1-FYSjga9JLF2kZjOZ6zeLt.conf b/Aufgabe_6/code/.stack-work/install/x86_64-linux/c95135353db856bc6efc9bd10e84b1a5a9a219f3607bca4f1889717059c848cc/9.4.7/pkgdb/huffman-0.1-FYSjga9JLF2kZjOZ6zeLt.conf new file mode 100644 index 0000000..0ce260f --- /dev/null +++ b/Aufgabe_6/code/.stack-work/install/x86_64-linux/c95135353db856bc6efc9bd10e84b1a5a9a219f3607bca4f1889717059c848cc/9.4.7/pkgdb/huffman-0.1-FYSjga9JLF2kZjOZ6zeLt.conf @@ -0,0 +1,36 @@ +name: huffman +version: 0.1 +visibility: public +id: huffman-0.1-FYSjga9JLF2kZjOZ6zeLt +key: huffman-0.1-FYSjga9JLF2kZjOZ6zeLt +license: BSD-3-Clause +synopsis: huffman +abi: 5af1db6672629be997b9440d7ecf09b9 +exposed: True +exposed-modules: Auxiliaries Huffman +hidden-modules: Paths_huffman +import-dirs: + /home/student/Documents/Anwendungsentwicklung/Aufgabe_6/code/.stack-work/install/x86_64-linux/c95135353db856bc6efc9bd10e84b1a5a9a219f3607bca4f1889717059c848cc/9.4.7/lib/x86_64-linux-ghc-9.4.7/huffman-0.1-FYSjga9JLF2kZjOZ6zeLt + +library-dirs: + /home/student/Documents/Anwendungsentwicklung/Aufgabe_6/code/.stack-work/install/x86_64-linux/c95135353db856bc6efc9bd10e84b1a5a9a219f3607bca4f1889717059c848cc/9.4.7/lib/x86_64-linux-ghc-9.4.7/huffman-0.1-FYSjga9JLF2kZjOZ6zeLt + +library-dirs-static: + /home/student/Documents/Anwendungsentwicklung/Aufgabe_6/code/.stack-work/install/x86_64-linux/c95135353db856bc6efc9bd10e84b1a5a9a219f3607bca4f1889717059c848cc/9.4.7/lib/x86_64-linux-ghc-9.4.7/huffman-0.1-FYSjga9JLF2kZjOZ6zeLt + +dynamic-library-dirs: + /home/student/Documents/Anwendungsentwicklung/Aufgabe_6/code/.stack-work/install/x86_64-linux/c95135353db856bc6efc9bd10e84b1a5a9a219f3607bca4f1889717059c848cc/9.4.7/lib/x86_64-linux-ghc-9.4.7 + +data-dir: + /home/student/Documents/Anwendungsentwicklung/Aufgabe_6/code/.stack-work/install/x86_64-linux/c95135353db856bc6efc9bd10e84b1a5a9a219f3607bca4f1889717059c848cc/9.4.7/share/x86_64-linux-ghc-9.4.7/huffman-0.1 + +hs-libraries: HShuffman-0.1-FYSjga9JLF2kZjOZ6zeLt +depends: + base-4.17.2.0 binary-0.8.9.1 bytestring-0.11.5.2 containers-0.6.7 + filepath-1.4.2.2 + +haddock-interfaces: + /home/student/Documents/Anwendungsentwicklung/Aufgabe_6/code/.stack-work/install/x86_64-linux/c95135353db856bc6efc9bd10e84b1a5a9a219f3607bca4f1889717059c848cc/9.4.7/doc/huffman-0.1/huffman.haddock + +haddock-html: + /home/student/Documents/Anwendungsentwicklung/Aufgabe_6/code/.stack-work/install/x86_64-linux/c95135353db856bc6efc9bd10e84b1a5a9a219f3607bca4f1889717059c848cc/9.4.7/doc/huffman-0.1 diff --git a/Aufgabe_6/code/.stack-work/install/x86_64-linux/c95135353db856bc6efc9bd10e84b1a5a9a219f3607bca4f1889717059c848cc/9.4.7/pkgdb/package.cache b/Aufgabe_6/code/.stack-work/install/x86_64-linux/c95135353db856bc6efc9bd10e84b1a5a9a219f3607bca4f1889717059c848cc/9.4.7/pkgdb/package.cache new file mode 100644 index 0000000..a1d56b5 Binary files /dev/null and b/Aufgabe_6/code/.stack-work/install/x86_64-linux/c95135353db856bc6efc9bd10e84b1a5a9a219f3607bca4f1889717059c848cc/9.4.7/pkgdb/package.cache differ diff --git a/Aufgabe_6/code/.stack-work/install/x86_64-linux/c95135353db856bc6efc9bd10e84b1a5a9a219f3607bca4f1889717059c848cc/9.4.7/pkgdb/package.cache.lock b/Aufgabe_6/code/.stack-work/install/x86_64-linux/c95135353db856bc6efc9bd10e84b1a5a9a219f3607bca4f1889717059c848cc/9.4.7/pkgdb/package.cache.lock new file mode 100644 index 0000000..e69de29 diff --git a/Aufgabe_6/code/.stack-work/stack.sqlite3 b/Aufgabe_6/code/.stack-work/stack.sqlite3 new file mode 100644 index 0000000..d53af17 Binary files /dev/null and b/Aufgabe_6/code/.stack-work/stack.sqlite3 differ diff --git a/Aufgabe_6/code/.stack-work/stack.sqlite3.pantry-write-lock b/Aufgabe_6/code/.stack-work/stack.sqlite3.pantry-write-lock new file mode 100644 index 0000000..e69de29 diff --git a/Aufgabe_6/code/.vscode/settings.json b/Aufgabe_6/code/.vscode/settings.json new file mode 100755 index 0000000..41a9e4b --- /dev/null +++ b/Aufgabe_6/code/.vscode/settings.json @@ -0,0 +1,3 @@ +{ + "haskell.plugin.hlint.codeActionsOn": false +} diff --git a/Aufgabe_6/code/AaronMoser_187648.zip b/Aufgabe_6/code/AaronMoser_187648.zip new file mode 100644 index 0000000..004e160 Binary files /dev/null and b/Aufgabe_6/code/AaronMoser_187648.zip differ diff --git a/Aufgabe_6/code/exe/Main.hs b/Aufgabe_6/code/exe/Main.hs new file mode 100755 index 0000000..48e8483 --- /dev/null +++ b/Aufgabe_6/code/exe/Main.hs @@ -0,0 +1,6 @@ +module Main where + +-- import Huffman + +main :: IO () +main = pure () diff --git a/Aufgabe_6/code/hitchhiker.txt b/Aufgabe_6/code/hitchhiker.txt new file mode 100755 index 0000000..6faec8d --- /dev/null +++ b/Aufgabe_6/code/hitchhiker.txt @@ -0,0 +1,166 @@ +The house stood on a slight rise just on the edge of the village. It stood on its own and looked over a broad spread of West Country farmland. Not a remarkable house by any means it was about thirty years old, squattish, squarish, made of brick, and had four windows set in the front of a size and proportion which more or less exactly failed to please the eye. +The only person for whom the house was in any way special was Arthur Dent, and that was only because it happened to be the one he lived in. He had lived in it for about three years, ever since he had moved out of London because it made him nervous and irritable. He was about thirty as well, dark haired and never quite at ease with himself. The thing that used to worry him most was the fact that people always used to ask him what he was looking so worried about. He worked in local radio which he always used to tell his friends was a lot more interesting than they probably thought. It was, too most of his friends worked in advertising. +It hadn't properly registered with Arthur that the council wanted to knock down his house and build an bypass instead. +At eight o'clock on Thursday morning Arthur didn't feel very good. He woke up blearily, got up, wandered blearily round his room, opened a window, saw a bulldozer, found his slippers, and stomped off to the bathroom to wash. +Toothpaste on the brush so. Scrub. +Shaving mirror pointing at the ceiling. He adjusted it. For a moment it reflected a second bulldozer through the bathroom window. Properly adjusted, it reflected Arthur Dent's bristles. He shaved them off, washed, dried, and stomped off to the kitchen to find something pleasant to put in his mouth. +Kettle, plug, fridge, milk, coffee. Yawn. +The word bulldozer wandered through his mind for a moment in search of something to connect with. +The bulldozer outside the kitchen window was quite a big one. +He stared at it. +"Yellow," he thought and stomped off back to his bedroom to get dressed. +Passing the bathroom he stopped to drink a large glass of water, and another. He began to suspect that he was hung over. Why was he hung over? Had he been drinking the night before? He supposed that he must have been. He caught a glint in the shaving mirror. "Yellow," he thought and stomped on to the bedroom. +He stood and thought. The pub, he thought. Oh dear, the pub. He vaguely remembered being angry, angry about something that seemed important. He'd been telling people about it, telling people about it at great length, he rather suspected: his clearest visual recollection was of glazed looks on other people's faces. Something about a new bypass he had just found out about. It had been in the pipeline for months only no one seemed to have known about it. Ridiculous. He took a swig of water. It would sort itself out, he'd decided, no one wanted a bypass, the council didn't have a leg to stand on. It would sort itself out. +God what a terrible hangover it had earned him though. He looked at himself in the wardrobe mirror. He stuck out his tongue. "Yellow," he thought. The word yellow wandered through his mind in search of something to connect with. +Fifteen seconds later he was out of the house and lying in front of a big yellow bulldozer that was advancing up his garden path. +Mr. L Prosser was, as they say, only human. In other words he was a carbon-based life form descended from an ape. More specifically he was forty, fat and shabby and worked for the local council. Curiously enough, though he didn't know it, he was also a direct male-line descendant of Genghis Khan, though intervening generations and racial mixing had so juggled his genes that he had no discernible Mongoloid characteristics, and the only vestiges left in Mr. L Prosser of his mighty ancestry were a pronounced stoutness about the tum and a predilection for little fur hats. +He was by no means a great warrior: in fact he was a nervous worried man. Today he was particularly nervous and worried because + +something had gone seriously wrong with his job which was to see that Arthur Dent's house got cleared out of the way before the day was out. +"Come off it, Mr. Dent,", he said, "you can't win you know. You can't lie in front of the bulldozer indefinitely." He tried to make his eyes blaze fiercely but they just wouldn't do it. +Arthur lay in the mud and squelched at him. +"I'm game," he said, "we'll see who rusts first." +"I'm afraid you're going to have to accept it," said Mr. Prosser gripping his fur hat and rolling it round the top of his head, "this bypass has got to be built and it's going to be built!" +"First I've heard of it," said Arthur, "why's it going to be built?" +Mr. Prosser shook his finger at him for a bit, then stopped and put it away again. +"What do you mean, why's it got to be built?" he said. "It's a bypass. You've got to build bypasses." +Bypasses are devices which allow some people to drive from point A to point B very fast whilst other people dash from point B to point A very fast. People living at point C, being a point directly in between, are often given to wonder what's so great about point A that so many people of point B are so keen to get there, and what's so great about point B that so many people of point A are so keen to get there. They often wish that people would just once and for all work out where the hell they wanted to be. +Mr. Prosser wanted to be at point D. Point D wasn't anywhere in particular, it was just any convenient point a very long way from points A, B and C. He would have a nice little cottage at point D, with axes over the door, and spend a pleasant amount of time at point E, which would be the nearest pub to point D. His wife of course wanted climbing roses, but he wanted axes. He didn't know why he just liked axes. He flushed hotly under the derisive grins of the bulldozer drivers. +He shifted his weight from foot to foot, but it was equally uncomfortable on each. Obviously somebody had been appallingly incompetent and he hoped to God it wasn't him. +Mr. Prosser said: "You were quite entitled to make any suggestions or protests at the appropriate time you know." + +"Appropriate time?" hooted Arthur. "Appropriate time? The first I knew about it was when a workman arrived at my home yesterday. I asked him if he'd come to clean the windows and he said no he'd come to demolish the house. He didn't tell me straight away of course. Oh no. First he wiped a couple of windows and charged me a fiver. Then he told me." +"But Mr. Dent, the plans have been available in the local planning office for the last nine month." +"Oh yes, well as soon as I heard I went straight round to see them, yesterday afternoon. You hadn't exactly gone out of your way to call attention to them had you? I mean like actually telling anybody or anything." +"But the plans were on display..." +"On display? I eventually had to go down to the cellar to find them." +"That's the display department." +"With a torch." +"Ah, well the lights had probably gone." +"So had the stairs." +"But look, you found the notice didn't you?" +"Yes," said Arthur, "yes I did. It was on display in the bottom of a locked filing cabinet stuck in a disused lavatory with a sign on the door saying Beware of the Leopard." +A cloud passed overhead. It cast a shadow over Arthur Dent as he lay propped up on his elbow in the cold mud. It cast a shadow over Arthur Dent's house. Mr. Prosser frowned at it. +"It's not as if it's a particularly nice house," he said. "I'm sorry, but I happen to like it." +"You'll like the bypass." +"Oh shut up," said Arthur Dent. "Shut up and go away, and take your bloody bypass with you. You haven't got a leg to stand on and you know it." +Mr. Prosser's mouth opened and closed a couple of times while his mind was for a moment filled with inexplicable but terribly attractive visions of Arthur Dent's house being consumed with fire and Arthur himself running screaming from the blazing ruin with at least three + +hefty spears protruding from his back. Mr. Prosser was often bothered with visions like these and they made him feel very nervous. He stuttered for a moment and then pulled himself together. +"Mr. Dent," he said. +"Hello? Yes?" said Arthur. +"Some factual information for you. Have you any idea how much damage that bulldozer would suffer if I just let it roll straight over you?" +"How much?" said Arthur. +"None at all," said Mr. Prosser, and stormed nervously off wondering why his brain was filled with a thousand hairy horsemen all shouting at him. +By a curious coincidence, None at all is exactly how much suspicion the ape-descendant Arthur Dent had that one of his closest friends was not descended from an ape, but was in fact from a small planet in the vicinity of Betelgeuse and not from Guildford as he usually claimed. +Arthur Dent had never, ever suspected this. +This friend of his had first arrived on the planet some fifteen Earth years previously, and he had worked hard to blend himself into Earth society with, it must be said, some success. For instance he had spent those fifteen years pretending to be an out of work actor, which was plausible enough. +He had made one careless blunder though, because he had skimped a bit on his preparatory research. The information he had gathered had led him to choose the name "Ford Prefect" as being nicely inconspicuous. +He was not conspicuously tall, his features were striking but not conspicuously handsome. His hair was wiry and gingerish and brushed backwards from the temples. His skin seemed to be pulled backwards from the nose. There was something very slightly odd about him, but it was difficult to say what it was. Perhaps it was that his eyes didn't blink often enough and when you talked to him for any length of time your eyes began involuntarily to water on his behalf. Perhaps it was that he smiled slightly too broadly and gave people the unnerving impression that he was about to go for their neck. + +He struck most of the friends he had made on Earth as an eccentric, but a harmless one an unruly boozer with some oddish habits. For instance he would often gatecrash university parties, get badly drunk and start making fun of any astrophysicist he could find till he got thrown out. +Sometimes he would get seized with oddly distracted moods and stare into the sky as if hypnotized until someone asked him what he was doing. Then he would start guiltily for a moment, relax and grin. +"Oh, just looking for flying saucers," he would joke and everyone would laugh and ask him what sort of flying saucers he was looking for. +"Green ones!" he would reply with a wicked grin, laugh wildly for a moment and then suddenly lunge for the nearest bar and buy an enormous round of drinks. +Evenings like this usually ended badly. Ford would get out of his skull on whisky, huddle into a corner with some girl and explain to her in slurred phrases that honestly the colour of the flying saucers didn't matter that much really. +Thereafter, staggering semi-paralytic down the night streets he would often ask passing policemen if they knew the way to Betelgeuse. The policemen would usually say something like, "Don't you think it's about time you went off home sir?" +"I'm trying to baby, I'm trying to," is what Ford invariably replied on these occasions. +In fact what he was really looking out for when he stared distractedly into the night sky was any kind of flying saucer at all. The reason he said green was that green was the traditional space livery of the Betelgeuse trading scouts. +Ford Prefect was desperate that any flying saucer at all would arrive soon because fifteen years was a long time to get stranded anywhere, particularly somewhere as mindboggingly dull as the Earth. +Ford wished that a flying saucer would arrive soon because he knew how to flag flying saucers down and get lifts from them. He knew how to see the Marvels of the Universe for less than thirty Altairan dollars a day. +In fact, Ford Prefect was a roving researcher for that wholly remarkable book The Hitchhiker's Guide to the Galaxy. + +Human beings are great adaptors, and by lunchtime life in the environs of Arthur's house had settled into a steady routine. It was Arthur's accepted role to lie squelching in the mud making occasional demands to see his lawyer, his mother or a good book; it was Mr. Prosser's accepted role to tackle Arthur with the occasional new ploy such as the For the Public Good talk, the March of Progress talk, the They Knocked My House Down Once You Know, Never Looked Back talk and various other cajoleries and threats; and it was the bulldozer drivers' accepted role to sit around drinking coffee and experimenting with union regulations to see how they could turn the situation to their financial advantage. +The Earth moved slowly in its diurnal course. +The sun was beginning to dry out the mud Arthur lay in. +A shadow moved across him again. +"Hello Arthur," said the shadow. +Arthur looked up and squinting into the sun was startled to see Ford Prefect standing above him. +"Ford! Hello, how are you?" +"Fine," said Ford, "look, are you busy?" +"Am I busy?" exclaimed Arthur. "Well, I've just got all these bulldozers and things to lie in front of because they'll knock my house down if I don't, but other than that... well, no not especially, why?" +They don't have sarcasm on Betelgeuse, and Ford Prefect often failed to notice it unless he was concentrating. He said, "Good, is there anywhere we can talk?" +"What?" said Arthur Dent. +For a few seconds Ford seemed to ignore him, and stared fixedly into the sky like a rabbit trying to get run over by a car. Then suddenly he squatted down beside Arthur. +"We've got to talk," he said urgently. +"Fine," said Arthur, "talk." +"And drink," said Ford. "It's vitally important that we talk and drink. Now. We'll go to the pub in the village." +He looked into the sky again, nervous, expectant. + +"Look, don't you understand?" shouted Arthur. He pointed at Prosser. "That man wants to knock my house down!" +Ford glanced at him, puzzled. +"Well he can do it while you're away can't he?" he asked. "But I don't want him to!" +"Ah." +"Look, what's the matter with you Ford?" said Arthur. +"Nothing. Nothing's the matter. Listen to me I've got to tell you the most important thing you've ever heard. I've got to tell you now, and I've got to tell you in the saloon bar of the Horse and Groom." +"But why?" +"Because you are going to need a very stiff drink." +Ford stared at Arthur, and Arthur was astonished to find that his will was beginning to weaken. He didn't realize that this was because of an old drinking game that Ford learned to play in the hyperspace ports that served the madranite mining belts in the star system of Orion Beta. +The game was not unlike the Earth game called Indian Wrestling, and was played like this: +Two contestants would sit either side of a table, with a glass in front of each of them. +Between them would be placed a bottle of Janx Spirit (as immortalized in that ancient Orion mining song "Oh don't give me none more of that Old Janx Spirit/ No, don't you give me none more of that Old Janx Spirit/ For my head will fly, my tongue will lie, my eyes will fry and I may die/ Won't you pour me one more of that sinful Old Janx Spirit"). +Each of the two contestants would then concentrate their will on the bottle and attempt to tip it and pour spirit into the glass of his opponent who would then have to drink it. +The bottle would then be refilled. The game would be played again. And again. +Once you started to lose you would probably keep losing, because one of the effects of Janx spirit is to depress telepsychic power. + +As soon as a predetermined quantity had been consumed, the final loser would have to perform a forfeit, which was usually obscenely biological. +Ford Prefect usually played to lose. +Ford stared at Arthur, who began to think that perhaps he did want to go to the Horse and Groom after all. +"But what about my house...?" he asked plaintively. +Ford looked across to Mr. Prosser, and suddenly a wicked thought struck him. +"He wants to knock your house down?" +"Yes, he wants to build..." +"And he can't because you're lying in front of the bulldozers?" +"Yes, and..." +"I'm sure we can come to some arrangement," said Ford. "Excuse me!" he shouted. +Mr. Prosser (who was arguing with a spokesman for the bulldozer drivers about whether or not Arthur Dent constituted a mental health hazard, and how much they should get paid if he did) looked around. He was surprised and slightly alarmed to find that Arthur had company. +"Yes? Hello?" he called. "Has Mr. Dent come to his senses yet?" +"Can we for the moment," called Ford, "assume that he hasn't?" +"Well?" sighed Mr. Prosser. +"And can we also assume," said Ford, "that he's going to be staying here all day?" +"So?" +"So all your men are going to be standing around all day doing nothing?" +"Could be, could be..." +"Well, if you're resigned to doing that anyway, you don't actually need him to lie here all the time do you?" +"What?" +"You don't," said Ford patiently, "actually need him here." + +Mr. Prosser thought about this. +"Well no, not as such...", he said, "not exactly need..." Prosser was worried. He thought that one of them wasn't making a lot of sense. +Ford said, "So if you would just like to take it as read that he's actually here, then he and I could slip off down to the pub for half an hour. How does that sound?" +Mr. Prosser thought it sounded perfectly potty. +"That sounds perfectly reasonable," he said in a reassuring tone of voice, wondering who he was trying to reassure. +"And if you want to pop off for a quick one yourself later on," said Ford, "we can always cover up for you in return." +"Thank you very much," said Mr. Prosser who no longer knew how to play this at all, "thank you very much, yes, that's very kind..." He frowned, then smiled, then tried to do both at once, failed, grasped hold of his fur hat and rolled it fitfully round the top of his head. He could only assume that he had just won. +"So," continued Ford Prefect, "if you would just like to come over here and lie down..." +"What?" said Mr. Prosser. +"Ah, I'm sorry," said Ford, "perhaps I hadn't made myself fully clear. Somebody's got to lie in front of the bulldozers haven't they? Or there won't be anything to stop them driving into Mr. Dent's house will there?" +"What?" said Mr. Prosser again. +"It's very simple," said Ford, "my client, Mr. Dent, says that he will stop lying here in the mud on the sole condition that you come and take over from him." +"What are you talking about?" said Arthur, but Ford nudged him with his shoe to be quiet. +"You want me," said Mr. Prosser, spelling out this new thought to himself, "to come and lie there..." +"Yes." +"In front of the bulldozer?" "Yes." +"Instead of Mr. Dent." "Yes." + +"In the mud." +"In, as you say it, the mud." +As soon as Mr. Prosser realized that he was substantially the loser after all, it was as if a weight lifted itself off his shoulders: this was more like the world as he knew it. He sighed. +"In return for which you will take Mr. Dent with you down to the pub?" +"That's it," said Ford. "That's it exactly." +Mr. Prosser took a few nervous steps forward and stopped. "Promise?" +"Promise," said Ford. He turned to Arthur. +"Come on," he said to him, "get up and let the man lie down." Arthur stood up, feeling as if he was in a dream. +Ford beckoned to Prosser who sadly, awkwardly, sat down in the mud. He felt that his whole life was some kind of dream and he sometimes wondered whose it was and whether they were enjoying it. The mud folded itself round his bottom and his arms and oozed into his shoes. +Ford looked at him severely. +"And no sneaky knocking down Mr. Dent's house whilst he's away, alright?" he said. +"The mere thought," growled Mr. Prosser, "hadn't even begun to speculate," he continued, settling himself back, "about the merest possibility of crossing my mind." +He saw the bulldozer driver's union representative approaching and let his head sink back and closed his eyes. He was trying to marshal his arguments for proving that he did not now constitute a mental health hazard himself. He was far from certain about this his mind seemed to be full of noise, horses, smoke, and the stench of blood. This always happened when he felt miserable and put upon, and he had never been able to explain it to himself. In a high dimension of which we know nothing the mighty Khan bellowed with rage, but Mr. Prosser only trembled slightly and whimpered. He began to fell little pricks of water behind the eyelids. Bureaucratic cock-ups, angry men lying in the mud, indecipherable strangers handing out inexplicable humiliations and an unidentified army of horsemen laughing at him in his head what a day. + +What a day. Ford Prefect knew that it didn't matter a pair of +dingo's kidneys whether Arthur's house got knocked down or not now. +Arthur remained very worried. +"But can we trust him?" he said. +"Myself I'd trust him to the end of the Earth," said Ford. +"Oh yes," said Arthur, "and how far's that?" +"About twelve minutes away," said Ford, "come on, I need a drink." diff --git a/Aufgabe_6/code/huffman.cabal b/Aufgabe_6/code/huffman.cabal new file mode 100644 index 0000000..7a058de --- /dev/null +++ b/Aufgabe_6/code/huffman.cabal @@ -0,0 +1,93 @@ +cabal-version: 1.12 + +-- This file has been generated from package.yaml by hpack version 0.35.2. +-- +-- see: https://github.com/sol/hpack + +name: huffman +version: 0.1 +synopsis: huffman +license: BSD3 +build-type: Simple + +flag test-mode + description: By default, do not run instructor tests + manual: True + default: False + +library + exposed-modules: + Huffman + Auxiliaries + other-modules: + Paths_huffman + hs-source-dirs: + src + default-extensions: + ScopedTypeVariables + ghc-options: -Werror -W -fwarn-unused-imports -fwarn-unused-binds -fwarn-orphans -fwarn-unused-matches -fwarn-unused-do-bind -fwarn-wrong-do-bind -fwarn-missing-signatures -fno-warn-partial-type-signatures -Wredundant-constraints -rtsopts + build-depends: + base + , binary + , bytestring + , containers + , filepath + default-language: Haskell2010 + if flag(test-mode) + build-depends: + bytestring + , directory + , filepath + , haskell-src-meta + , main-tester + , template-haskell + else + +executable huffman-exe + main-is: Main.hs + other-modules: + Paths_huffman + hs-source-dirs: + exe + default-extensions: + ScopedTypeVariables + ghc-options: -Werror -W -fwarn-unused-imports -fwarn-unused-binds -fwarn-orphans -fwarn-unused-matches -fwarn-unused-do-bind -fwarn-wrong-do-bind -fwarn-missing-signatures -fno-warn-partial-type-signatures -Wredundant-constraints -rtsopts + build-depends: + base + , huffman + default-language: Haskell2010 + if flag(test-mode) + build-depends: + bytestring + , directory + , filepath + , haskell-src-meta + , main-tester + , template-haskell + else + +test-suite unit-tests + type: exitcode-stdio-1.0 + main-is: Tests.hs + other-modules: + Paths_huffman + hs-source-dirs: + test + default-extensions: + ScopedTypeVariables + ghc-options: -Werror -W -fwarn-unused-imports -fwarn-unused-binds -fwarn-orphans -fwarn-unused-matches -fwarn-unused-do-bind -fwarn-wrong-do-bind -fwarn-missing-signatures -fno-warn-partial-type-signatures -Wredundant-constraints -rtsopts + build-depends: + HUnit + , base + , containers + , huffman + default-language: Haskell2010 + if flag(test-mode) + build-depends: + bytestring + , directory + , filepath + , haskell-src-meta + , main-tester + , template-haskell + else diff --git a/Aufgabe_6/code/package.yaml b/Aufgabe_6/code/package.yaml new file mode 100755 index 0000000..343fcb4 --- /dev/null +++ b/Aufgabe_6/code/package.yaml @@ -0,0 +1,64 @@ +name: huffman +version: 0.1 +synopsis: huffman +license: BSD3 + +library: + exposed-modules: + - Huffman + - Auxiliaries + source-dirs: src + dependencies: + - base + - containers + - bytestring + - binary + - filepath + +executables: + huffman-exe: + main: Main.hs + source-dirs: exe + dependencies: + - base + - huffman + +tests: + unit-tests: + main: Tests.hs + source-dirs: test + dependencies: + - base + - HUnit + - containers + - huffman + +ghc-options: + - -Werror -W -fwarn-unused-imports -fwarn-unused-binds -fwarn-orphans + - -fwarn-unused-matches -fwarn-unused-do-bind -fwarn-wrong-do-bind + - -fwarn-missing-signatures -fno-warn-partial-type-signatures + - -Wredundant-constraints -rtsopts + +default-extensions: + - ScopedTypeVariables + +# Setup for running tests in praktomat + +flags: + test-mode: + description: "By default, do not run instructor tests" + manual: true + default: false + +when: +- condition: flag(test-mode) + then: + dependencies: + - template-haskell + - haskell-src-meta + - filepath + - bytestring + - directory + - main-tester + else: + dependencies: [] diff --git a/Aufgabe_6/code/src/Auxiliaries.hs b/Aufgabe_6/code/src/Auxiliaries.hs new file mode 100755 index 0000000..9f6920f --- /dev/null +++ b/Aufgabe_6/code/src/Auxiliaries.hs @@ -0,0 +1,84 @@ +module Auxiliaries ( + Bit(..), Bitlist(..), FileContent(..), + binaryToFile, binaryFromFile, fromWord8, toWord8 +) where + +import Data.Word +import qualified Data.ByteString as BS +import qualified Data.ByteString.Lazy as BSL +import qualified Data.Binary as B + +data Bit = Zero | One + deriving (Eq, Show) + +newtype Bitlist = Bitlist [Bit] + +instance B.Binary Bitlist where + put (Bitlist l) = + do B.put (length l) + B.put (bitsToByteString l) + get = + do n <- B.get + bs <- B.get + let bits = byteStringToBits n bs + return (Bitlist bits) + +data FileContent + = FileContent + { fc_codingTable :: [(Char, Bitlist)] + , fc_content :: Bitlist } + +instance B.Binary FileContent where + put (FileContent table bits) = + do B.put table + B.put bits + get = + do table <- B.get + bits <- B.get + return (FileContent table bits) + +byteStringToBits :: Int -> BS.ByteString -> [Bit] +byteStringToBits n bs = + let allBits = concatMap fromWord8 (BS.unpack bs) + in take n allBits -- remove padding bits + +-- bitsToByteString pads the last Word8 in the resulting bytestring with zeros. +bitsToByteString :: [Bit] -> BS.ByteString +bitsToByteString topBits = BS.pack (toWord8List topBits) + where + toWord8List [] = [] + toWord8List bits = + let (prefix, suffix) = splitAt 8 bits + in toWord8 prefix : toWord8List suffix + +-- to list of bits must have <= 8 elements +toWord8 :: [Bit] -> Word8 +toWord8 bits = go 7 bits + where + go :: Int -> [Bit] -> Word8 + go _ [] = 0 + go i (Zero:rest) = go (i - 1) rest + go i (One:rest) = 2^i + go (i - 1) rest + +fromWord8 :: Word8 -> [Bit] +fromWord8 word = go 7 word + where + go :: Int -> Word8 -> [Bit] + go i w + | i < 0 = [] + | otherwise = + let x = 2^i + this = w `div` x + rest = w `mod` x + bit = if this == 0 then Zero else One + in bit : go (i - 1) rest + +binaryToFile :: B.Binary a => FilePath -> a -> IO () +binaryToFile path x = do + let bs = BSL.toStrict (B.encode x) + BS.writeFile path bs + +binaryFromFile :: B.Binary a => FilePath -> IO a +binaryFromFile path = do + bs <- BS.readFile path + pure (B.decode (BSL.fromStrict bs)) diff --git a/Aufgabe_6/code/src/Huffman.hs b/Aufgabe_6/code/src/Huffman.hs new file mode 100755 index 0000000..6f12509 --- /dev/null +++ b/Aufgabe_6/code/src/Huffman.hs @@ -0,0 +1,59 @@ +module Huffman where + +--import qualified Data.List as List + +import qualified Data.Map.Strict as Map +import Auxiliaries -- defines Bit +type Map = Map.Map +type CodingTable = Map Char [Bit] + +----------------------------------------------------------------------- +-- Aufgabe 2 +----------------------------------------------------------------------- + +data Node = Leaf Char Integer | Inner Node Node Integer +data HTree = Root Node + +exercise1TreeValid :: HTree +exercise1TreeValid = Root (Inner (Inner (Leaf 'E' 158) (Inner (Leaf 'N' 97) (Leaf 'I' 82) 179) 337) (Inner (Inner (Leaf 'R' 77) (Leaf 'S' 67) 144) (Inner (Leaf 'T' 64) (Leaf 'A' 61) 125) 269) 606) + +exercise1TreeInvalid :: HTree +exercise1TreeInvalid = + Root (Inner (Leaf 'A' 21) (Leaf 'B' 20) 42) + +----------------------------------------------------------------------- +-- Aufgabe 3 +----------------------------------------------------------------------- + +isConsistent :: HTree -> Bool +isConsistent (Root node) = + case node of + Leaf _ _ -> True + Inner left right frequency -> + case left of + Leaf _ leftFrequency -> + case right of + Leaf _ rightFrequency -> frequency == leftFrequency + rightFrequency + Inner _ _ rightFrequency -> frequency == leftFrequency + rightFrequency && isConsistent (Root right) + Inner _ _ leftFrequency -> + case right of + Leaf _ rightFrequency -> frequency == leftFrequency + rightFrequency && isConsistent (Root left) + Inner _ _ rightFrequency -> frequency == leftFrequency + rightFrequency && isConsistent (Root left) && isConsistent (Root right) + +----------------------------------------------------------------------- +-- Aufgabe 4 +----------------------------------------------------------------------- +toCodingTable :: HTree -> CodingTable +toCodingTable (Root node) = + case node of + Leaf char _ -> singleton char [Zero] + Inner _ _ _ -> fromList toCodingTableList (Root node) + +toCodingTableList :: HTree -> [(Char,[Bit])] +toCodingTableList (Root node) = + case node of + Leaf char _ -> [(char,[Zero])] + Inner left right frequency -> + +--type Map = Map.Map +--type CodingTable = Map Char [Bit] \ No newline at end of file diff --git a/Aufgabe_6/code/stack.yaml b/Aufgabe_6/code/stack.yaml new file mode 100755 index 0000000..ba6a80f --- /dev/null +++ b/Aufgabe_6/code/stack.yaml @@ -0,0 +1,3 @@ +resolver: lts-21.14 +packages: +- . diff --git a/Aufgabe_6/code/stack.yaml.lock b/Aufgabe_6/code/stack.yaml.lock new file mode 100644 index 0000000..31decf5 --- /dev/null +++ b/Aufgabe_6/code/stack.yaml.lock @@ -0,0 +1,12 @@ +# This file was autogenerated by Stack. +# You should not edit this file by hand. +# For more information, please see the documentation at: +# https://docs.haskellstack.org/en/stable/lock_files + +packages: [] +snapshots: +- completed: + sha256: 60e54c1ba3c1e7163acf6dafa9d56b2d3b23f88a31ad53a1c9d888f32561f8da + size: 639819 + url: https://raw.githubusercontent.com/commercialhaskell/stackage-snapshots/master/lts/21/14.yaml + original: lts-21.14 diff --git a/Aufgabe_6/code/test/Tests.hs b/Aufgabe_6/code/test/Tests.hs new file mode 100755 index 0000000..b113e89 --- /dev/null +++ b/Aufgabe_6/code/test/Tests.hs @@ -0,0 +1,48 @@ +module Main where + +import Huffman +import Test.HUnit + +test_isConsistent :: IO () +test_isConsistent = do + assertEqual "test1_Valid_tree" True (isConsistent exercise1TreeValid) + assertEqual "test2_Invalid_tree" False (isConsistent exercise1TreeInvalid) + +test_toCodingTable :: IO () +test_toCodingTable = pure () + +test_encode :: IO () +test_encode = pure () + +test_decode :: IO () +test_decode = pure () + +test_buildHTree :: IO () +test_buildHTree = pure () + +test_toDecodeTree :: IO () +test_toDecodeTree = pure () + +test_toFromWord8 :: IO () +test_toFromWord8 = pure () + +test_encodeDecodeFile :: IO () +test_encodeDecodeFile = pure () + +allTests :: Test +allTests = + TestList + [ mkTest "toCodingTable" test_toCodingTable + , mkTest "encode" test_encode + , mkTest "isConsistent" test_isConsistent + , mkTest "decode" test_decode + , mkTest "buildHTree" test_buildHTree + , mkTest "toDecodeTree" test_toDecodeTree + , mkTest "toFromWord8" test_toFromWord8 + , mkTest "encodeDecodeFile" test_encodeDecodeFile + ] + where + mkTest label ass = TestLabel label (TestCase ass) + +main :: IO () +main = runTestTTAndExit allTests diff --git a/Aufgabe_6/huffman.pdf b/Aufgabe_6/huffman.pdf new file mode 100755 index 0000000..89a47de Binary files /dev/null and b/Aufgabe_6/huffman.pdf differ