Hoogle Search

Within LTS Haskell 24.58 (ghc-9.10.3)

Note that Stackage only displays results for the latest LTS and Nightly snapshot. Learn more.

  1. iix :: Ixed m => Index m -> IndexedTraversal' (Index m) m (IxValue m)

    diagrams-lib Diagrams.Prelude

    An indexed version of ix.

    >>> Seq.fromList [a,b,c,d] & iix 2 %@~ f'
    fromList [a,b,f' 2 c,d]
    
    >>> Seq.fromList [a,b,c,d] & iix 2 .@~ h
    fromList [a,b,h 2,d]
    
    >>> Seq.fromList [a,b,c,d] ^@? iix 2
    Just (2,c)
    
    >>> Seq.fromList [] ^@? iix 2
    Nothing
    

  2. makeFieldsNoPrefix :: Name -> DecsQ

    diagrams-lib Diagrams.Prelude

    Generate overloaded field accessors based on field names which are only prefixed with an underscore (e.g. _name), not additionally with the type name (e.g. _fooName). This might be the desired behaviour in case the DuplicateRecordFields language extension is used in order to get rid of the necessity to prefix each field name with the type name. As an example:

    data Foo a  = Foo { _x :: Int, _y :: a }
    newtype Bar = Bar { _x :: Char }
    makeFieldsNoPrefix ''Foo
    makeFieldsNoPrefix ''Bar
    
    will create classes
    class HasX s a | s -> a where
    x :: Lens' s a
    class HasY s a | s -> a where
    y :: Lens' s a
    
    together with instances
    instance HasX (Foo a) Int
    instance HasY (Foo a) a where
    instance HasX Bar Char where
    
    For details, see classUnderscoreNoPrefixFields.
    makeFieldsNoPrefix = makeLensesWith classUnderscoreNoPrefixFields
    

  3. prefixed :: Prefixed t => t -> Prism' t t

    diagrams-lib Diagrams.Prelude

    A Prism stripping a prefix from a sequence when used as a Traversal, or prepending that prefix when run backwards:

    >>> "preview" ^? prefixed "pre"
    Just "view"
    
    >>> "review" ^? prefixed "pre"
    Nothing
    
    >>> prefixed "pre" # "amble"
    "preamble"
    

  4. suffixed :: Suffixed t => t -> Prism' t t

    diagrams-lib Diagrams.Prelude

    A Prism stripping a suffix from a sequence when used as a Traversal, or appending that suffix when run backwards:

    >>> "review" ^? suffixed "view"
    Just "re"
    
    >>> "review" ^? suffixed "tire"
    Nothing
    
    >>> suffixed ".o" # "hello"
    "hello.o"
    

  5. underscoreNoPrefixNamer :: FieldNamer

    diagrams-lib Diagrams.Prelude

    A FieldNamer that strips the _ off of the field name, lowercases the name, and skips the field if it doesn't start with an '_'.

  6. data FixedSegment (v :: Type -> Type) n

    diagrams-lib Diagrams.Segment

    FixedSegments are like Segments except that they have absolute locations. FixedSegment v is isomorphic to Located (Segment Closed v), as witnessed by mkFixedSeg and fromFixedSeg, but FixedSegment is convenient when one needs the absolute locations of the vertices and control points.

  7. fixedSegIso :: forall n (v :: Type -> Type) . (Num n, Additive v) => Iso' (FixedSegment v n) (Located (Segment Closed v n))

    diagrams-lib Diagrams.Segment

    Use a FixedSegment to make an Iso between an a fixed segment and a located segment.

  8. fromFixedSeg :: forall n (v :: Type -> Type) . (Num n, Additive v) => FixedSegment v n -> Located (Segment Closed v n)

    diagrams-lib Diagrams.Segment

    Convert a FixedSegment back into a located Segment.

  9. mkFixedSeg :: forall n (v :: Type -> Type) . (Num n, Additive v) => Located (Segment Closed v n) -> FixedSegment v n

    diagrams-lib Diagrams.Segment

    Create a FixedSegment from a located Segment.

  10. fixTrail :: forall (v :: Type -> Type) n . (Metric v, OrderedField n) => Located (Trail v n) -> [FixedSegment v n]

    diagrams-lib Diagrams.Trail

    Convert a concretely located trail into a list of fixed segments. unfixTrail is almost its left inverse.

Page 146 of many | Previous | Next