[Haskell-beginners] OI UTCTime to String

Francesco Ariis fa-ml at ariis.it
Thu Nov 10 18:52:21 UTC 2016


On Thu, Nov 10, 2016 at 07:44:17PM +0100, sasa bogicevic wrote:
> Hi All,
> 
> This is a small program
>
> [...]

Hey Sasa,
If we put this into ghci

    λ> :t formatDateString $ timeFromString _

the "hole" tells us we need something of type String, but `getDateString`
is not!

    λ> :t getDateString
    getDateString :: IO UTCTime

That means you have to bind it inside a `do` block (or use >>=).
Ask for more if I was not clear!


More information about the Beginners mailing list