Skip to content

Update to GHC-9.6.4 #7

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 4 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
40 changes: 40 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,40 @@
name: CI

on: [push, pull_request]

jobs:
build:
runs-on: ubuntu-latest
strategy:
matrix:
ghc: ['8.4.4', '8.6.5', '9.0.2', '9.2.8', '9.4.8', '9.6.6', '9.8.4']
env:
STACK_YAML: stack-ghc${{ matrix.ghc }}.yaml
steps:
- name: Checkout Repository
uses: actions/checkout@v4

- name: Setup Haskell
uses: haskell-actions/setup@v2
id: setup-haskell
with:
ghc-version: ${{ matrix.ghc }}
enable-stack: true
stack-version: 'latest'

- name: Cache Haskell Tools
uses: actions/cache@v4
with:
path: |
${{ steps.setup-haskell.outputs.stack-root }}
.stack-work
~/.ghcup
key: ${{ runner.os }}-haskell-${{ matrix.ghc }}-${{ hashFiles(env.STACK_YAML) }}
restore-keys: |
${{ runner.os }}-haskell-${{ matrix.ghc }}-

- name: Build
run: stack build --system-ghc

- name: Test
run: stack test
100 changes: 100 additions & 0 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,100 @@
name: Release

on:
push:
tags:
- 'v*.*.*.*'

jobs:
release:
name: Release Job
runs-on: ubuntu-latest
steps:
- name: Checkout Repository
uses: actions/checkout@v4

# Extract version from the tag; e.g. if GITHUB_REF is "refs/tags/v0.2.1.0",
# this step sets the output "version" to "0.2.1.0".
- name: Extract Version
id: extract_version
run: echo "version=${GITHUB_REF#refs/tags/v}" >> $GITHUB_OUTPUT

- name: Setup Haskell (Cabal)
uses: haskell-actions/setup@v2
with:
ghc-version: '9.8.4'

- name: Cabal Check
run: cabal check

- name: Generate Haddock Documentation
run: cabal haddock --haddock-html --haddock-hoogle --builddir=dist/haddock

- name: Build Source Distribution (Tarball for Hackage)
run: cabal sdist

- name: "Debug: List Documentation Directory"
run: |
echo "Listing documentation directory contents:"
ls -R dist/haddock/build/x86_64-linux/ghc-9.8.4/socket-unix-${{ steps.extract_version.outputs.version }}/doc/html/socket-unix

- name: Zip Haddock Documentation
run: |
cd dist/haddock/build/x86_64-linux/ghc-9.8.4/socket-unix-${{ steps.extract_version.outputs.version }}/doc/html/socket-unix
echo "Current directory contents before zipping:"
ls -la
# Zip only the contents of this directory into documentation.zip placed at the repository root.
zip -r ../../../../../../../../../documentation.zip .

