@@ -15,6 +15,8 @@ module Dhall.DirectoryTree.Types
15
15
( FilesystemEntry (.. )
16
16
, DirectoryEntry
17
17
, FileEntry
18
+ , BinaryFileEntry
19
+ , TextFileEntry
18
20
, Entry (.. )
19
21
, User (.. )
20
22
, Group (.. )
@@ -67,14 +69,21 @@ pattern Make label entry <- App (Field (Var (V "_" 0)) (fieldSelectionLabel -> l
67
69
type DirectoryEntry = Entry (Seq FilesystemEntry )
68
70
69
71
-- | A file in the filesystem.
72
+ {-# DEPRECATED FileEntry "`FileEntry` is deprecated and will be removed eventually. Please use `TextFileEntry` instead." #-}
70
73
type FileEntry = Entry Text
71
74
75
+ -- | A binary file in the filesystem.
76
+ type BinaryFileEntry = Entry ByteString
77
+
78
+ -- | A text file in the filesystem.
79
+ type TextFileEntry = Entry Text
80
+
72
81
-- | A filesystem entry.
73
82
data FilesystemEntry
74
83
= DirectoryEntry (Entry (Seq FilesystemEntry ))
75
84
| FileEntry (Entry Text )
76
- | BinaryFileEntry ( Entry ByteString )
77
- | TextFileEntry ( Entry Text )
85
+ | BinaryFileEntry BinaryFileEntry
86
+ | TextFileEntry TextFileEntry
78
87
deriving (Eq , Generic , Ord , Show )
79
88
80
89
instance FromDhall FilesystemEntry where
@@ -83,8 +92,6 @@ instance FromDhall FilesystemEntry where
83
92
, extract = \ case
84
93
Make " directory" entry ->
85
94
DirectoryEntry <$> extract (autoWith normalizer) entry
86
- Make " file" entry ->
87
- FileEntry <$> extract (autoWith normalizer) entry
88
95
Make " binary-file" entry ->
89
96
BinaryFileEntry <$> extract (autoWith normalizer) entry
90
97
Make " text-file" entry ->
0 commit comments