linear-types Questions

1

Solved

I'd like to make the following Padded type into an iterator transformer: enum Step<T> { Before(T), During(T), After } struct Padded<T> { step: Step<T> } (Note that in my rea...
Taciturnity asked 8/1 at 13:56

2

Solved

I have a very simple snippet: {-# LANGUAGE LinearTypes #-} module Lib where data Peer st = Peer { data :: String } deriving Show data Idle data Busy sendToPeer :: Peer Idle %1-> Int -> IO...
Kirstiekirstin asked 28/1, 2022 at 11:22

1

Solved

I've been experimenting with linear types recently, and have been wondering if the following transformation is possible. It's definitely not valid without linear types. The aim is to lower the high...
Johanna asked 6/9, 2021 at 9:50

1

Solved

From the Idris 2 publication about linear types "Idris 2: Quantitative Type Theory in Practice": For Idris 2, we make a concrete choice of semiring, where a multiplicity can be one of: ...
Haldas asked 18/8, 2021 at 17:44

3

Solved

I am modeling a system that has an operation that creates a resource and other operations that consume that resource. However, a given resource can only be consumed once - is there a way that I can...
Psychologist asked 11/12, 2015 at 15:54

1

Solved

Rust has a linear type system. Is there any (good) way to simulate this in OCaml? E.g., when using ocaml-lua, I want to make sure some functions are called only when Lua is in a specific state (tab...
Heyduck asked 25/3, 2013 at 16:52

3

Solved

Is there a reasonable way to express the concept of a linear type in .Net (Compact Framework/desktop 3.5 common subset), in such a way that (a) the required syntax doesn't become overly verbose, co...
Skinned asked 22/6, 2011 at 7:0
1

© 2022 - 2024 — McMap. All rights reserved.