haskell - Where is the official source code of System.IO? -


where official source of system.io ?

i looked here not there.

when clicking on source says not here. confused because other links on this page seem work.

edit:

i found this:

instance  monad io      {-# inline return #-}     {-# inline (>>)   #-}     {-# inline (>>=)  #-}     m >> k    = m >>= \ _ -> k     return    = returnio     (>>=)     = bindio     fail s    = failio s  bindio :: io -> (a -> io b) -> io b bindio (io m) k = io $ \ s -> case m s of (# new_s, #) -> unio (k a) new_s 

here.

if want know interface system.io supposed expose, check haskell report. believe nomative specification.

if want internal implementation... well, it's hard-wired compiler. you'd have read through ghc source code.

edit: io special. io magical. looking @ source won't tell interesting. bunch of code manipulates compiler's internal, low-level representation of how i/o works. whatever you're seeking understand, won't find enlightenment here.


Comments

Popular posts from this blog

apache - Remove .php and add trailing slash in url using htaccess not loading css -

javascript - jQuery show full size image on click -