{-# LANGUAGE NoImplicitPrelude #-}

-- | This module provides a first-class version
-- of the "Filesystem.Path.CurrentOS" module.
module ModularPrelude.Module.FilePath
  ( -- Module interface
    FilePathModule (..)
    -- Module contents
  , FilePathImplements (..)
  ) where


import Prelude (String)
import ModularPrelude
import qualified Filesystem.Path.CurrentOS as FilePath


data FilePathModule = FilePath
  { FilePathModule -> String -> FilePath
pack        :: String -> FilePath
  , FilePathModule -> FilePath -> String
unpack      :: FilePath -> String
  , FilePathModule -> FilePath -> FilePath -> Maybe FilePath
stripPrefix :: FilePath -> FilePath -> Maybe FilePath
  }


class FilePathImplements interface where
  _Filesystem_Path_CurrentOS_ :: interface

instance FilePathImplements FilePathModule where
  _Filesystem_Path_CurrentOS_ :: FilePathModule
_Filesystem_Path_CurrentOS_ = FilePath
    { pack :: String -> FilePath
pack        = String -> FilePath
FilePath.decodeString
    , unpack :: FilePath -> String
unpack      = FilePath -> String
FilePath.encodeString
    , stripPrefix :: FilePath -> FilePath -> Maybe FilePath
stripPrefix = FilePath -> FilePath -> Maybe FilePath
FilePath.stripPrefix
    }


instance Default FilePathModule where
  def :: FilePathModule
def = FilePathModule
forall interface. FilePathImplements interface => interface
_Filesystem_Path_CurrentOS_