fthomas/refined
View on GitHub ↗ ★ 1,731 Scala
Refinement types for Scala
7 mentions on Hacker News by 6 people: 0 stories, 7 comments · first 2017-08-18 · latest 2024-02-04
20082026
-
…for inputs e.g. this Int must be non-negative or this String must be greater than 5 characters. https://github.com/fthomas/refined
comment by threeseed · 2024-02-04 · in Compiling Rust is testing -
…in mainstream ML-land: https://github.com/Iltotore/iron (Or for the older version of the language: https://github.com/fthomas/refined ) (Please also note that for this feature both versions don't need language support at all but are "just"…
comment by still_grokking · 2023-04-02 · in Catch-23: The New C Standard Sets the World on Fire -
You're looking for refinement-types? Scala to the rescue: https://github.com/fthomas/refined And a new one: https://github.com/Iltotore/iron/ The latter will be zero overhead once a compiler ticket is closed. Both solutions will yield…
comment by still_grokking · 2021-08-17 · in What was the last breakthrough in computer programming? (2019) -
…function and not just do Email(input)? This is how you actually do it in Scala if anyone interested https://github.com/fthomas/refined
comment by araknafobia · 2021-05-15 · in Parsix: Parse Don't Validate -
https://github.com/fthomas/refined
comment by darkr · 2020-11-26 · in Parse, don’t type-check -
I like for example Refined https://github.com/fthomas/refined not only for the static checking, scala> val i: Int Refined Positive = -5 <console>:22: error: Predicate failed: (-5 > 0). val i: Int Refined Positive = -5 but the expressive…
comment by _Codemonkeyism · 2017-10-02 · in Diminishing returns of static typing -
…use-cases for them outside of Shapeless. To give just a few: * https://github.com/adamw/macwire * https://github.com/fthomas/refined * https://github.com/adamw/quicklens * https://github.com/scala/scala-async *…
comment by clhodapp · 2017-08-18 · in Reasonable Scala Compiler