concept directory in category haskell

appears as: directories, directory, directory, directories, The directory
Haskell in Depth

This is an excerpt from Manning's book Haskell in Depth.

  • hs-source-dirs, with the list of directories considered as root directories for the module hierarchies
  • With no command-line arguments given we start in the current directory and report an information on the whole directory tree. Note, that no matter the depth we are given, some tasks may require to traverse the whole tree. We use the -d argument to limit reporting directories, not traversing them. Note also, that we don’t follow symbolic links by default to avoid potentially non-termination conditions. Symbolic links can create loops in a directory structure.

    Get Programming with Haskell

    This is an excerpt from Manning's book Get Programming with Haskell.

    26.2.4. Reading the directory

    MARC records store all the information about a book in fields. Each field has a tag and subfields that tell you more about the information that’s in a book (such as author, title, subject, and publication date). Before you can worry about processing the fields, you need to look up all the information about those fields in the directory. Like everything else in our MARC records, the directory is a ByteString, but you can create another synonym for readability.

    Listing 26.15. Type synonym for MarcDirectoryRaw
    type MarcDirectoryRaw = B.ByteString

    Unlike the leader, which is always the first 24 characters, the directory can be of variable size. This is because each record may contain a different number of fields. You know that the directory starts after the leader, but you have to figure out where the directory ends. Unfortunately, the leader doesn’t tell you this information directly. Instead it tells you the base address, which is where the base record begins. The directory, then, is what’s missing from where the leader ends and the base record begins.