    {-|
    Module      : View
    Description : Local definition of view
    Copyright   : (c) Eric Mertens, 2016
    License     : ISC
    Maintainer  : emertens@gmail.com

    -}
    module View (view) where

    import Data.Functor.Const

    -- | Local definition of lens package's view.
    view :: ((a -> Const a a) -> s -> Const a s) -> s -> a
    view :: forall a s. ((a -> Const a a) -> s -> Const a s) -> s -> a
    view (a -> Const a a) -> s -> Const a s
    l s
    x = Const a s -> a
    forall {k} a (b :: k). Const a b -> a
    getConst ((a -> Const a a) -> s -> Const a s
    l a -> Const a a
    forall {k} a (b :: k). a -> Const a b
    Const s
    x)