Open id-ekaagr opened 2 years ago
Example :
{-# language UnicodeSyntax #-}
module Main where
import Prelude qualified as A
data Detail
= Detail
{ id :: String
, name :: String
}
deriving (Show)
In any record ::
is never converted to ∷
where UnicodeSyntax
is enabled.
Yes, currently, as far as I can see, only three features are supported:
::
, ->
, =>
in function type signature.
I've implemented replacement of ->
in GADTs in my fork, I'll try to cover at least all the GADTs issues (i. e. =>
and ::
in GADT declaration) and then open a pull request. However, it isn't likely to be very soon, so if someone else will be able to contribute this, it would be great
Thanks for addressing this.
Until it's fixed, I'm using this VS Code extension: https://marketplace.visualstudio.com/items?itemName=adamwalzer.code-replacer
With these settings:
"codeReplacer.includeDefaultRules": false,
"codeReplacer.replaceOnSave": true,
"codeReplacer.rules": {
"hs": {
" -< ": " ⤙ ",
" -<< ": " ⤛ ",
" -> ": " → ",
" :: ": " ∷ ",
" \\(\\| ": " ⦇ ",
" \\[\\| ": " ⟦ ",
" \\* ": " ★ ",
" \\|\\) ": " ⦈ ",
" \\|\\] ": " ⟧ ",
" <- ": " ← ",
" => ": " ⇒ ",
" >- ": " ⤚ ",
" >>- ": " ⤜ ",
" forall ": " ∀ "
}
},
"codeReplacer.statusBarText": "`$(telescope) ${codes.length} code segments to replace`",
Thanks very much for this list! It was very helpful for me. I had a problem to find where >-
and >>-
are used. If you have an example, please, share it in the comments to PR or add it to it by yourselves.
Here no instance of
->
gets converted to→
.