stylish-haskell icon indicating copy to clipboard operation
stylish-haskell copied to clipboard

Fully support base-unicode-symbols

Open langston-barrett opened this issue 8 years ago • 5 comments

As a part of the Unicode support feature, I propose that stylish-haskell could support the functions in base-unicode-symbols.

Related code is in this file.

Related to #3 and #81.

I'd be interested in helping out, but I can't really understand the code in that file.

langston-barrett avatar Jul 20 '15 01:07 langston-barrett

I'd like to see this also. The mentioned code is now in this file.

It seems currently only converting :: => and -> will work, and they only seem convert in type signatures for me. Example below:

getPort ∷ SvHashTable → Server → IO (Maybe Port)
getPort ht sv = do
  se <- H.lookup ht sv
  case se of
       Nothing           -> return Nothing
       Just (port,_,_,_) -> return $ Just port

Could we get more conversions and more detection?

MrDetonia avatar Jun 29 '16 10:06 MrDetonia

@MrDetonia I think you're talking about the UnicodeSyntax language extension in #3, rather than the base-unicode-symbols package mentioned in this issue.

langston-barrett avatar Jul 02 '16 12:07 langston-barrett

I prefer to have something that works without extra dependencies, so I'd rather just have very good UnicodeSyntax support.

jaspervdj avatar Jul 02 '16 20:07 jaspervdj

@jaspervdj Maybe this could be an optional feature, disabled by default, like UnicodeSyntax?

langston-barrett avatar Jul 02 '16 20:07 langston-barrett

stylish haskell is even replacing unicode with ASCII characters on it's own (with UnicodeSyntax pragma on).

example :

data Maybes a where
 Nothings ∷ Maybes a
 Justs ∷ a -> Maybes a

converts to

data Maybes a where
 Nothings :: Maybes a
 Justs :: a -> Maybes a

makes it impossible to deal with.

id-ekaagr avatar Oct 10 '22 22:10 id-ekaagr