- name: Create GitHub Release and Upload Assets
uses: ncipollo/release-action@v1
with:
tag: ${{ github.ref }}
name: Release ${{ steps.extract_version.outputs.version }}
artifacts: |
dist-newstyle/sdist/*.tar.gz
documentation.zip

- name: "Debug: List Publish Directory"
run: |
echo "Listing publish directory contents:"
ls -R dist/haddock/build/x86_64-linux/ghc-9.8.4/socket-unix-${{ steps.extract_version.outputs.version }}/doc/html/socket-unix

- name: Deploy Haddock Documentation to GitHub Pages
uses: peaceiris/actions-gh-pages@v3
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
publish_branch: gh-pages
publish_dir: dist/haddock/build/x86_64-linux/ghc-9.8.4/socket-unix-${{ steps.extract_version.outputs.version }}/doc/html/socket-unix
destination_dir: ${{ steps.extract_version.outputs.version }}

update-index:
name: Update Documentation Index
runs-on: ubuntu-latest
needs: release
steps:
- name: Checkout gh-pages branch
uses: actions/checkout@v4
with:
ref: gh-pages
- name: Set up Git user
run: |
git config user.name "github-actions[bot]"
git config user.email "github-actions[bot]@users.noreply.github.com"
- name: "Debug: List gh-pages Root"
run: |
echo "Listing gh-pages branch root:"
ls -R
- name: Update Documentation Index
run: |
chmod +x ./scripts/generate-index.sh
./scripts/generate-index.sh
echo "After running generate-index.sh, listing files:"
ls -la
git add index.html
if ! git diff --cached --exit-code; then
git commit -m "Update documentation index"
git push origin gh-pages
else
echo "No changes to index.html"
fi
48 changes: 48 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,48 @@
# Changelog

## [0.2.1.0] - 2025-03-20
- Updated repository URL to [https://github.com/flip111/haskell-socket-unix](https://github.com/flip111/haskell-socket-unix).
- Package builds with GHC versions 8.4.4 (lts-12.26) to 9.8.4 (lts-23.15)

## [v0.2.0.0] - 2017-02-25

- Release 0.2 be311e0 by VyacheslavHashov
- Adoptions for socket-0.8.0.0 f5e5940 by VyacheslavHashov
- Added default -O2 bd7d21d by VyacheslavHashov
- Changed resolver to lts-8.0 059844c by VyacheslavHashov

## [v0.1.1.0] - 2017-01-22

- Added note in readme about os x fc3d276 by VyacheslavHashov
- Updated stack.yaml to ghc 8.0.2 0b1a768 by VyacheslavHashov
- Refactored tests 299d65d by VyacheslavHashov
- Travis file for Unix 2f8ebc4 by VyacheslavHashov
- Specific linux tests moved to separate directory 85e9f9e by VyacheslavHashov
- Support for OS X and Unix systems 7e3ffa2 by VyacheslavHashov
- Moved linux-specific code into separate directory 2ab662b by VyacheslavHashov

## [v0.1.0.0] - 2017-01-10

- Added eNoEntry exception 8b7bab5 by VyacheslavHashov
- Fixed synopsis 08f965c by VyacheslavHashov
- Added synopsis in .cabal c31d3b6 by VyacheslavHashov
- Fixed description in .cabal 8a4b0fd by VyacheslavHashov
- Update README.md fa8b3af by Vyacheslav Hashov
- Added haddocks 6fa0e3b by VyacheslavHashov
- Set bounds for dependcies 6ac7012 by VyacheslavHashov
- Fixed stack filename 69f4940 by VyacheslavHashov
- Test on ghc 7.10.3 a0ef25c by VyacheslavHashov
- Split test-suite into default and threaded 6565601 by VyacheslavHashov
- Refactor source ee904a1 by VyacheslavHashov
- Refactor tests 02bbaef by VyacheslavHashov
- Option for not running tests in parallel 26f92f3 by VyacheslavHashov
- Added CI 86f63ec by VyacheslavHashov
- Tests for datagram sockets ba9aef0 by VyacheslavHashov
- Storable peek function for SocketAddress Unix 963226b by VyacheslavHashov
- Server/client tests contain send\recv 8eaa722 by VyacheslavHashov
- Test for sockets with address in abstract namespace 1870377 by VyacheslavHashov
- Tests for common unix domain sockets db5281f by VyacheslavHashov
- Support for common unix socket address and linux abstract namespace b1cce4d by VyacheslavHashov
- Base version d7ca652 by VyacheslavHashov
- Backbone 409def1 by VyacheslavHashov
- Initial commit 85259ee by Vyacheslav Hashov
22 changes: 11 additions & 11 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,9 +1,15 @@
[![Available on Hackage][badge-hackage]][hackage]
[![License MIT][badge-license]][license]
[![Build Status][badge-travis]][travis]
[![Available on Hackage](https://img.shields.io/hackage/v/socket-unix.svg?dummy)](https://hackage.haskell.org/package/socket-unix)
[![License MIT](https://img.shields.io/badge/license-MIT-blue.svg?dummy)](https://github.com/flip111/haskell-socket-unix/blob/master/LICENSE)
[![Build Status](https://github.com/flip111/haskell-socket-unix/actions/workflows/ci.yml/badge.svg)](https://github.com/flip111/haskell-socket-unix/actions)
[![Stackage LTS](https://stackage.org/package/socket-unix/badge/lts)](https://stackage.org/package/socket-unix)
[![GitHub release](https://img.shields.io/github/release/flip111/haskell-socket-unix.svg)](https://github.com/flip111/haskell-socket-unix/releases)

# socket-unix
A Unix domain socket API for the [socket](https://github.com/lpeterse/haskell-socket) library.

This is a fork maintained at [GitHub](https://github.com/flip111/haskell-socket-unix).
Please refer to this repository for the latest updates, issue tracking, and contributions.

## Usage
Creating the Unix domain socket:
```haskell
Expand All @@ -20,15 +26,9 @@ address <- case socketAddressUnixPath "example.sock" of
Just addr -> pure addr
Nothing -> putStrLn "invalid pathname for socket"
```

### Symlinks
Binding to a socket with a filename creates a socket in the filesystem, but does not unlink it after `close` called. You should handle deleting links yourself.

## Portability
Linux and OS X are supported.


[badge-travis]: https://img.shields.io/travis/VyacheslavHashov/haskell-socket-unix.svg
[travis]: https://travis-ci.org/VyacheslavHashov/haskell-socket-unix
[badge-hackage]: https://img.shields.io/hackage/v/socket-unix.svg?dummy
[hackage]: https://hackage.haskell.org/package/socket-unix
[badge-license]: https://img.shields.io/badge/license-MIT-blue.svg?dummy
[license]: https://github.com/vyacheslavhashov/haskell-socket-unix/blob/master/LICENSE
67 changes: 36 additions & 31 deletions socket-unix.cabal
Original file line number Diff line number Diff line change
@@ -1,18 +1,23 @@
cabal-version: 2.2

name: socket-unix
version: 0.2.0.0
version: 0.2.1.0
synopsis: Unix domain sockets
description: A Unix domain socket extension for the socket library
homepage: https://github.com/vyacheslavhashov/haskell-socket-unix#readme
license: MIT
homepage: https://github.com/flip111/haskell-socket-unix#readme
license: MIT
license-file: LICENSE
author: Vyacheslav Hashov
maintainer: vyacheslavhashov@gmail.com
author: flip111, Vyacheslav Hashov
maintainer: flip101@gmail.com, vyacheslavhashov@gmail.com
copyright: 2017 Vyacheslav Hashov
category: System, Network
stability: Experimental
build-type: Simple
extra-source-files: README.md
cabal-version: >=1.10
extra-source-files: README.md CHANGELOG.md

source-repository head
type: git
location: https://github.com/flip111/haskell-socket-unix

library
hs-source-dirs: src
Expand All @@ -23,11 +28,13 @@ library
exposed-modules: System.Socket.Family.Unix
other-modules: System.Socket.Family.Unix.Internal
System.Socket.Family.Unix.Platform
build-depends: base >= 4.7 && < 5
, socket >= 0.8.0.0 && < 0.9.0.0
, bytestring >= 0.10.0.0 && < 0.11
build-depends:
base >= 4.11 && < 5
, socket == 0.8.3.0
, bytestring >= 0.10 && < 0.13

ghc-options: -Wall -O2
ghc-options:
-Wall
default-language: Haskell2010

test-suite default
Expand All @@ -40,14 +47,15 @@ test-suite default
main-is: test.hs
other-modules: Internal
Platform
build-depends: base >= 4.7 && < 5
, socket >= 0.8.0.0 && < 0.9.0.0
, socket-unix
, tasty >= 0.11 && < 0.12
, tasty-hunit >= 0.9 && < 0.10
, bytestring >= 0.10.0.0 && < 0.11
, unix >= 2.7 && < 3.0
, async >= 2.0 && < 2.3
build-depends:
base >= 4.11 && < 5
, socket == 0.8.3.0
, socket-unix
, tasty >= 1.1 && < 1.6
, tasty-hunit >= 0.10 && < 0.11
, bytestring >= 0.10 && < 0.13
, unix >= 2.7 && < 2.9
, async >= 2.2 && < 2.3
default-language: Haskell2010

test-suite threaded
Expand All @@ -60,17 +68,14 @@ test-suite threaded
main-is: test.hs
other-modules: Internal
Platform
build-depends: base >= 4.7 && < 5
, socket >= 0.8.0.0 && < 0.9.0.0
, socket-unix
, tasty >= 0.11 && < 0.12
, tasty-hunit >= 0.9 && < 0.10
, bytestring >= 0.10.0.0 && < 0.11
, unix >= 2.7 && < 3.0
, async >= 2.0 && < 2.3
build-depends:
base >= 4.11 && < 5
, socket == 0.8.3.0
, socket-unix
, tasty >= 1.1 && < 1.6
, tasty-hunit >= 0.10 && < 0.11
, bytestring >= 0.10 && < 0.13
, unix >= 2.7 && < 2.9
, async >= 2.2 && < 2.3
ghc-options: -threaded
default-language: Haskell2010

source-repository head
type: git
location: https://github.com/vyacheslavhashov/haskell-socket-unix
14 changes: 14 additions & 0 deletions stack-ghc8.4.4.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
resolver: lts-12.26

packages:
- '.'

extra-deps:
- socket-0.8.3.0

# Override default flag values for local packages and extra-deps
flags: {}

# Extra package databases containing global packages
extra-package-dbs: []

14 changes: 14 additions & 0 deletions stack-ghc8.6.5.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
resolver: lts-14.27

packages:
- '.'

extra-deps:
- socket-0.8.3.0

# Override default flag values for local packages and extra-deps
flags: {}

# Extra package databases containing global packages
extra-package-dbs: []

7 changes: 3 additions & 4 deletions stack-ghc7.10.3.yaml → stack-ghc9.0.2.yaml
Original file line number Diff line number Diff line change
@@ -1,13 +1,12 @@
resolver: lts-6.27
resolver: lts-19.33

packages:
- '.'
- '.'
extra-deps:
- socket-0.8.0.0
- socket-0.8.3.0

# Override default flag values for local packages and extra-deps
flags: {}

# Extra package databases containing global packages
extra-package-dbs: []

7 changes: 3 additions & 4 deletions stack-ghc8.0.2.yaml → stack-ghc9.2.8.yaml
Original file line number Diff line number Diff line change
@@ -1,13 +1,12 @@
resolver: lts-8.0
resolver: lts-20.26

packages:
- '.'
- '.'
extra-deps:
- socket-0.8.0.0
- socket-0.8.3.0

# Override default flag values for local packages and extra-deps
flags: {}

# Extra package databases containing global packages
extra-package-dbs: []

Loading