Skip to content

Commit

Permalink
fixed outdated bower and removed yarn
Browse files Browse the repository at this point in the history
  • Loading branch information
athanclark committed Apr 19, 2020
1 parent fc16cc2 commit 351124e
Show file tree
Hide file tree
Showing 5 changed files with 151 additions and 9 deletions.
5 changes: 2 additions & 3 deletions bower.json
Original file line number Diff line number Diff line change
Expand Up @@ -14,14 +14,13 @@
"dependencies": {
"purescript-prelude": "^4.1.0",
"purescript-arraybuffer": "^10.0.0",
"purescript-sized-vectors": "^3.1.0",
"purescript-yarn": "^4.0.0",
"purescript-sized-vectors": "^5.0.0",
"purescript-numbers": "^6.0.0",
"purescript-stringutils": "^0.0.8"
},
"devDependencies": {
"purescript-psci-support": "^4.0.0",
"purescript-quickcheck": "^5.0.0",
"purescript-quickcheck": "^6.1.0",
"purescript-base64": "purescript-base64-2#^2.0.0",
"purescript-assert": "^4.0.0"
}
Expand Down
128 changes: 128 additions & 0 deletions packages.dhall
Original file line number Diff line number Diff line change
@@ -0,0 +1,128 @@
{-
Welcome to your new Dhall package-set!
Below are instructions for how to edit this file for most use
cases, so that you don't need to know Dhall to use it.
## Warning: Don't Move This Top-Level Comment!
Due to how `dhall format` currently works, this comment's
instructions cannot appear near corresponding sections below
because `dhall format` will delete the comment. However,
it will not delete a top-level comment like this one.
## Use Cases
Most will want to do one or both of these options:
1. Override/Patch a package's dependency
2. Add a package not already in the default package set
This file will continue to work whether you use one or both options.
Instructions for each option are explained below.
### Overriding/Patching a package
Purpose:
- Change a package's dependency to a newer/older release than the
default package set's release
- Use your own modified version of some dependency that may
include new API, changed API, removed API by
using your custom git repo of the library rather than
the package set's repo
Syntax:
Replace the overrides' "{=}" (an empty record) with the following idea
The "//" or "⫽" means "merge these two records and
when they have the same value, use the one on the right:"
-------------------------------
let overrides =
{ packageName =
upstream.packageName // { updateEntity1 = "new value", updateEntity2 = "new value" }
, packageName =
upstream.packageName // { version = "v4.0.0" }
, packageName =
upstream.packageName // { repo = "https://www.example.com/path/to/new/repo.git" }
}
-------------------------------
Example:
-------------------------------
let overrides =
{ halogen =
upstream.halogen // { version = "master" }
, halogen-vdom =
upstream.halogen-vdom // { version = "v4.0.0" }
}
-------------------------------
### Additions
Purpose:
- Add packages that aren't already included in the default package set
Syntax:
Replace the additions' "{=}" (an empty record) with the following idea:
-------------------------------
let additions =
{ package-name =
{ dependencies =
[ "dependency1"
, "dependency2"
]
, repo =
"https://example.com/path/to/git/repo.git"
, version =
"tag ('v4.0.0') or branch ('master')"
}
, package-name =
{ dependencies =
[ "dependency1"
, "dependency2"
]
, repo =
"https://example.com/path/to/git/repo.git"
, version =
"tag ('v4.0.0') or branch ('master')"
}
, etc.
}
-------------------------------
Example:
-------------------------------
let additions =
{ benchotron =
{ dependencies =
[ "arrays"
, "exists"
, "profunctor"
, "strings"
, "quickcheck"
, "lcg"
, "transformers"
, "foldable-traversable"
, "exceptions"
, "node-fs"
, "node-buffer"
, "node-readline"
, "datetime"
, "now"
]
, repo =
"https://github.com/hdgarrood/purescript-benchotron.git"
, version =
"v7.0.0"
}
}
-------------------------------
-}


let upstream =
https:https://github.com/purescript/package-sets/releases/download/psc-0.13.6-20200404/packages.dhall sha256:f239f2e215d0cbd5c203307701748581938f74c4c78f4aeffa32c11c131ef7b6

let overrides = {=}

let additions = {=}

in upstream // overrides // additions
17 changes: 17 additions & 0 deletions spago.dhall
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
{-
Welcome to a Spago project!
You can edit this file as you like.
-}
{ name = "z85"
, dependencies =
[ "arraybuffer"
, "assert"
, "console"
, "effect"
, "prelude"
, "psci-support"
, "stringutils"
]
, packages = ./packages.dhall
, sources = [ "src/**/*.purs", "test/**/*.purs" ]
}
5 changes: 2 additions & 3 deletions src/Data/ArrayBuffer/Z85.purs
Original file line number Diff line number Diff line change
Expand Up @@ -12,8 +12,7 @@ import Data.UInt (UInt)
import Data.Array (cons) as Array
import Data.ArrayBuffer.Types (Uint32Array, Uint8Array)
import Data.ArrayBuffer.Typed as TA
import Data.String.CodeUnits (toCharArray)
import Data.String.Yarn (fromChars)
import Data.String.CodeUnits (toCharArray, fromCharArray)
import Data.String (length) as String
import Data.String.CodeUnits (splitAt) as String
import Effect (Effect)
Expand All @@ -34,7 +33,7 @@ encodeZ85 xs = do
unsafePartial (TA.unsafeAt tmp 0)
let chunk :: Array Char
chunk = getZ85Char <$> Vec.toArray (encodeWord word)
go' acc = acc <> fromChars chunk -- content reversal
go' acc = acc <> fromCharArray chunk -- content reversal
void (Ref.modify go' sRef)
TA.traverse_ go xs
Ref.read sRef
Expand Down
5 changes: 2 additions & 3 deletions src/Data/ArrayBuffer/Z85/Internal.purs
Original file line number Diff line number Diff line change
Expand Up @@ -11,8 +11,7 @@ import Data.UInt (UInt, pow, zshr, (.&.))
import Data.UInt (toInt, fromInt) as UInt
import Data.Number (nan)
import Data.Char (toCharCode)
import Data.String.CodeUnits (charAt)
import Data.String.Yarn (toChars) as String
import Data.String.CodeUnits (charAt, toCharArray)
import Data.String.Regex (regex, test)
import Data.String.Regex.Flags (global)
import Data.String.Utils (escapeRegex)
Expand Down Expand Up @@ -71,7 +70,7 @@ inZ85Charset = test r


allZ85Chars :: Array Z85Char
allZ85Chars = Z85Char <$> String.toChars z85Chars
allZ85Chars = Z85Char <$> toCharArray z85Chars


lookupZ85Char :: Base85 -> Z85Char
Expand Down

0 comments on commit 351124e

Please sign in to comment.