Skip to content

Commit

Permalink
Merge pull request #24 from afsalthaj/simplify
Browse files Browse the repository at this point in the history
Update docs
  • Loading branch information
afsalthaj authored Feb 20, 2019
2 parents bee6e3e + 961a749 commit 258c22f
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions docs/src/main/tut/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -61,21 +61,21 @@ defined class C
scala> val nonCaseClass = new C
nonCaseClass: C = C@7e3131c8

scala> safeStr"Doesn't work if there is a non-case class $nonCaseClass or $onlyString"
scala> safeStr"Doesn't work if there is a non-case class $nonCaseClass or $string"
<console>:17: error: unable to find a safe instance for class C. Make sure it is a case class or a type that has safe instance.
^
// And don't cheat by `toString`
scala> safeStr"Doesn't work if there is a non-case class ${nonCaseClass.toString} or $onlyString"
<console>:17: error: Identified `toString` being called on the types. Make sure the type has a instance of Safe..
scala> safeStr"Doesn't work if there is a non-case class ${nonCaseClass.toString} or $string"
<console>:17: error: Identified `toString` being called on the types. Make sure the type has a instance of Safe.
^
```

# Concept and example usages.

`safeStr""` is just like `s""` in scala, but it is type safe and _allows only_ types that has a safe instance.

But don't worry. If you have a case class, the macros in `Safe.scala` will automatically derive it's safe instance
as far as all the individual fields has `Safe` instance.
But don't worry. If you have a case class, the macros in `Safe.scala` will automatically derive it's safe instance.
More on this later.

To understand more on the concepts and usages, please go through:

Expand Down

0 comments on commit 258c22f

Please sign in to comment.