linear-types
linear-types copied to clipboard
(->.) is reported as problem, but ⊸ is something different
I have ran tweag/linear-types latest Docker image. This program:
t :: Int ->. Int
t = undefined
without LinearTypes LANGUAGE pragma is complaining with a message:
test.hs:2:10: error: Enable LinearTypes to allow linear functions
but this program, gives different strange error:
t :: Int ⊸ Int
t = undefined
test.hs:2:10: error: Not in scope: type constructor or class ‘⊸’
I think that both should return the same error of missing LinearTypes pragma, isn't it?
You need to enable UnicodeSyntax.
Just to check consistency, are there other extensions which enable some unicode syntax? If so what error message do they give when trying to use the unicode syntax without -XUnicodeSyntax?
@monoidal Thanks! But don't you think this extension should be included by default? And why not?
It's interesting, that:
t :: Int ⊸ (Int, Int)
t a = (1, 1)
Gives that error:
Couldn't match expected multiplicity ‘'One’ of variable ‘a’ with actual multiplicity ‘'Omega’
Instead of multiplicity of Zero.