{-# language DerivingStrategies, GeneralizedNewtypeDeriving #-}

module NameType where

import Data.String (IsString, String)

-- | The name of an anonymous file
--
-- The name is used as a filename and will be displayed as the target of the corresponding symbolic link in the directory @\/proc\/self\/fd\/@. The displayed name is always prefixed with "memfd:" and serves only for debugging purposes. Names do not affect the behavior of the file descriptor, and as such multiple files can have the same name without any side effects.
--
newtype Name = NameString{ Name -> String
nameString :: String }
    deriving newtype String -> Name
(String -> Name) -> IsString Name
forall a. (String -> a) -> IsString a
fromString :: String -> Name
$cfromString :: String -> Name
IsString