#haskell - Mon 19 Feb 2007 between 04:17 and 04:40

NY Lost Funds



ski_in the latter, if no type signature is given, monomorphism restriction kicks in any denies it from being overloaded
donsis the point that io = liftIO doesn't type check?
ski_(s/any/and/)
pjdweird:
foo x = print x -- :: (Show a) => a -> IO ()
bar = print -- :: Integer -> IO ()
ski_defaulting
it defaults the overloading to 'Integer'
(there's a 'default' keyword one can use to specify what defaults to try, but i can't remember how to use it)
kfishdons: bibtex entry added to http://www.haskell.org/haskellwiki/Frag
lambdabotTitle: Frag - HaskellWiki
xpikawhy is it that the former is more polymorphic than the latter
ski_xpika : because they thought it could be unintuitive (especially to beginners) if the latter wasn't cached
xpikaCAF?
ski_with the dictionary-passing implementation of overloading, assuming no monomorphism restriction, the latter would be expanded to something like 'io dictMonadIO = liftIO dictMonadIO'
assume you had 'io = ...' where '...' is a big expensive thing to compute, with no monomorphism resitriction, (and using this implementaion) this would become 'io dict = ...'
xpikaski_: i dont understand how thats a problem
ah, i see
ski_so the result of computing this expression wouldn't be cached since this would act as a function, and not as a lazy cached thunk
so, solely to get the "expected" result, i.e. cached, when you have a binding with no arguments, they imposed the monomorphism restriction
clear ?
xpikathanks ski_, i believe that all bindings should be dynamic and explicitly being told not is intuitive.
ski_'dynamic' meaning 'not cached' ?
xpikayep
like virtual
it requires a table lookup
ski_i think Clean has something in that way .. or at least it is similar .. they use ':=' (or maybe ':==' or '::=' for cached binding) otherwise it acts as function binding, i.e. no cache of result (iirc, at least)
xpikainteresting.
do most haskell experts get their info from reading papers? or reading source code.
araujoxpika, easy question
xpika, from both
:-)
sorearmuahaha ... writing GMP bindings in haskell is fun
reading rts/PrimOps.cmm is suprisingly easy
ddariusUsually most of the source is in the papers. But, for me, I only really go to the source for specific technical things, usually the things I'm interested in wouldn't be too well served by source code.-
sorearunsafeCoerce# :: Int# -> ByteArray# -- what fun!
araujosorear, :-)
FFI?
soreararaujo: I am using the FFI, but that's a GHC primop
unsafe memory cast - the ultimate hacker's tool

Page: 4 11 18 25 32 39 46 53 60 67 74 81 88 

IrcArchive

NY Lost Funds