Linear implicit parameters: linearity not enforced

Thomas Jäger thjaeger at gmail.com
Thu Mar 17 06:34:04 EST 2005


Hi,

in the following code, the implicit parameter %foo doesn't get split
(and therefore this code compiles without a Splittable instance for
(Foo r)). However,
`a1 + a1' and `a2 + a2' work as expected. Tested with ghc-6.2 and
ghc-6.4.20050303.

> data Foo r = Foo
> 
> a1 :: (%foo :: Foo a) => Int
> a1 = undefined
> 
> a2 :: (%foo :: Foo Int) => Int
> a2 = undefined
> 
> bar :: (%foo :: Foo Int) => Int
> bar = a1 + a2

Thomas



More information about the Glasgow-haskell-bugs mailing list