What is the typical exploration well development style?

While doing CIS194 (Spring 2013) homework, I got stuck with an instance of the Applicative

type Parser

. I am asking google for help, I came across this reddit post . User ephrion provided an answer that was also an example of a typed well survey method that I didn't quite understand. In the comment section of his answer, he also said the following:

This is extremely useful and one of the things that makes Haskell development so enjoyable.

So the question is, what is this method exactly, and is there some explicit order of steps in this method?

I still consider myself a beginner when it comes to Haskell, and by searching around the topic I haven't found a very clear explanation of how this style of development can be used.

+3


source to share


1 answer


Almost anywhere on the right-hand side of an assignment in Haskell, you can write an underscore (optionally followed by other characters) instead of a value (constant or function). Instead of compiling, GHC will tell you what type of value you want to replace with an underscore and indicate which identifiers in scope are of that type.



Matthías Páll Gissurarson expands the list of hints from the GHC to include compound expressions.

+2


source







All Articles