Changes between Initial Version and Version 1 of Ticket #12143


Ignore:
Timestamp:
Jun 1, 2016 11:59:07 PM (3 years ago)
Author:
MichaelBurge
Comment:

Legend:

Unmodified
Added
Removed
Modified
  • Ticket #12143 – Description

    initial v1  
    1 If I bring in a spurious parameter, ApplicativeDo correctly infers Functor.
     1If I bring in a spurious parameter, ApplicativeDo correctly infers Functor if I bind an unused variable:
    22{{{
    33Prelude> :t \m -> do { x <- m; return True; }
     
    88}}}
    99
    10 However, without the spurious parameter, ApplicativeDo assumes monad.
    11 {{{
    12 Prelude> :t do { return True; }
    13 do { return True; } :: Monad m => m Bool
    14 }}}
     10It seems like if 'x' is unused, then 'x <- m' and 'm' should be equivalent.
    1511
    16 The first block in particular shows two examples that seem inconsistent when placed next to each other. It seems like if 'x' is unused, then 'x <- m' and 'm' should be equivalent.
    17 
    18 I would expect all of these to desugar to Functor or Applicative. And maybe 'return True' should be Monad, but 'do { return True; }' should be Applicative?
     12I would expect the second example desugar to Functor or Applicative. And maybe 'return True' should be Monad, but 'do { return True; }' should be Applicative?