Re: [Haskell-cafe] ambiguous constraint errors

2008-05-29 Thread Daniil Elovkov
Hello Evan Laforge wrote: I have two related questions: #1 I'm getting some annoying type errors that I don't fully understand, and wind up having to do a workaround that I don't totally like. Here's a simplified version of my situation: data Ambi m = Ambi { ambi_monad :: m Int ,

Re: [Haskell-cafe] ambiguous constraint errors

2008-05-29 Thread Isaac Dupree
Evan Laforge wrote: I have two related questions: #1 I'm getting some annoying type errors that I don't fully understand, and wind up having to do a workaround that I don't totally like. Here's a simplified version of my situation: data Ambi m = Ambi { ambi_monad :: m Int , ambi_int

Re: [Haskell-cafe] ambiguous constraint errors

2008-05-29 Thread Evan Laforge
get_int sym = fmap ambi_int (lookup sym ambi_table :: Maybe (Ambi Maybe)) Of you and the type system you're the only one who knows that that value is not used. The type system doesn't use (all) the rules you have in your mind. It follows more simple ones. You judge by values, not only types

Re: [Haskell-cafe] ambiguous constraint errors

2008-05-29 Thread Isaac Dupree
Evan Laforge wrote: get_int sym = fmap ambi_int (lookup sym ambi_table :: Maybe (Ambi Maybe)) Of you and the type system you're the only one who knows that that value is not used. The type system doesn't use (all) the rules you have in your mind. It follows more simple ones. You judge by

Re: [Haskell-cafe] ambiguous constraint errors

2008-05-29 Thread Ryan Ingram
On 5/28/08, Evan Laforge [EMAIL PROTECTED] wrote: I have two related questions: #1 I'm getting some annoying type errors that I don't fully understand, and wind up having to do a workaround that I don't totally like. Here's a simplified version of my situation: data Ambi m = Ambi {

[Haskell-cafe] ambiguous constraint errors

2008-05-28 Thread Evan Laforge
I have two related questions: #1 I'm getting some annoying type errors that I don't fully understand, and wind up having to do a workaround that I don't totally like. Here's a simplified version of my situation: data Ambi m = Ambi { ambi_monad :: m Int , ambi_int :: Int } some_ambi