-
Is there a reason we should not use https://github.com/alexknvl/newtypes to encode opaque types like `Maybe`?
-
Ash currently represents Vulkan API versions as `u32`, and has a bunch of bare functions and constants to deal with them. I think it would be more idiomatic if these were represented as a newtype wrap…
-
Then we could give it a nice `Bounded` instance reflecting the actual range:
```hs
instance Bounded Kelvin where
minBound = Kelvin 1500
maxBound = Kelvin 9000
```
-
Consider following code:
```
newtype Bar = Bar { getBar :: String }
foo :: Bar -> ()
foo (Bar _) = ()
main = println (foo undefined)
```
What is the result of this program? Since newtype is…
-
Hello!
The following code fails with `deserialization not working: Syntax("invalid type: newtype struct, expected any valid JSON value")` on the `rmp_serde:1.1.1`
```
#[test]
fn test() {
le…
-
https://hackage.haskell.org/package/newtype-0.2.2.0/docs/Control-Newtype.html
-
In the current implementation of network, the `ProtocolNumber` type, defined in `Network.Socket.Types`, is given as
```haskell
type ProtocolNumber = CInt
```
which means that it can only ever …
-
For example, consider [this definition](https://github.com/analogdevicesinc/linux/blob/b7484c97688ddd60bfd05a1d6d28f454f3f0dbb0/drivers/iio/adc/talise/talise_types.h#L114-L128)
```c
/**
* \brie…
edsko updated
1 month ago
-
Currently, the "Rules" type has the following definition:
```
-- | The monad used to compose rules
newtype Rules a = Rules
{ unRules :: RWST RulesRead RuleSet RulesState IO a
} deriving (…
-
Currently, it is only possible to retrieve single tags via `get_tag(...)` and `find_tag(...)`. However, one might be interested in obtaining all defined tags, for instance, when modifying the TIFF and…