]> Git — Sourcephile - comptalang.git/blob - lcc/Hcompta/LCC/IO.hs
Add make target tar.
[comptalang.git] / lcc / Hcompta / LCC / IO.hs
1 {-# LANGUAGE DeriveDataTypeable #-}
2 {-# LANGUAGE GeneralizedNewtypeDeriving #-}
3 {-# LANGUAGE TypeFamilies #-}
4 {-# OPTIONS_GHC -fno-warn-orphans #-}
5 module Hcompta.LCC.IO where
6
7 import Control.DeepSeq (NFData(..))
8 import Data.Data (Data(..))
9 import Data.Eq (Eq(..))
10 import Data.Ord (Ord(..))
11 import Data.String (IsString(..))
12 import Data.Typeable (Typeable)
13 import Text.Show (Show(..))
14 import qualified System.FilePath.Posix as FP
15 import System.IO (IO)
16 -- import qualified System.Directory as IO
17
18 -- * Type 'PathFile'
19 newtype PathFile = PathFile FP.FilePath
20 deriving (Data, Eq, NFData, Ord, Show, Typeable)
21 instance IsString PathFile where
22 fromString = PathFile
23
24 -- ** Class 'FromFile'
25 class FromFile a where
26 fromFile :: PathFile -> IO a
27
28 -- * Type 'CanonFile'
29 newtype CanonFile = CanonFile PathFile
30 deriving (Data, Eq, NFData, Ord, Show, Typeable)