purescript / pursuit

Website for hosting and searching PureScript API documentation
https://pursuit.purescript.org/
Other
169 stars 47 forks source link

Pretty-print partially applied occurrences of Prim.Function #282

Open hdgarrood opened 7 years ago

hdgarrood commented 7 years ago

Prim.Function has started coming out as Function rather than (->). This might need addressing in the compiler.

This isn't actually new behaviour. Pretty-printing of saturated applications of the type constructor (->) still work and pretty much always have, but partial applications of it (e.g. instance Category (->) or instance Functor ((->) r) have always been rendered as Function.

hdgarrood commented 7 years ago

@paf31 I think we could address this by defining a type alias -> for Function in Prim inside the compiler. I think we might even be able to remove a fair bit of special-casing code that deals with (->) in e.g. the parser and the pretty-printer if we did this. Does that sound sensible to you?

paf31 commented 7 years ago

Sounds good!

hdgarrood commented 7 years ago

Ok great, I'll make an issue in the compiler repo and start looking at that :)