Changes between Version 5 and Version 6 of Records/SyntaxDirectedNameResolution


Ignore:
Timestamp:
Feb 27, 2012 11:58:59 PM (3 years ago)
Author:
elaforge
Comment:

--

Legend:

Unmodified
Added
Removed
Modified
  • Records/SyntaxDirectedNameResolution

    v5 v6  
    8787get :: Lens record field -> record -> field
    8888val = get #a record
     89-- Due to type of 'get' and known type of 'record':
    8990#a :: Lens M.Record field
    9091-- Oops, can't apply # reduction, because its first argument type is 'Lens ...'
     
    115116val = get #a record
    116117
     118-- Due to type of 'get' and known type of 'record':
    117119#a :: Lens M.Record field
    118 -- # resolution on Lens:
     120-- # resolution on Lens M.Record:
    119121M.a :: Lens M.Record Int
    120122-- val is
    121123val = get M.a record
    122124}}}
    123 
    124125
    125126Let's try with composed lenses.
     
    158159-- Due to the definition of (!) and its return type being known:
    159160#a :: Lens Outer.Outer b
    160 -- # resolution on Lens:
     161-- # resolution on Lens Outer.Outer:
    161162Outer.a :: Lens Outer.Outer Inner.Inner
    162163-- Due to the second argument of (!) being known: