✨ try-catch
This commit is contained in:
Binary file not shown.
Binary file not shown.
Binary file not shown.
@ -0,0 +1,25 @@
|
||||
{-# LANGUAGE NoRebindableSyntax #-}
|
||||
{-# OPTIONS_GHC -fno-warn-missing-import-lists #-}
|
||||
{-# OPTIONS_GHC -w #-}
|
||||
module PackageInfo_a4 (
|
||||
name,
|
||||
version,
|
||||
synopsis,
|
||||
copyright,
|
||||
homepage,
|
||||
) where
|
||||
|
||||
import Data.Version (Version(..))
|
||||
import Prelude
|
||||
|
||||
name :: String
|
||||
name = "a4"
|
||||
version :: Version
|
||||
version = Version [1,0,0,0] []
|
||||
|
||||
synopsis :: String
|
||||
synopsis = ""
|
||||
copyright :: String
|
||||
copyright = ""
|
||||
homepage :: String
|
||||
homepage = ""
|
@ -0,0 +1,77 @@
|
||||
{-# LANGUAGE CPP #-}
|
||||
{-# LANGUAGE NoRebindableSyntax #-}
|
||||
#if __GLASGOW_HASKELL__ >= 810
|
||||
{-# OPTIONS_GHC -Wno-prepositive-qualified-module #-}
|
||||
#endif
|
||||
{-# OPTIONS_GHC -fno-warn-missing-import-lists #-}
|
||||
{-# OPTIONS_GHC -w #-}
|
||||
module Paths_a4 (
|
||||
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 [1,0,0,0] []
|
||||
|
||||
getDataFileName :: FilePath -> IO FilePath
|
||||
getDataFileName name = do
|
||||
dir <- getDataDir
|
||||
return (dir `joinFileName` name)
|
||||
|
||||
getBinDir, getLibDir, getDynLibDir, getDataDir, getLibexecDir, getSysconfDir :: IO FilePath
|
||||
|
||||
|
||||
|
||||
|
||||
bindir, libdir, dynlibdir, datadir, libexecdir, sysconfdir :: FilePath
|
||||
bindir = "/home/nikolaj/.cabal/bin"
|
||||
libdir = "/home/nikolaj/.cabal/lib/x86_64-linux-ghc-9.2.8/a4-1.0.0.0-inplace-a4-test"
|
||||
dynlibdir = "/home/nikolaj/.cabal/lib/x86_64-linux-ghc-9.2.8"
|
||||
datadir = "/home/nikolaj/.cabal/share/x86_64-linux-ghc-9.2.8/a4-1.0.0.0"
|
||||
libexecdir = "/home/nikolaj/.cabal/libexec/x86_64-linux-ghc-9.2.8/a4-1.0.0.0"
|
||||
sysconfdir = "/home/nikolaj/.cabal/etc"
|
||||
|
||||
getBinDir = catchIO (getEnv "a4_bindir") (\_ -> return bindir)
|
||||
getLibDir = catchIO (getEnv "a4_libdir") (\_ -> return libdir)
|
||||
getDynLibDir = catchIO (getEnv "a4_dynlibdir") (\_ -> return dynlibdir)
|
||||
getDataDir = catchIO (getEnv "a4_datadir") (\_ -> return datadir)
|
||||
getLibexecDir = catchIO (getEnv "a4_libexecdir") (\_ -> return libexecdir)
|
||||
getSysconfDir = catchIO (getEnv "a4_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 == '/'
|
@ -0,0 +1,140 @@
|
||||
/* DO NOT EDIT: This file is automatically generated by Cabal */
|
||||
|
||||
/* package a4-1.0.0.0 */
|
||||
#ifndef VERSION_a4
|
||||
#define VERSION_a4 "1.0.0.0"
|
||||
#endif /* VERSION_a4 */
|
||||
#ifndef MIN_VERSION_a4
|
||||
#define MIN_VERSION_a4(major1,major2,minor) (\
|
||||
(major1) < 1 || \
|
||||
(major1) == 1 && (major2) < 0 || \
|
||||
(major1) == 1 && (major2) == 0 && (minor) <= 0)
|
||||
#endif /* MIN_VERSION_a4 */
|
||||
/* package a4-1.0.0.0 */
|
||||
#ifndef VERSION_a4
|
||||
#define VERSION_a4 "1.0.0.0"
|
||||
#endif /* VERSION_a4 */
|
||||
#ifndef MIN_VERSION_a4
|
||||
#define MIN_VERSION_a4(major1,major2,minor) (\
|
||||
(major1) < 1 || \
|
||||
(major1) == 1 && (major2) < 0 || \
|
||||
(major1) == 1 && (major2) == 0 && (minor) <= 0)
|
||||
#endif /* MIN_VERSION_a4 */
|
||||
/* package base-4.16.4.0 */
|
||||
#ifndef VERSION_base
|
||||
#define VERSION_base "4.16.4.0"
|
||||
#endif /* VERSION_base */
|
||||
#ifndef MIN_VERSION_base
|
||||
#define MIN_VERSION_base(major1,major2,minor) (\
|
||||
(major1) < 4 || \
|
||||
(major1) == 4 && (major2) < 16 || \
|
||||
(major1) == 4 && (major2) == 16 && (minor) <= 4)
|
||||
#endif /* MIN_VERSION_base */
|
||||
/* package tasty-1.5 */
|
||||
#ifndef VERSION_tasty
|
||||
#define VERSION_tasty "1.5"
|
||||
#endif /* VERSION_tasty */
|
||||
#ifndef MIN_VERSION_tasty
|
||||
#define MIN_VERSION_tasty(major1,major2,minor) (\
|
||||
(major1) < 1 || \
|
||||
(major1) == 1 && (major2) < 5 || \
|
||||
(major1) == 1 && (major2) == 5 && (minor) <= 0)
|
||||
#endif /* MIN_VERSION_tasty */
|
||||
|
||||
/* tool gcc-14.2.1 */
|
||||
#ifndef TOOL_VERSION_gcc
|
||||
#define TOOL_VERSION_gcc "14.2.1"
|
||||
#endif /* TOOL_VERSION_gcc */
|
||||
#ifndef MIN_TOOL_VERSION_gcc
|
||||
#define MIN_TOOL_VERSION_gcc(major1,major2,minor) (\
|
||||
(major1) < 14 || \
|
||||
(major1) == 14 && (major2) < 2 || \
|
||||
(major1) == 14 && (major2) == 2 && (minor) <= 1)
|
||||
#endif /* MIN_TOOL_VERSION_gcc */
|
||||
/* tool ghc-9.2.8 */
|
||||
#ifndef TOOL_VERSION_ghc
|
||||
#define TOOL_VERSION_ghc "9.2.8"
|
||||
#endif /* TOOL_VERSION_ghc */
|
||||
#ifndef MIN_TOOL_VERSION_ghc
|
||||
#define MIN_TOOL_VERSION_ghc(major1,major2,minor) (\
|
||||
(major1) < 9 || \
|
||||
(major1) == 9 && (major2) < 2 || \
|
||||
(major1) == 9 && (major2) == 2 && (minor) <= 8)
|
||||
#endif /* MIN_TOOL_VERSION_ghc */
|
||||
/* tool ghc-pkg-9.2.8 */
|
||||
#ifndef TOOL_VERSION_ghc_pkg
|
||||
#define TOOL_VERSION_ghc_pkg "9.2.8"
|
||||
#endif /* TOOL_VERSION_ghc_pkg */
|
||||
#ifndef MIN_TOOL_VERSION_ghc_pkg
|
||||
#define MIN_TOOL_VERSION_ghc_pkg(major1,major2,minor) (\
|
||||
(major1) < 9 || \
|
||||
(major1) == 9 && (major2) < 2 || \
|
||||
(major1) == 9 && (major2) == 2 && (minor) <= 8)
|
||||
#endif /* MIN_TOOL_VERSION_ghc_pkg */
|
||||
/* tool haddock-2.26.0 */
|
||||
#ifndef TOOL_VERSION_haddock
|
||||
#define TOOL_VERSION_haddock "2.26.0"
|
||||
#endif /* TOOL_VERSION_haddock */
|
||||
#ifndef MIN_TOOL_VERSION_haddock
|
||||
#define MIN_TOOL_VERSION_haddock(major1,major2,minor) (\
|
||||
(major1) < 2 || \
|
||||
(major1) == 2 && (major2) < 26 || \
|
||||
(major1) == 2 && (major2) == 26 && (minor) <= 0)
|
||||
#endif /* MIN_TOOL_VERSION_haddock */
|
||||
/* tool hpc-0.68 */
|
||||
#ifndef TOOL_VERSION_hpc
|
||||
#define TOOL_VERSION_hpc "0.68"
|
||||
#endif /* TOOL_VERSION_hpc */
|
||||
#ifndef MIN_TOOL_VERSION_hpc
|
||||
#define MIN_TOOL_VERSION_hpc(major1,major2,minor) (\
|
||||
(major1) < 0 || \
|
||||
(major1) == 0 && (major2) < 68 || \
|
||||
(major1) == 0 && (major2) == 68 && (minor) <= 0)
|
||||
#endif /* MIN_TOOL_VERSION_hpc */
|
||||
/* tool hsc2hs-0.68.8 */
|
||||
#ifndef TOOL_VERSION_hsc2hs
|
||||
#define TOOL_VERSION_hsc2hs "0.68.8"
|
||||
#endif /* TOOL_VERSION_hsc2hs */
|
||||
#ifndef MIN_TOOL_VERSION_hsc2hs
|
||||
#define MIN_TOOL_VERSION_hsc2hs(major1,major2,minor) (\
|
||||
(major1) < 0 || \
|
||||
(major1) == 0 && (major2) < 68 || \
|
||||
(major1) == 0 && (major2) == 68 && (minor) <= 8)
|
||||
#endif /* MIN_TOOL_VERSION_hsc2hs */
|
||||
/* tool pkg-config-2.1.1 */
|
||||
#ifndef TOOL_VERSION_pkg_config
|
||||
#define TOOL_VERSION_pkg_config "2.1.1"
|
||||
#endif /* TOOL_VERSION_pkg_config */
|
||||
#ifndef MIN_TOOL_VERSION_pkg_config
|
||||
#define MIN_TOOL_VERSION_pkg_config(major1,major2,minor) (\
|
||||
(major1) < 2 || \
|
||||
(major1) == 2 && (major2) < 1 || \
|
||||
(major1) == 2 && (major2) == 1 && (minor) <= 1)
|
||||
#endif /* MIN_TOOL_VERSION_pkg_config */
|
||||
/* tool runghc-9.2.8 */
|
||||
#ifndef TOOL_VERSION_runghc
|
||||
#define TOOL_VERSION_runghc "9.2.8"
|
||||
#endif /* TOOL_VERSION_runghc */
|
||||
#ifndef MIN_TOOL_VERSION_runghc
|
||||
#define MIN_TOOL_VERSION_runghc(major1,major2,minor) (\
|
||||
(major1) < 9 || \
|
||||
(major1) == 9 && (major2) < 2 || \
|
||||
(major1) == 9 && (major2) == 2 && (minor) <= 8)
|
||||
#endif /* MIN_TOOL_VERSION_runghc */
|
||||
/* tool strip-2.43 */
|
||||
#ifndef TOOL_VERSION_strip
|
||||
#define TOOL_VERSION_strip "2.43"
|
||||
#endif /* TOOL_VERSION_strip */
|
||||
#ifndef MIN_TOOL_VERSION_strip
|
||||
#define MIN_TOOL_VERSION_strip(major1,major2,minor) (\
|
||||
(major1) < 2 || \
|
||||
(major1) == 2 && (major2) < 43 || \
|
||||
(major1) == 2 && (major2) == 43 && (minor) <= 0)
|
||||
#endif /* MIN_TOOL_VERSION_strip */
|
||||
|
||||
#ifndef CURRENT_COMPONENT_ID
|
||||
#define CURRENT_COMPONENT_ID "a4-1.0.0.0-inplace-a4-test"
|
||||
#endif /* CURRENT_COMPONENT_ID */
|
||||
#ifndef CURRENT_PACKAGE_VERSION
|
||||
#define CURRENT_PACKAGE_VERSION "1.0.0.0"
|
||||
#endif /* CURRENT_PACKAGE_VERSION */
|
BIN
a4/dist-newstyle/build/x86_64-linux/ghc-9.2.8/a4-1.0.0.0/t/a4-test/cache/build
vendored
Normal file
BIN
a4/dist-newstyle/build/x86_64-linux/ghc-9.2.8/a4-1.0.0.0/t/a4-test/cache/build
vendored
Normal file
Binary file not shown.
BIN
a4/dist-newstyle/build/x86_64-linux/ghc-9.2.8/a4-1.0.0.0/t/a4-test/cache/config
vendored
Normal file
BIN
a4/dist-newstyle/build/x86_64-linux/ghc-9.2.8/a4-1.0.0.0/t/a4-test/cache/config
vendored
Normal file
Binary file not shown.
Binary file not shown.
Binary file not shown.
@ -0,0 +1,3 @@
|
||||
Test suite a4-test: RUNNING...
|
||||
Test suite a4-test: PASS
|
||||
Test suite logged to: /home/nikolaj/Code/KU/2024B1-AP/assignments/a4/dist-newstyle/build/x86_64-linux/ghc-9.2.8/a4-1.0.0.0/t/a4-test/test/a4-1.0.0.0-a4-test.log
|
@ -0,0 +1 @@
|
||||
PackageLog {package = PackageIdentifier {pkgName = PackageName "a4", pkgVersion = mkVersion [1,0,0,0]}, compiler = CompilerId GHC (mkVersion [9,2,8]), platform = Platform X86_64 Linux, testSuites = [TestSuiteLog {testSuiteName = UnqualComponentName "a4-test", testLogs = TestLog {testName = "a4-test", testOptionsReturned = [], testResult = Pass}, logFile = "/home/nikolaj/Code/KU/2024B1-AP/assignments/a4/dist-newstyle/build/x86_64-linux/ghc-9.2.8/a4-1.0.0.0/t/a4-test/test/a4-1.0.0.0-a4-test.log"}]}
|
Reference in New Issue
Block a user