surfaceWind is a parser engineered to operate on [Char]

however constantWind is a parser engineered to operate on Char... but it
then gets applied via drill to create a parser which operates on [Char]

Why would one be indirect and create a parser to operate on Char and then
apply 'drill' to get what you intended to use:

surfaceWind :: Parser [Char] SurfaceWind t
surfaceWind = "Surface Wind" :> p
where   p       = (word constantWind) <&> \surfaceWind -> <!?> (word
directionVariation)
                                                        (\dir2->{surfaceWind & 
direction=dir2}) // if found
                                                        surfaceWind             
                        // if nothing found

constantWind :: Parser Char SurfaceWind a
constantWind =  direction       <&> \dir         ->
                                speed           <&> \(u,spd) ->
                                gust u          <@  \g           -> 
{direction=dir,speed=spd,gust=g}

-- 
View this message in context: 
http://www.nabble.com/Parsing%3A-to-drill-or-not-to-drill%2C--that-is-the-question-tp19201847p19201847.html
Sent from the Clean mailing list archive at Nabble.com.

_______________________________________________
clean-list mailing list
[email protected]
http://mailman.science.ru.nl/mailman/listinfo/clean-list

Reply via email to