[prev in list] [next in list] [prev in thread] [next in thread] 

List:       haskell
Subject:    Re: [Haskell] Initialisation without unsafePerformIO
From:       George Russell <ger () informatik ! uni-bremen ! de>
Date:       2004-06-03 18:11:39
Message-ID: 40BF69DB.20503 () informatik ! uni-bremen ! de
[Download RAW message or body]

Chung-chieh Shan wrote (snipped):
 > The enabling technique behind our solution is to propagate values
 > via types (literally), with the help of polymorphic recursion and
 > higher-ranked polymorphism.  The technique essentially emulates
 > local type-class instance declarations.  Configuration parameters
 > are propagated throughout the code implicitly as part of type
 > inference rather than explicitly by the programmer.

Crikey!  You represent configuration values which are
integers by encoding them as a type with constructors
    data Zero
    data Twice s
    data Succ s
    data Pred s
and you encode general values which are instances of Storable
by casting their binary representation (pinned by a StablePtr)
into bytes and then encoding the result as integers.  My mind
boggles.  It would be nice if your paper included an appendix
containing a main program which, say, used a graphics library
including configuration parameters in your style.  (Say,
default font (string), font size (integer) and mouse handedness
(bool).)

[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic