| info :: (Collects e ce, Show e) = ce - String
| info v = show ((one v) ::e)
As the error message says, and as the Haskell report says,
this means
info v = show ((one v) :: (forall e.e))
which is not what you meant. Haskell does not have scoped
type variables, so any type variables in
Hal Daume [EMAIL PROTECTED] writes:
I'm curious exactly what is safe and what is unsafe to wrap
unsafePerformIO around when it comes to FFI calls.
Here's a simple test:
Could you imagine an alternative implementation of the same API in
pure Haskell? (Don't consider efficiency or
That's a nice succinct way to describe it. Another way, which boils
down to the same thing but which is a little more concrete, is to
ask:
- Does the function's result depend only on the values of its
arguments?
I have two problems with this alternative test:
1) It is sometimes
Can I get ghc to use a local definition of `=` and return... currently
I have:
{-# OPTIONS -fglasgow-exts -fno-implicit-prelude #-}
module Main(main) where
import qualified Prelude (Monad(..))
import Prelude hiding (Monad(..))
... Then a definition of Monad using a Premonad for return, however
That's a nice succinct way to describe it. Another way, which boils
down to the same thing but which is a little more concrete, is to
ask:
- Does the function's result depend only on the values of its
arguments?
I have two problems with this alternative test:
1) It is
Simon Peyton-Jones wrote:
| info :: (Collects e ce, Show e) = ce - String
| info v = show ((one v) ::e)
As the error message says, and as the Haskell report says,
this means
info v = show ((one v) :: (forall e.e))
which is not what you meant.
Ok, I did not know that I have to
I wish to add to Christian's question:
why is it not possible to annotate v with its full type:
info :: (Collects e ce, Show e) = ce - String
info (v::(Collects e ce, Show e) = ce) = show ((one v)::e)
I then get the error message
All of the type variables in the constraint `Collects e