#haskell - Mon 14 May 2007 between 00:03 and 00:37

NY Lost Funds



TomMD@seen lambdabot
lambdabotYes, I'm here. I'm in #xmonad, #unicycling, #perl6, #oasis, #jtiger, #haskell-soc, #haskell-overflow, #haskell-blah, #haskell, #ghc, #gentoo-uy, #gentoo-haskell, #darcs and #scannedinavian
olsner@users
lambdabotMaximum users seen in #haskell: 336, currently: 296 (88.1%), active: 33 (11.1%)
cdsmithWith a browse, ghci says, error :: forall (a :: ?). [Char] -> a. What does the "a :: ?" mean?
sorearDeep black magic
cdsmithUmm, does this magic have a name I could google for?
ddariuspolymorphic kinds
cdsmiththanks
igliheh way to kill a discussion igli ;)
sorearnah, not polymorphic - subkinding!
ddariusBut it would be better to just browse the GHC User Guide.
sorearnormally type variables can only be 'normal' types, like Int
since normal types are pointers, and pointer v. non-pointer needs to be consistent for the GC
error is different
cdsmithSo a can have a type constructor as its type?
sorearbecause error never returns, it can safely be instantiated at unboxed type!
if it did return, the GC would crash. but it doesn.t
no, it's * or #
* = regular types
# = unboxed types
cdsmithOh. I don't know about #
sorearbut instead of kind classes, we have a watered-down subtyping system
if you're familiar with OOP, subtypes should make perfect sense
? is the common supertype of * and #
cdsmithI am familiar with oop and subtyping.
sorear? is *not* a supertype of * -> *
cdsmithokay, I see.
sorearso (error "fpp" :: Maybe) is ill-kinded
but (error "" :: Int#) is fine, as is (error "" :: [Char])
igliso boxed=ptr?
sorearyeah
iglity
cdsmithSo it's the # stuff I don't get yet, but I'll read the user guide.
sorearactually it's just a wee bit more subtle
Int# is int
Int is int(*)()
iglioic
makes sense
sorearall haskell types like Int are both boxed and lifted - they are function pointers, called when the value is needed

Page: 2 9 16 23 30 37 44 51 58 65 72 

IrcArchive

NY Lost Funds