代码拉取完成,页面将自动刷新
%global pkg_name happy-lib
%global debug_package %{nil}
%global pkg_version 2.1.3
Name: ghc-%{pkg_name}
Version: %{pkg_version}
Release: 1
Summary: Happy is a parser generator for Haskell implemented using this library
License: BSD-2-Clause
URL: https://hackage.haskell.org/package/happy-lib
Source0: https://hackage.haskell.org/package/happy-lib-%{pkg_version}/happy-lib-%{pkg_version}.tar.gz
Patch0: 0001-Add-Setup-hs.patch
BuildRequires: chrpath
BuildRequires: ghc-bootstrap
%description
Happy is a parser generator for Haskell. Given a grammar specification in BNF, Happy generates Haskell code to parse the grammar. Happy works in a similar way to the yacc tool for C.
This library provides the following functionality:
- Data type definitions for the Grammar AST type, capturing the information in .y-files (Happy.Grammar)
- A parser for happy grammar files (.y) to produce a Grammar (Happy.Frontend.*)
- Implementations of the text book algorithms that compute the LR action and goto tables for the given Grammar (Happy.Tabular.*)
- An LALR code generator to produce table-driven, deterministic parsing code in Haskell (Happy.Backend.LALR.*)
- A (less maintained) GLR code generator to produce table-driven, non-deterministic parsing code in Haskell, where ambiguous parses produce multiple parse trees (Happy.Backend.GLR.*)
This Package is Only for ghc-bootstrap-tools, DO NOT USE IS SEPARATELY.
%prep
%setup -q -n %{pkg_name}-%{version}
%patch -P0 -p1
%build
export PATH=/opt/bin:$PATH
ghc -dynamic Setup.hs -o cabal
./cabal configure --prefix=%{_prefix}
./cabal build
%install
./cabal copy --destdir=%{buildroot}
%files
%defattr (-,root,root,-)
%dir %{_prefix}/lib/
%dir %{_prefix}/share/
%changelog
* Wed Dec 11 2024 ZhaoYu Jiang <jiangzhaoyu@kylinos.cn> - 2.1.3-1
- Initial Package ghc-happy-lib only for ghc-bootstrap-tools.
此处可能存在不合适展示的内容,页面不予展示。您可通过相关编辑功能自查并修改。
如您确认内容无涉及 不当用语 / 纯广告导流 / 暴力 / 低俗色情 / 侵权 / 盗版 / 虚假 / 无价值内容或违法国家有关法律法规的内容,可点击提交进行申诉,我们将尽快为您处理。