Skip to content

Commit

Permalink
rename
Browse files Browse the repository at this point in the history
  • Loading branch information
metagn committed Jul 14, 2023
1 parent 5206aef commit 0c41ca3
Show file tree
Hide file tree
Showing 17 changed files with 18 additions and 14 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/main.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
name: variantsugar
name: skinsuit

on:
push:
Expand Down
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
# variantsugar
# skinsuit

Utility macros mostly for object variants

```nim
import variantsugar
import skinsuit
type Value {.sum, equals.} = object
case kind: _
Expand Down
4 changes: 2 additions & 2 deletions variantsugar.nimble → skinsuit.nimble
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# Package

version = "0.2.1"
version = "0.2.2"
author = "metagn"
description = "utility macros mostly for object variants"
license = "MIT"
Expand All @@ -18,7 +18,7 @@ when (NimMajor, NimMinor) >= (1, 4):

task docs, "build docs for all modules":
when declared(buildDocs):
buildDocs(gitUrl = "https://github.com/metagn/variantsugar")
buildDocs(gitUrl = "https://github.com/metagn/skinsuit")
else:
echo "docs task not implemented, need nimbleutils"

Expand Down
2 changes: 2 additions & 0 deletions src/skinsuit.nim
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
import skinsuit/[conditional, sum, unionfield, equals, dispatch]
export conditional, sum, unionfield, equals, dispatch
Original file line number Diff line number Diff line change
@@ -1,5 +1,9 @@
## object variants generalized to any condition for each possible union value

# todo use custom {.union.} implementation for JS and nimscript
# for JS, can be `distinct JsRoot` that gets `cast`
# for nimscript, can be `pointer` that gets `cast`?

runnableExamples:
type Foo {.conditional.} = ref object
num: int
Expand Down
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
2 changes: 0 additions & 2 deletions src/variantsugar.nim

This file was deleted.

2 changes: 1 addition & 1 deletion tests/test_combined.nim
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import variantsugar/[sum, equals, dispatch]
import skinsuit/[sum, equals, dispatch]

block:
type Value {.sum, equals.} = object
Expand Down
2 changes: 1 addition & 1 deletion tests/test_conditional.nim
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
when not defined(js) and not defined(nimscript):
import variantsugar/conditional
import skinsuit/conditional

conditional:
type Foo = ref object
Expand Down
4 changes: 2 additions & 2 deletions tests/test_dispatch.nim
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import variantsugar/dispatch
import skinsuit/dispatch

block: # on parameter name
type Foo = object
Expand Down Expand Up @@ -75,7 +75,7 @@ block: # first parameter
addStr(f, s)
doAssert s == @["int 0", "float 1.2", "float 3.4", "int 567"]

import variantsugar/sum
import skinsuit/sum

block: # combined
type Value {.sum.} = object
Expand Down
2 changes: 1 addition & 1 deletion tests/test_equals.nim
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import variantsugar/equals
import skinsuit/equals

block:
type Foo {.equals.} = object
Expand Down
2 changes: 1 addition & 1 deletion tests/test_sum.nim
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import variantsugar/sum
import skinsuit/sum

block:
sum:
Expand Down
2 changes: 1 addition & 1 deletion tests/test_unionfield.nim
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import variantsugar/unionfield
import skinsuit/unionfield

block:
type Foo {.unionField.} = ref object
Expand Down

0 comments on commit 0c41ca3

Please sign in to comment.