[Haskell-beginners] What's wrong with Haddock?!
Baa
aquagnu at gmail.com
Thu Oct 26 11:58:43 UTC 2017
@Francesco:
I tried it (added extension InstanceSigs, added "^.."-style docstring),
nothing changed. So, may be docstrings in instances are impossible at
whole? May be it makes sense... May be they should be documented in its
classes instead?
> On Thu, Oct 26, 2017 at 02:11:10PM +0300, Baa wrote:
> > @Francesco Ariis:
> >
> > instance Conversion UTCTime where
> > aspS a = round $ 1E12 * utcTimeToPOSIXSeconds a -- ^as time
> > period from 1970-1-1 frompS a = posixSecondsToUTCTime $ fromInteger
> > $ (round $ d/1E12) -- ^from time period from 1970-1-1 where d =
> > fromInteger a :: Double
>
> -- ^ is meant to be put after a function *declaration* iirc. Try to
> add signatures to your instance as
>
> instance Foo Bar where
> fa :: Int -> a -- ^ some comment
> fa x = undefined
> fb :: String -> a -- ^ some more comment
> fb x = undefined
>
> and let us know if it fixed the problem.
> _______________________________________________
> Beginners mailing list
> Beginners at haskell.org
> http://mail.haskell.org/cgi-bin/mailman/listinfo/beginners
More information about the Beginners
mailing list