<pre style='margin:0'>
Renee Otten (reneeotten) pushed a commit to branch master
in repository macports-ports.
</pre>
<p><a href="https://github.com/macports/macports-ports/commit/99605e547db9458464f394f46884142472cc65b9">https://github.com/macports/macports-ports/commit/99605e547db9458464f394f46884142472cc65b9</a></p>
<pre style="white-space: pre; background: #F8F8F8">The following commit(s) were added to refs/heads/master by this push:
<span style='display:block; white-space:pre;color:#404040;'> new 99605e547db haskell-language-server: Submission
</span>99605e547db is described below
<span style='display:block; white-space:pre;color:#808000;'>commit 99605e547db9458464f394f46884142472cc65b9
</span>Author: Steven Thomas Smith <s.t.smith@ieee.org>
AuthorDate: Fri Feb 2 20:29:10 2024 -0500
<span style='display:block; white-space:pre;color:#404040;'> haskell-language-server: Submission
</span>---
devel/haskell-language-server/Portfile | 162 ++++++++++++++++++++++
devel/haskell-language-server/files/Paths_NAME.hs | 62 +++++++++
2 files changed, 224 insertions(+)
<span style='display:block; white-space:pre;color:#808080;'>diff --git a/devel/haskell-language-server/Portfile b/devel/haskell-language-server/Portfile
</span>new file mode 100644
<span style='display:block; white-space:pre;color:#808080;'>index 00000000000..69eba960a9a
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>--- /dev/null
</span><span style='display:block; white-space:pre;background:#e0e0ff;'>+++ b/devel/haskell-language-server/Portfile
</span><span style='display:block; white-space:pre;background:#e0e0e0;'>@@ -0,0 +1,162 @@
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+# -*- coding: utf-8; mode: tcl; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- vim:fenc=utf-8:ft=tcl:et:sw=4:ts=4:sts=4
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+PortSystem 1.0
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+PortGroup haskell_cabal 1.0
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+name haskell-language-server
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+version 2.6.0.0
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+revision 0
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+categories devel haskell
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+maintainers nomaintainer
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+license GPL-3
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+description Official haskell ide support via language server (LSP).
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+long_description The haskell-language-server (HLS) project is an \
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ implementation of a server (a \"language server\") \
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ for the Language Server Protocol (LSP). A language \
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ server talks to a client (typically an editor), \
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ which can ask the server to perform various \
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ operations, such as reporting errors or providing \
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ code completions. The advantage of this system is \
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ that clients and servers can interoperate more \
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ easily so long as they all speak the LSP \
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ protocol. In the case of HLS, that means that it \
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ can be used with many different editors, since \
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ editor support for the LSP protocol is now \
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ widespread.
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+homepage https://hackage.haskell.org/package/haskell-language-server
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+master_sites https://hackage.haskell.org/package/${name}-${version}
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+checksums rmd160 66c0d520c28d2a8e4a1ca0e3665f2aa73ed75582 \
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ sha256 3655b8d741616f8e32d0181274f80a48d9b8dca47d3fd22675cadfa01ca80e48 \
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ size 80146
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+set name_underscore [string map {- _} ${name}]
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+set paths_name_underscore src/Paths_${name_underscore}.hs
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+# relative paths to ${prefix}
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+set hls_libdir lib/${distname}
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+set hls_docdir share/doc/${distname}/html
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+post-extract {
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ # Fix for cabal data-files hardcoded path in binary
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ # See:
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ # https://github.com/commercialhaskell/stack/issues/848
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ # https://github.com/commercialhaskell/stack/issues/4857
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ # https://github.com/haskell/cabal/issues/462
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ # https://github.com/haskell/cabal/issues/3586
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ xinstall -m 0644 -W ${worksrcpath} \
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ ${filespath}/Paths_NAME.hs ${paths_name_underscore}
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ reinplace "s|@PREFIX@|${prefix}|g" \
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ ${worksrcpath}/${paths_name_underscore}
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ reinplace "s|@NAME@|${name_underscore}|g" \
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ ${worksrcpath}/${paths_name_underscore}
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ reinplace "s|@DISTNAME@|${distname}|g" \
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ ${worksrcpath}/${paths_name_underscore}
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ # this regexp replaces the hardcoded version expressed as a Haskell [Num]
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ reinplace -E "s|(Version\[\[:space:\]\]+)\\\[\[\[:digit:\]\]+\[\[:space:\]\]*(,\[\[:space:\]\]*\[\[:digit:\]\]+){1,4}\[\[:space:\]\]*\\\]|\\1\[[join [split ${version} .] ,]\]|" \
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ ${worksrcpath}/${paths_name_underscore}
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+}
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+depends_build-append \
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ port:file
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+# see ${name}.cabal for build specifics
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+# install depends on ghc version libraries, not simply `path:bin/ghc:ghc`
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+depends_lib-append port:ghc
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+build.target
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+build.post_args-prepend \
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ -fdynamic
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+set hls_build_binary {}
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+set hls_build_doc {}
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+pre-destroot {
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ set hls_build_binary \
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ [glob -nocomplain ${workpath}/dist/build/*/ghc-*/${name}-${version}/x/${name}/build/${name}/${name}]
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ set hls_build_doc \
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ [glob -nocomplain ${workpath}/dist/build/*/ghc-*/${name}-${version}/doc/html/${name}]
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+}
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+destroot {
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ xinstall -d ${destroot}${prefix}/${hls_libdir} \
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ ${destroot}${prefix}/${hls_docdir}
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ xinstall -m 0755 ${hls_build_binary} \
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ ${destroot}${prefix}/bin/${name}
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ # fix and install all libraries
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ shared_library_chase \
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ ${destroot}${prefix}/bin/${name} \
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ ${prefix}/${hls_libdir} \
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ {@rpath/libHS.+\.dylib}
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ # documentation
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ foreach f [glob ${hls_build_doc}/*.{css,html,json,png}] {
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ xinstall -m 0644 ${f} ${destroot}${prefix}/${hls_docdir}
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ }
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ # delete any destroot path appearing in text files
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ fs-traverse f ${destroot}${prefix} {
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ if {[file_is_ascii ${f}]} {
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ reinplace -q "s|${destroot}||g" ${f}
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ }
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ }
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+}
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+notes "The Haskell Language Server (HLS) User Manual is available at:
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+file://${prefix}/${hls_docdir}/index.html"
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+proc file_is_ascii { fname } {
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ return [expr \
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ [file isfile ${fname}] \
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ && [expr [string match {text/*} \
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ [lindex [exec file --mime-type ${fname}] end]] \
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ || ![expr [lsearch -nocase \
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ [lrange [exec file ${fname}] 1 end] ascii] < 0]]]
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+}
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+# get the objdump rpath names that match ${workpath} in the binary
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+proc get_workpath_list { binname } {
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ global workpath
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ return [exec bash -c "otool -l \"${binname}\" 2>/dev/null \
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ | grep -E -A 2 -e '\[\[:space:]]+cmd\[\[:space:]]+LC_RPATH' \
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ | grep -E -e '\[\[:space:]]+path\[\[:space:]]+' \
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ | grep -E -o -e '(${workpath}\[^ ]+)' || true"]
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+}
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+# install the DAG of shared libraries into ${libdir}, delete ${workpath} dirs
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+proc shared_library_chase { binname libdir rpath_re } {
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ global destroot
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ set workpath_list [get_workpath_list ${binname}]
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ foreach path [lreverse ${workpath_list}] {
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ system "install_name_tool -delete_rpath \"${path}\" \"${binname}\""
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ }
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ system "install_name_tool -add_rpath \"${libdir}\" \"${binname}\""
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ foreach rpath [exec bash -c \
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ "otool -L \"${binname}\" | grep -E -o -e '${rpath_re}' || true"] {
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ set libname [strsed ${rpath} "s|^@rpath/||"]
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ set libpath ${libdir}/${libname}
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ set builtlib {}
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ foreach path ${workpath_list} {
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ if { [file exists ${path}/${libname}]
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ && [file isfile ${path}/${libname}] } {
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ set builtlib ${path}/${libname}
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ break
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ }
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ }
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ if { ${builtlib} ne {}
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ && ![file exists ${destroot}${libpath}] } {
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ xinstall -m 0644 ${builtlib} ${destroot}${libpath}
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ shared_library_chase \
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ ${destroot}${libpath} \
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ ${libdir} ${rpath_re}
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ }
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ }
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+}
</span><span style='display:block; white-space:pre;color:#808080;'>diff --git a/devel/haskell-language-server/files/Paths_NAME.hs b/devel/haskell-language-server/files/Paths_NAME.hs
</span>new file mode 100644
<span style='display:block; white-space:pre;color:#808080;'>index 00000000000..18c2818d556
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>--- /dev/null
</span><span style='display:block; white-space:pre;background:#e0e0ff;'>+++ b/devel/haskell-language-server/files/Paths_NAME.hs
</span><span style='display:block; white-space:pre;background:#e0e0e0;'>@@ -0,0 +1,62 @@
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+{- Cabal data-files hardcoded path in binary fix.
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+This file replaces the Paths_*.hs automatically created by cabal.
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+See:
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+* https://github.com/commercialhaskell/stack/issues/848
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+* https://github.com/commercialhaskell/stack/issues/4857
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+* https://github.com/haskell/cabal/issues/462
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+* https://github.com/haskell/cabal/issues/3586
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+-}
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+{-# LANGUAGE CPP #-}
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+{-# LANGUAGE NoRebindableSyntax #-}
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+{-# OPTIONS_GHC -fno-warn-missing-import-lists #-}
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+module Paths_@NAME@ (
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ version,
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ getBinDir, getLibDir, getDynLibDir, getDataDir, getLibexecDir,
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ getDataFileName, getSysconfDir
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ ) where
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+import qualified Control.Exception as Exception
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+import Data.Version (Version(..))
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+import System.Environment (getEnv)
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+import Prelude
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+#if defined(VERSION_base)
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+#if MIN_VERSION_base(4,0,0)
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+catchIO :: IO a -> (Exception.IOException -> IO a) -> IO a
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+#else
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+catchIO :: IO a -> (Exception.Exception -> IO a) -> IO a
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+#endif
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+#else
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+catchIO :: IO a -> (Exception.IOException -> IO a) -> IO a
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+#endif
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+catchIO = Exception.catch
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+version :: Version
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+version = Version [2,0,0,0] []
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+bindir, libdir, dynlibdir, datadir, libexecdir, sysconfdir :: FilePath
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+bindir = "@PREFIX@/bin"
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+libdir = "@PREFIX@/lib/@DISTNAME@"
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+dynlibdir = "@PREFIX@/lib/@DISTNAME@"
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+datadir = "@PREFIX@/share/@DISTNAME@"
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+libexecdir = "@PREFIX@/lib/@DISTNAME@"
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+sysconfdir = "@PREFIX@/etc"
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+getBinDir, getLibDir, getDynLibDir, getDataDir, getLibexecDir, getSysconfDir :: IO FilePath
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+getBinDir = catchIO (getEnv "@NAME@_bindir") (\_ -> return bindir)
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+getLibDir = catchIO (getEnv "@NAME@_libdir") (\_ -> return libdir)
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+getDynLibDir = catchIO (getEnv "@NAME@_dynlibdir") (\_ -> return dynlibdir)
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+getDataDir = catchIO (getEnv "@NAME@_datadir") (\_ -> return datadir)
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+getLibexecDir = catchIO (getEnv "@NAME@_libexecdir") (\_ -> return libexecdir)
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+getSysconfDir = catchIO (getEnv "@NAME@_sysconfdir") (\_ -> return sysconfdir)
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+getDataFileName :: FilePath -> IO FilePath
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+getDataFileName name = do
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ dir <- getDataDir
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ return (dir ++ "/" ++ name)
</span></pre><pre style='margin:0'>
</pre>