Why does ghc allow to define instances of type synonyms? I did not find any
remarks about that in the ghc docs.
Due to the report this isn't allowed and hugs rejects it correctly.
GHC allows arbitrary non-overlapping types in instance decls.
Thus:
instance C ([(Int,Bool)] where ..
Sven Panne [EMAIL PROTECTED] writes:
If I
understand this correctly, definitions containing _casm_ are *not*
emitted to .hi files anymore. Although the reason for doing this,
concerning the inclusion of C's .h files, is fairly clear, I strongly
urge GHC's implementors to revise this:
Simon L Peyton Jones wrote:
Hmm. The difficulty is that things don't work well when you
are using a native code generator, or using something entirely
different like C-- (see my home page) as a code generator.
OK, but if you are using _casm_, you must go via C anyway. And even
in the C--
On 08-Jul-1998, Johannes Waldmann [EMAIL PROTECTED] wrote:
...
how would you resolve ambiguities?
probably by requiring an explicit type signature
at the point of usage.
fine, but then i'd like to have this in other cases as well,
finally arriving at Ada-style overloading
(a name may have
That's basically newtype with the data constructor omitted (I would
prefer data to record). Unfortunately, this seems to be incompatible
with the class system. (There was a long discussion on the Standard
Haskell discussion list, unfortunately the entry vanished).
No, it just moved over to
[I send it to [EMAIL PROTECTED] because it's more appropriate]
And I think it's a good idea to allow type synomyms!! After all that's
what they are made for: to abbreviate type expression or to give an
indication what the type is used for.
I think, that this isn't sufficient. There are two
data / type / newtype:
i'd like to have these choices
type T1 = record C1 .. | C2 ..
type T2 = T1
type T3 = new T2
with T2 identical to T1,
and T3 being an identical copy of T2 (but different from T2)
inheriting all its constructors and operations.
That's basically newtype with
I obtain a new monad composing monad transformers through the IO monad:
type MyMonad = MT1 (MT2 (... (MTn IO)))
And now, if I want to lift "putStrLn" I must write:
myPutStrLn = lift . lift . ... lift . putStrLn
This works but looks ugly.
The question is:
Is there a way that the
And now, if I want to lift "putStrLn" I must write:
myPutStrLn = lift . lift . ... lift . putStrLn
This works but looks ugly.
Another problem is when some of the monad transformers provide the same
functions, for example, if MTi also provides "putStrLn", How could I tell
the system
On 08-Jul-1998, Mariano Suarez Alvarez [EMAIL PROTECTED] wrote:
On Wed, 8 Jul 1998 [EMAIL PROTECTED] wrote:
Each expression then has a set of possible types, and the ambiguity is
resolved by an explicit type signature.
At present it is quite frustrating in Haskell that when a name
10 matches
Mail list logo