Skip to content

Commit c5a1918

Browse files
author
Serhii Khoma
committed
feat: update to purs 0.14
1 parent 779ac38 commit c5a1918

File tree

6 files changed

+145
-23
lines changed

6 files changed

+145
-23
lines changed

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,3 +3,4 @@ bower_components/
33
output/
44
.psc-package
55
.psc-ide-port
6+
.purs-repl

bower.json

Lines changed: 0 additions & 22 deletions
This file was deleted.

packages.dhall

Lines changed: 110 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,110 @@
1+
{-
2+
Welcome to your new Dhall package-set!
3+
4+
Below are instructions for how to edit this file for most use
5+
cases, so that you don't need to know Dhall to use it.
6+
7+
## Warning: Don't Move This Top-Level Comment!
8+
9+
Due to how `dhall format` currently works, this comment's
10+
instructions cannot appear near corresponding sections below
11+
because `dhall format` will delete the comment. However,
12+
it will not delete a top-level comment like this one.
13+
14+
## Use Cases
15+
16+
Most will want to do one or both of these options:
17+
1. Override/Patch a package's dependency
18+
2. Add a package not already in the default package set
19+
20+
This file will continue to work whether you use one or both options.
21+
Instructions for each option are explained below.
22+
23+
### Overriding/Patching a package
24+
25+
Purpose:
26+
- Change a package's dependency to a newer/older release than the
27+
default package set's release
28+
- Use your own modified version of some dependency that may
29+
include new API, changed API, removed API by
30+
using your custom git repo of the library rather than
31+
the package set's repo
32+
33+
Syntax:
34+
where `entityName` is one of the following:
35+
- dependencies
36+
- repo
37+
- version
38+
-------------------------------
39+
let upstream = --
40+
in upstream
41+
with packageName.entityName = "new value"
42+
-------------------------------
43+
44+
Example:
45+
-------------------------------
46+
let upstream = --
47+
in upstream
48+
with halogen.version = "master"
49+
with halogen.repo = "https://example.com/path/to/git/repo.git"
50+
51+
with halogen-vdom.version = "v4.0.0"
52+
-------------------------------
53+
54+
### Additions
55+
56+
Purpose:
57+
- Add packages that aren't already included in the default package set
58+
59+
Syntax:
60+
where `<version>` is:
61+
- a tag (i.e. "v4.0.0")
62+
- a branch (i.e. "master")
63+
- commit hash (i.e. "701f3e44aafb1a6459281714858fadf2c4c2a977")
64+
-------------------------------
65+
let upstream = --
66+
in upstream
67+
with new-package-name =
68+
{ dependencies =
69+
[ "dependency1"
70+
, "dependency2"
71+
]
72+
, repo =
73+
"https://example.com/path/to/git/repo.git"
74+
, version =
75+
"<version>"
76+
}
77+
-------------------------------
78+
79+
Example:
80+
-------------------------------
81+
let upstream = --
82+
in upstream
83+
with benchotron =
84+
{ dependencies =
85+
[ "arrays"
86+
, "exists"
87+
, "profunctor"
88+
, "strings"
89+
, "quickcheck"
90+
, "lcg"
91+
, "transformers"
92+
, "foldable-traversable"
93+
, "exceptions"
94+
, "node-fs"
95+
, "node-buffer"
96+
, "node-readline"
97+
, "datetime"
98+
, "now"
99+
]
100+
, repo =
101+
"https://github.com/hdgarrood/purescript-benchotron.git"
102+
, version =
103+
"v7.0.0"
104+
}
105+
-------------------------------
106+
-}
107+
let upstream =
108+
https://github.com/purescript/package-sets/releases/download/psc-0.14.0-20210409/packages.dhall sha256:e81c2f2ce790c0e0d79869d22f7a37d16caeb5bd81cfda71d46c58f6199fd33f
109+
110+
in upstream

spago.dhall

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
{-
2+
Welcome to a Spago project!
3+
You can edit this file as you like.
4+
-}
5+
{ name = "open-pairing"
6+
, dependencies =
7+
[ "console"
8+
, "effect"
9+
, "free"
10+
, "functors"
11+
, "prelude"
12+
, "psci-support"
13+
, "transformers"
14+
, "control"
15+
, "either"
16+
, "identity"
17+
, "newtype"
18+
, "tuples"
19+
]
20+
, packages = ./packages.dhall
21+
, sources = [ "src/**/*.purs", "test/**/*.purs" ]
22+
}

src/Data/Functor/Pairing/Co.purs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -71,7 +71,7 @@ instance monadStateCo :: ComonadStore s w => MonadState s (Co w) where
7171
case f s of
7272
Tuple a s1 -> Co \w -> peek s1 w a
7373

74-
instance monadTellCo :: ComonadTraced t w => MonadTell t (Co w) where
74+
instance monadTellCo :: (Semigroup t, ComonadTraced t w) => MonadTell t (Co w) where
7575
tell t = Co \w -> track t w unit
7676

7777
instance monadFreeCo :: (Functor f, ComonadCofree f w) => MonadFree (Co f) (Co w) where

test/Main.purs

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
module Test.Main where
2+
3+
import Prelude
4+
5+
import Effect (Effect)
6+
import Effect.Class.Console (log)
7+
8+
main :: Effect Unit
9+
main = do
10+
log "🍝"
11+
log "You should add some tests."

0 commit comments

Comments
 (0)