Hi, Richard
Can you give some ideas or where to read how to properly use signletons
and unary naturals in order to be able to express such constraints?
Thanks
--
Alexander
On 30 November 2014 at 23:26, Richard Eisenberg wrote:
> Hi Alexander,
>
> Nice idea to test against the set of known val
On Thu, Dec 4, 2014 at 12:59 PM, migmit wrote:
> It tries to get `m Bool` by applying f1 to three arguments: 0, 0, and 'a'.
> Now, since `f2` has the type `Int -> Float -> n Bool`, where `n` is of kind
> `* -> *` (and an instance of `Monad` class, but it's not yet the time to look
> for instanc
It seems to be an instance of
https://ghc.haskell.org/trac/ghc/ticket/7869
But it is fixed (both in HEAD and 7.8). Probably the fix is partial?
On Thu, 2014-12-04 at 14:53 -0500, Richard Eisenberg wrote:
> This seems straightforwardly to be a bug, to me. HEAD gives the same behavior
> you report
I don't see a bug here. f2 is perfectly OK, so, let's examine f1 more closely.
It tries to get `m Bool` by applying f1 to three arguments: 0, 0, and 'a'. Now,
since `f2` has the type `Int -> Float -> n Bool`, where `n` is of kind `* -> *`
(and an instance of `Monad` class, but it's not yet the t
Int -> Float -> Char -> Bool *is* in fact a valid type for f2, since ((->)
Char) is a Monad. However, I agree the error message is confusing,
especially the "expected n, but got n" part.
-Brent
On Thu, Dec 4, 2014 at 1:50 PM, Evan Laforge wrote:
> I recently got a confusing error msg, and redu
This seems straightforwardly to be a bug, to me. HEAD gives the same behavior
you report below. Please post on the bug tracker at
https://ghc.haskell.org/trac/ghc/newticket
Thanks!
Richard
On Dec 4, 2014, at 1:50 PM, Evan Laforge wrote:
> I recently got a confusing error msg, and reduced it t
I recently got a confusing error msg, and reduced it to a small case:
f1 :: Monad m => m Bool
f1 = f2 0 0 'a'
f2 :: Monad m => Int -> Float -> m Bool
f2 = undefined
From this, it's clear that f2 is being given an extra Char argument it
didn't ask for. However, the error msg (ghc 7.8.3) is: