git.iko.soy/purescript-literals
on 260eb40 help sign in
10 files changed+30−45
since splitsnapshots
unifiedsplit
bower.json+10−10 packages.dhall+1−2 spago.dhall+4−4 src/Literals/Int.purs+2−3 src/Literals/Null.js+1−1 src/Literals/Null.purs+2−9 src/Literals/Number.purs+3−3 src/Literals/String.purs+4−3 src/Literals/Undefined.js+1−1 src/Literals/Undefined.purs+2−9
bower.json+10−10
@@ -5,7 +5,7 @@
55 ],
66 "repository": {
77 "type": "git",
8− "url": "https://github.com/rowtype-yoga/purescript-literals.git"
8+ "url": "https://github.com/jvliwanag/purescript-literals.git"
99 },
1010 "ignore": [
1111 "**/.*",
@@ -14,14 +14,14 @@
1414 "output"
1515 ],
1616 "dependencies": {
17− "purescript-assert": "^v6.0.0",
18− "purescript-effect": "^v4.0.0",
19− "purescript-integers": "^v6.0.0",
20− "purescript-maybe": "^v6.0.0",
21− "purescript-numbers": "^v9.0.0",
22− "purescript-partial": "^v4.0.0",
23− "purescript-prelude": "^v6.0.0",
24− "purescript-typelevel-prelude": "^v7.0.0",
25− "purescript-unsafe-coerce": "^v6.0.0"
17+ "purescript-assert": "^v5.0.0",
18+ "purescript-console": "^v5.0.0",
19+ "purescript-effect": "^v3.0.0",
20+ "purescript-integers": "^v5.0.0",
21+ "purescript-numbers": "^v8.0.0",
22+ "purescript-partial": "^v3.0.0",
23+ "purescript-psci-support": "^v5.0.0",
24+ "purescript-typelevel-prelude": "^v6.0.0",
25+ "purescript-unsafe-coerce": "^v5.0.0"
2626 }
2727}
packages.dhall+1−2
@@ -117,8 +117,7 @@ let additions =
117117-------------------------------
118118-}
119119let upstream =
120− https://github.com/purescript/package-sets/releases/download/psc-0.15.2-20220530/packages.dhall
121− sha256:15dd8041480502850e4043ea2977ed22d6ab3fc24d565211acde6f8c5152a799
120+ https://github.com/purescript/package-sets/releases/download/psc-0.14.0-20210309/packages.dhall sha256:585332a8a11c6420d7287943f81bc2121746cdd352f2cf3f5ecf65053f2afcd3
122121
123122let overrides = {=}
124123
spago.dhall+4−4
@@ -1,16 +1,16 @@
11{ name = "literals"
22, license = "MIT"
3−, repository = "https://github.com/rowtype-yoga/purescript-literals.git"
3+, repository = "https://github.com/jvliwanag/purescript-literals.git"
44, dependencies =
55 [ "assert"
66 , "effect"
7+ , "console"
78 , "integers"
8− , "maybe"
99 , "numbers"
1010 , "partial"
11− , "prelude"
12− , "typelevel-prelude"
11+ , "psci-support"
1312 , "unsafe-coerce"
13+ , "typelevel-prelude"
1414 ]
1515, packages = ./packages.dhall
1616, sources = [ "src/**/*.purs", "test/**/*.purs" ]
src/Literals/Int.purs+2−3
@@ -17,8 +17,7 @@ import Data.Symbol (class IsSymbol)
1717import Literals.Literal (Literal)
1818import Partial.Unsafe (unsafePartial)
1919import Prim.Symbol (class Cons)
20−import Type.Prelude (reflectSymbol)
21−import Type.Proxy (Proxy(..))
20+import Type.Prelude (SProxy(..), reflectSymbol)
2221import Unsafe.Coerce (unsafeCoerce)
2322
2423class Digit (s :: Symbol)
@@ -51,4 +50,4 @@ else instance digitIntegerPart :: (Digit h, Cons h' t' t, Int' h' t' IntegerPart
5150type IntLit sym = Literal Int sym
5251
5352intLit :: forall sym. IsSymbol sym => Int sym => IntLit sym
54−intLit = unsafeCoerce $ unsafePartial $ fromJust $ fromString $ reflectSymbol (Proxy :: Proxy sym)
53+intLit = unsafeCoerce $ unsafePartial $ fromJust $ fromString $ reflectSymbol (SProxy :: SProxy sym)
src/Literals/Null.js+1−1
@@ -1 +1 @@
1−export _null = null;
1+exports.null = null;
src/Literals/Null.purs+2−9
@@ -1,17 +1,10 @@
1−module Literals.Null
2− ( Null
3− , null
4− )
5−where
1+module Literals.Null where
62
73import Prelude
84
95foreign import data Null :: Type
106
11−foreign import _null :: Null
12−
13−null :: Null
14−null = _null
7+foreign import null :: Null
158
169instance showNull :: Show Null where
1710 show _ = "null"
src/Literals/Number.purs+3−3
@@ -13,12 +13,12 @@ import Prelude
1313
1414import Data.Maybe (fromJust)
1515import Data.Number (fromString)
16−import Data.Symbol (class IsSymbol)
16+import Data.Symbol (class IsSymbol, SProxy(..))
1717import Literals.Int (class Digit)
1818import Literals.Literal (Literal)
1919import Partial.Unsafe (unsafePartial)
2020import Prim.Symbol (class Cons)
21−import Type.Prelude (reflectSymbol, Proxy(..))
21+import Type.Prelude (reflectSymbol)
2222import Unsafe.Coerce (unsafeCoerce)
2323
2424class Number (sym :: Symbol)
@@ -42,4 +42,4 @@ else instance digitFractionalPart :: (Digit h, Cons h' t' t, Number' h' t' Fract
4242type NumberLit sym = Literal Number sym
4343
4444numberLit :: forall sym. IsSymbol sym => Number sym => NumberLit sym
45−numberLit = unsafeCoerce $ unsafePartial $ fromJust $ fromString $ reflectSymbol (Proxy :: Proxy sym)
45+numberLit = unsafeCoerce $ unsafePartial $ fromJust $ fromString $ reflectSymbol (SProxy :: SProxy sym)
src/Literals/String.purs+4−3
@@ -3,12 +3,13 @@ module Literals.String
33 , StringLit
44 ) where
55
6−import Data.Symbol (class IsSymbol, reflectSymbol)
7−import Type.Proxy (Proxy(..))
6+import Data.Symbol (class IsSymbol, SProxy(..), reflectSymbol)
87import Literals.Literal (Literal)
98import Unsafe.Coerce (unsafeCoerce)
109
1110type StringLit sym = Literal String sym
1211
1312stringLit :: forall sym. IsSymbol sym => StringLit sym
14−stringLit = unsafeCoerce (reflectSymbol (Proxy :: Proxy sym))
13+stringLit = unsafeCoerce (reflectSymbol (SProxy :: SProxy sym))
14+
15+
src/Literals/Undefined.js+1−1
@@ -1 +1 @@
1−export const _undefined = undefined;
1+exports.undefined = undefined;
src/Literals/Undefined.purs+2−9
@@ -1,17 +1,10 @@
1−module Literals.Undefined
2− ( Undefined
3− , undefined
4− )
5−where
1+module Literals.Undefined where
62
73import Prelude
84
95foreign import data Undefined :: Type
106
11−foreign import _undefined :: Undefined
12−
13−undefined :: Undefined
14−undefined = _undefined
7+foreign import undefined :: Undefined
158
169instance undefinedEq :: Eq Undefined where
1710 eq _ _ = true