
On Sun, Apr 14, 2013 at 5:10 PM, Christopher Howard
type Adjustment a = SaleVariables -> a
[...]
instance Monad Adjustment where
(>>=) = ... return = ...
Essentially, you can't partially apply type synonyms. I don't recall the exact reasoning, but if this sort of thing was allowed it would probably poke funny holes in the type system. Also, Control.Monad.Instances already supplies a Monad instance for functions (r -> a). So even if that did pass, you'd bump into overlapping instances anyway. Chris
-------- If I try this, I get
code: -------- Type synonym `Adjustment' should have 1 argument, but has been given none In the instance declaration for `Monad Adjustment' --------
But if I give an argument, then it doesn't compile either (it becomes a "*" kind). And I didn't want to make the type with a regular "data" declaration either, because then I have to give it a constructor, which doesn't fit with what I want the type to do.
-- frigidcode.com
_______________________________________________ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org/mailman/listinfo/haskell-cafe
-- Chris Wong, fixpoint conjurer e: lambda.fairy@gmail.com w: http://lfairy.github.io/