git.iko.soy/purescript-literals
on 260eb40 help sign in
bower.json+10−10
since splitsnapshots
unifiedsplit
@@ -5,7 +5,7 @@
5 ],
5 ],
6 "repository": {
6 "repository": {
7 "type": "git",
7 "type": "git",
8− "url": "https://github.com/rowtype-yoga/purescript-literals.git"
8+ "url": "https://github.com/jvliwanag/purescript-literals.git"
9 },
9 },
10 "ignore": [
10 "ignore": [
11 "**/.*",
11 "**/.*",
@@ -14,14 +14,14 @@
14 "output"
14 "output"
15 ],
15 ],
16 "dependencies": {
16 "dependencies": {
17− "purescript-assert": "^v6.0.0",
17+ "purescript-assert": "^v5.0.0",
18+ "purescript-console": "^v5.0.0",
18− "purescript-effect": "^v4.0.0",
19+ "purescript-effect": "^v3.0.0",
19− "purescript-integers": "^v6.0.0",
20+ "purescript-integers": "^v5.0.0",
20− "purescript-maybe": "^v6.0.0",
21− "purescript-numbers": "^v9.0.0",
21+ "purescript-numbers": "^v8.0.0",
22− "purescript-partial": "^v4.0.0",
22+ "purescript-partial": "^v3.0.0",
23− "purescript-prelude": "^v6.0.0",
23+ "purescript-psci-support": "^v5.0.0",
24− "purescript-typelevel-prelude": "^v7.0.0",
24+ "purescript-typelevel-prelude": "^v6.0.0",
25− "purescript-unsafe-coerce": "^v6.0.0"
25+ "purescript-unsafe-coerce": "^v5.0.0"
26 }
26 }
27}
27}
packages.dhall+1−2
@@ -117,8 +117,7 @@ let additions =
117-------------------------------
117-------------------------------
118-}
118-}
119let upstream =
119let upstream =
120− https://github.com/purescript/package-sets/releases/download/psc-0.15.2-20220530/packages.dhall
120+ https://github.com/purescript/package-sets/releases/download/psc-0.14.0-20210309/packages.dhall sha256:585332a8a11c6420d7287943f81bc2121746cdd352f2cf3f5ecf65053f2afcd3
121− sha256:15dd8041480502850e4043ea2977ed22d6ab3fc24d565211acde6f8c5152a799
122
121
123let overrides = {=}
122let overrides = {=}
124
123
spago.dhall+4−4
@@ -1,16 +1,16 @@
1{ name = "literals"
1{ name = "literals"
2, license = "MIT"
2, license = "MIT"
3−, repository = "https://github.com/rowtype-yoga/purescript-literals.git"
3+, repository = "https://github.com/jvliwanag/purescript-literals.git"
4, dependencies =
4, dependencies =
5 [ "assert"
5 [ "assert"
6 , "effect"
6 , "effect"
7+ , "console"
7 , "integers"
8 , "integers"
8− , "maybe"
9 , "numbers"
9 , "numbers"
10 , "partial"
10 , "partial"
11− , "prelude"
11+ , "psci-support"
12− , "typelevel-prelude"
13 , "unsafe-coerce"
12 , "unsafe-coerce"
13+ , "typelevel-prelude"
14 ]
14 ]
15, packages = ./packages.dhall
15, packages = ./packages.dhall
16, sources = [ "src/**/*.purs", "test/**/*.purs" ]
16, sources = [ "src/**/*.purs", "test/**/*.purs" ]
src/Literals/Int.purs+2−3
@@ -17,8 +17,7 @@ import Data.Symbol (class IsSymbol)
17import Literals.Literal (Literal)
17import Literals.Literal (Literal)
18import Partial.Unsafe (unsafePartial)
18import Partial.Unsafe (unsafePartial)
19import Prim.Symbol (class Cons)
19import Prim.Symbol (class Cons)
20−import Type.Prelude (reflectSymbol)
20+import Type.Prelude (SProxy(..), reflectSymbol)
21−import Type.Proxy (Proxy(..))
22import Unsafe.Coerce (unsafeCoerce)
21import Unsafe.Coerce (unsafeCoerce)
23
22
24class Digit (s :: Symbol)
23class Digit (s :: Symbol)
@@ -51,4 +50,4 @@ else instance digitIntegerPart :: (Digit h, Cons h' t' t, Int' h' t' IntegerPart
51type IntLit sym = Literal Int sym
50type IntLit sym = Literal Int sym
52
51
53intLit :: forall sym. IsSymbol sym => Int sym => IntLit sym
52intLit :: 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
1+module Literals.Null where
2− ( Null
3− , null
4− )
5−where
6
2
7import Prelude
3import Prelude
8
4
9foreign import data Null :: Type
5foreign import data Null :: Type
10
6
11−foreign import _null :: Null
7+foreign import null :: Null
12−
13−null :: Null
14−null = _null
15
8
16instance showNull :: Show Null where
9instance showNull :: Show Null where
17 show _ = "null"
10 show _ = "null"
src/Literals/Number.purs+3−3
@@ -13,12 +13,12 @@ import Prelude
13
13
14import Data.Maybe (fromJust)
14import Data.Maybe (fromJust)
15import Data.Number (fromString)
15import Data.Number (fromString)
16−import Data.Symbol (class IsSymbol)
16+import Data.Symbol (class IsSymbol, SProxy(..))
17import Literals.Int (class Digit)
17import Literals.Int (class Digit)
18import Literals.Literal (Literal)
18import Literals.Literal (Literal)
19import Partial.Unsafe (unsafePartial)
19import Partial.Unsafe (unsafePartial)
20import Prim.Symbol (class Cons)
20import Prim.Symbol (class Cons)
21−import Type.Prelude (reflectSymbol, Proxy(..))
21+import Type.Prelude (reflectSymbol)
22import Unsafe.Coerce (unsafeCoerce)
22import Unsafe.Coerce (unsafeCoerce)
23
23
24class Number (sym :: Symbol)
24class Number (sym :: Symbol)
@@ -42,4 +42,4 @@ else instance digitFractionalPart :: (Digit h, Cons h' t' t, Number' h' t' Fract
42type NumberLit sym = Literal Number sym
42type NumberLit sym = Literal Number sym
43
43
44numberLit :: forall sym. IsSymbol sym => Number sym => NumberLit sym
44numberLit :: 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
3 , StringLit
3 , StringLit
4 ) where
4 ) where
5
5
6−import Data.Symbol (class IsSymbol, reflectSymbol)
6+import Data.Symbol (class IsSymbol, SProxy(..), reflectSymbol)
7−import Type.Proxy (Proxy(..))
8import Literals.Literal (Literal)
7import Literals.Literal (Literal)
9import Unsafe.Coerce (unsafeCoerce)
8import Unsafe.Coerce (unsafeCoerce)
10
9
11type StringLit sym = Literal String sym
10type StringLit sym = Literal String sym
12
11
13stringLit :: forall sym. IsSymbol sym => StringLit sym
12stringLit :: 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
1+module Literals.Undefined where
2− ( Undefined
3− , undefined
4− )
5−where
6
2
7import Prelude
3import Prelude
8
4
9foreign import data Undefined :: Type
5foreign import data Undefined :: Type
10
6
11−foreign import _undefined :: Undefined
12−
13−undefined :: Undefined
7+foreign import undefined :: Undefined
14−undefined = _undefined
15
8
16instance undefinedEq :: Eq Undefined where
9instance undefinedEq :: Eq Undefined where
17 eq _ _ = true
10 eq _ _ = true