-
Notifications
You must be signed in to change notification settings - Fork 4
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #3 from purescript-node/updates
More updates, including build
- Loading branch information
Showing
7 changed files
with
66 additions
and
44 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,6 @@ | ||
/.* | ||
!/.gitignore | ||
!/.travis.yml | ||
/bower_components/ | ||
/node_modules/ | ||
/.pulp-cache/ | ||
/output/ | ||
/.psci* | ||
/src/.webpack.js |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
language: node_js | ||
dist: trusty | ||
sudo: required | ||
node_js: 6 | ||
install: | ||
- npm install -g bower | ||
- npm install | ||
- bower install | ||
script: | ||
- npm run -s build | ||
after_success: | ||
- >- | ||
test $TRAVIS_TAG && | ||
echo $GITHUB_TOKEN | pulp login && | ||
echo y | pulp publish --no-push |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,16 @@ | ||
# purescript-posix-types | ||
|
||
[![Latest release](http://img.shields.io/github/release/purescript-node/purescript-posix-types.svg)](https://github.com/purescript-node/purescript-posix-types/releases) | ||
[![Build Status](https://travis-ci.org/purescript-node/purescript-posix-types.svg?branch=master)](https://travis-ci.org/purescript-node/purescript-posix-types) | ||
|
||
Basic types for use with bindings to POSIX-style APIs. | ||
|
||
Documentation is [on Pursuit](http://pursuit.purescript.org/packages/purescript-posix-types). | ||
## Installation | ||
|
||
``` | ||
bower install purescript-posix-types | ||
``` | ||
|
||
## Documentation | ||
|
||
Module documentation is [published on Pursuit](http://pursuit.purescript.org/packages/purescript-posix-types). |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
{ | ||
"private": true, | ||
"scripts": { | ||
"clean": "rimraf output && rimraf .pulp-cache", | ||
"build": "pulp build --censor-lib --strict" | ||
}, | ||
"devDependencies": { | ||
"pulp": "^9.0.1", | ||
"purescript-psa": "^0.3.9", | ||
"purescript": "^0.10.1", | ||
"rimraf": "^2.5.4" | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,49 +1,34 @@ | ||
module Data.Posix where | ||
|
||
import Prelude (class Show, show, (<>), class Ord, compare, class Eq, eq) | ||
import Data.Function (on) | ||
import Prelude | ||
import Data.Newtype (class Newtype) | ||
|
||
-- | A process ID. | ||
newtype Pid = Pid Int | ||
|
||
runPid :: Pid -> Int | ||
runPid (Pid x) = x | ||
derive instance newtypePid :: Newtype Pid _ | ||
derive newtype instance eqPid :: Eq Pid | ||
derive newtype instance ordPid :: Ord Pid | ||
|
||
instance showPid :: Show Pid where | ||
show (Pid pid) = "(Pid " <> show pid <> ")" | ||
|
||
instance eqPid :: Eq Pid where | ||
eq = eq `on` runPid | ||
|
||
instance ordPid :: Ord Pid where | ||
compare = compare `on` runPid | ||
|
||
-- | A group ID (for a process or a file). | ||
newtype Gid = Gid Int | ||
|
||
runGid :: Gid -> Int | ||
runGid (Gid x) = x | ||
derive instance newtypeGid :: Newtype Gid _ | ||
derive newtype instance eqGid :: Eq Gid | ||
derive newtype instance ordGid :: Ord Gid | ||
|
||
instance showGid :: Show Gid where | ||
show (Gid gid) = "(Gid " <> show gid <> ")" | ||
|
||
instance eqGid :: Eq Gid where | ||
eq = eq `on` runGid | ||
|
||
instance ordGid :: Ord Gid where | ||
compare = compare `on` runGid | ||
|
||
-- | A user ID (for a process or a file). | ||
newtype Uid = Uid Int | ||
|
||
runUid :: Uid -> Int | ||
runUid (Uid x) = x | ||
derive instance newtypeUid :: Newtype Uid _ | ||
derive newtype instance eqUid :: Eq Uid | ||
derive newtype instance ordUid :: Ord Uid | ||
|
||
instance showUid :: Show Uid where | ||
show (Uid uid) = "(Uid " <> show uid <> ")" | ||
|
||
instance eqUid :: Eq Uid where | ||
eq = eq `on` runUid | ||
|
||
instance ordUid :: Ord Uid where | ||
compare = compare `on` runUid |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters