Skip to content
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

Drop match dep; update imports #21

Merged
merged 3 commits into from
Mar 28, 2022
Merged
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
3 changes: 3 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,9 @@ Notable changes to this project are documented in this file. The format is based
Breaking Changes:
- Migrate FFI to ES modules (#20 by @JordanMartinez)

Other improvements:
- Drop `math` dependency; update imports (#21 by @JordanMartinez)

## v6.0.2 2021-07-11

Move quickcheck test dependencies to `test.dhall`.
Expand Down
2 changes: 1 addition & 1 deletion bower.json
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
"dependencies": {
"purescript-enums": "master",
"purescript-gen": "master",
"purescript-math": "master",
"purescript-numbers": "master",
"purescript-maybe": "master",
"purescript-prelude": "master"
},
Expand Down
2 changes: 1 addition & 1 deletion spago.dhall
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
{ name = "uint"
, dependencies =
[ "prelude"
, "math"
, "maybe"
, "numbers"
, "enums"
, "gen"
]
Expand Down
8 changes: 4 additions & 4 deletions src/Data/UInt.purs
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ import Data.Function ((<<<))
import Data.Semigroup ((<>))
import Data.Enum (class Enum)
import Prelude ((<), (>), (+), (-))
import Math (ceil, floor, round) as Math
import Data.Number (ceil, floor, round) as Number

-- | 32-bit unsigned integer. Range from *0* to *4294967295*.
newtype UInt = UInt Number
Expand Down Expand Up @@ -186,7 +186,7 @@ clamp' = clamp (toNumber bottom) (toNumber top)
-- | > floor (-1.0e65)
-- | 0u
floor :: Number -> UInt
floor = fromNumber <<< Math.floor <<< clamp'
floor = fromNumber <<< Number.floor <<< clamp'

-- | Convert a `Number` to an `UInt`. Takes the closest integer equal to or
-- | greater than the argument. Values outside the `UInt` range are clamped.
Expand All @@ -206,7 +206,7 @@ floor = fromNumber <<< Math.floor <<< clamp'
-- | > ceil (-1.0e65)
-- | 0u
ceil :: Number -> UInt
ceil = fromNumber <<< Math.ceil <<< clamp'
ceil = fromNumber <<< Number.ceil <<< clamp'

-- | Convert a `Number` to an `UInt`, by taking the nearest integer to the
-- | argument. Values outside the `UInt` range are clamped.
Expand All @@ -229,7 +229,7 @@ ceil = fromNumber <<< Math.ceil <<< clamp'
-- | > round (-1.0e65)
-- | 0u
round :: Number -> UInt
round = fromNumber <<< Math.round <<< clamp'
round = fromNumber <<< Number.round <<< clamp'

-- | Returns whether an `Int53` is an even number.
-- |
Expand Down