Hi.
> The definitions are accepted by GHC:
>
> class Functor f where
> type FC f a :: Constraint
> type FC f a = ()
>
> fmap :: (FC f a, FC f b) => (a -> b) -> f a -> f b
>
> instance Functor [] where
> fmap = map
Yes. This is what I would have expected to work.
> But
That would be nice. It would also be nice to be able to use _ in type
signatures as in:
const :: a -> _ -> a
const x _ = x
During type checking each _ could be replaced by a new unique type
variable. Visa versa should also be possible: during type inferencing each
unique type variable could be re
On Mon, Jan 9, 2012 at 12:30 AM, Antoine Latter wrote:
> On Sun, Jan 8, 2012 at 11:21 PM, wren ng thornton wrote:
>>
>>
>> Couldn't the following work?
>>
>>
>> class Functor f where
>> type C f :: * -> Constraint
>> type C f _ = ()
>>
>
> I get a parse error from that.
>
> The e
On Sun, Jan 8, 2012 at 11:21 PM, wren ng thornton wrote:
>
>
> Couldn't the following work?
>
>
> class Functor f where
> type C f :: * -> Constraint
> type C f _ = ()
>
I get a parse error from that.
The equivalent:
class Functor f where
type FC f :: * -> Constraint
On 12/30/11 10:58 PM, Matthew Farkas-Dyck wrote:
On 30/12/2011, Andriy Polischuk wrote:
Consider this example:
quux (y . (foo>.< bar).baz (f . g)) moo
It's not that easy to distinguish from
quux (y . (foo>.< bar) . baz (f . g)) moo
Yeah, that's why I dislike dot as compose operator (^_~)
On 12/28/11 1:34 PM, Donn Cave wrote:
Quoth Greg Weber,
On Wed, Dec 28, 2011 at 2:12 PM, Donn Cave wrote:
...
I would think row polymorphism is a must-have.
Perhaps if you want *extensible* records. If you would like to make some
progress with records in the near future rather than keeping
On 1/8/12 8:32 AM, Bas van Dijk wrote:
On 23 December 2011 17:44, Simon Peyton-Jones wrote:
My attempt at forming a new understanding was driven by your example.
class Functor f where
type C f :: * -> Constraint
type C f = ()
sorry -- that was simply type incorrect. () does not have
On 12/23/11 12:57 PM, Tyson Whitehead wrote:
On December 23, 2011 09:37:04 Ganesh Sittampalam wrote:
On 23/12/2011 13:46, Ian Lynagh wrote:
On Fri, Dec 23, 2011 at 01:34:49PM +, Simon Peyton-Jones wrote:
Arguments Boxed Unboxed
3 ( , , )(# , , #)
2 ( , )
On 12/23/11 8:34 AM, Simon Peyton-Jones wrote:
More uniform! If you the singleton-unboxed-tuple data constructor in source code,
as a function, you'd write (\x -> (# x #)). In a pattern, or applied, you'd
write (# x #).
Shouldn't (# T #) be identical to T?
I know that a putative (T) woul
On 12/22/11 2:28 PM, J. Garrett Morris wrote:
2011/12/22 Edward Kmett:
The change, however, was a deliberate _break_ with the standard that
passed through the library review process a few months ago, and is now
making its way out into the wild.
Is it reasonable to enquire how many standard-com
On 08/01/2012, Gábor Lehel wrote:
> 2012/1/8 Greg Weber :
>>
>>
>> 2012/1/8 Gábor Lehel
>>>
>>> Thank you. I have a few questions/comments.
>>>
>>>
>>>
>>> "The module/record ambiguity is dealt with in Frege by preferring
>>> modules and requiring a module prefix for the record if there is
>>> am
2012/1/8 Greg Weber :
>
>
> 2012/1/8 Gábor Lehel
>>
>> >
>> >>
>> >>
>> >>
>> >> Later on you write that the names of record fields are only accessible
>> >> from the record's namespace and via record syntax, but not from the
>> >> global scope. For Haskell I think it would make sense to reverse t
2012/1/8 Gábor Lehel
> 2012/1/8 Ingo Wechsung :
> >
> >
> > 2012/1/8 Gábor Lehel
> >
> >>
> >> The second is that only the author of the datatype could put functions
> >> into its namespace; the 'data.foo' notation would only be available
> >> for functions written by the datatype's author, whil
2012/1/8 Gábor Lehel
>
> >
> >>
> >>
> >>
> >> Later on you write that the names of record fields are only accessible
> >> from the record's namespace and via record syntax, but not from the
> >> global scope. For Haskell I think it would make sense to reverse this
> >> decision. On the one hand,
On 23 December 2011 17:44, Simon Peyton-Jones wrote:
> My attempt at forming a new understanding was driven by your example.
>
> class Functor f where
> type C f :: * -> Constraint
> type C f = ()
>
> sorry -- that was simply type incorrect. () does not have kind * ->
> Constraint
So am I
2012/1/8 Ingo Wechsung :
>
>
> 2012/1/8 Gábor Lehel
>
>>
>> The second is that only the author of the datatype could put functions
>> into its namespace; the 'data.foo' notation would only be available
>> for functions written by the datatype's author, while for every other
>> function you would h
2012/1/8 Gábor Lehel
> The second is that only the author of the datatype could put functions
> into its namespace; the 'data.foo' notation would only be available
> for functions written by the datatype's author, while for every other
> function you would have to use 'foo data'. I dislike this
2012/1/8 Gábor Lehel :
> 2012/1/8 Greg Weber :
>>
>>
>> 2012/1/8 Gábor Lehel
>>>
>>> Thank you. I have a few questions/comments.
>>>
>>>
>>>
>>> "The module/record ambiguity is dealt with in Frege by preferring
>>> modules and requiring a module prefix for the record if there is
>>> ambiguity."
>>
2012/1/8 Greg Weber :
>
>
> 2012/1/8 Gábor Lehel
>>
>> Thank you. I have a few questions/comments.
>>
>>
>>
>> "The module/record ambiguity is dealt with in Frege by preferring
>> modules and requiring a module prefix for the record if there is
>> ambiguity."
>>
>> I think I see why they do it thi
19 matches
Mail list logo