[prev in list] [next in list] [prev in thread] [next in thread]
List: haskell
Subject: RE: Singletons and Reflection
From: "Daan Leijen" <daan () cs ! uu ! nl>
Date: 1999-12-15 12:48:49
Message-ID: 000401bf46fa$6699ff80$9650d383 () cs ! uu ! nl
[Download RAW message or body]
> If we had implicit parameters then all graphics functions
> would have types
> (? context :: Context) => (explicit arguments) => IO (result)
> and the main
> function would be something like
> do
> context <- getContext
> doBusiness with context=context
>
The catch is off course that every function with an explicit
type signature:
> explicit arguments -> IO result
needs a new type signature:
> (?context :: Context) => explicit arguments -> IO result
Here, partial type declarations proposed by Koen Claessen would help.
Those declarations are quite usefull if one plans to use implicit
parameters a lot, allthough they improve flexibility in general.
i.e. one could write:
... => explicit arguments -> IO result
all the time and add any extra implicit arguments as needed
without change to existing source code.
All the best,
Daan.
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic