stack: bump to lts-12.25
[comptalang.git] / lcc / Hcompta / LCC / Sym / FileSystem.hs
index d878c2fa5cf3028739808397b86e9f21abf755d6..2c32e2cd24554fe61d0e86bb2fc54966df6fa50e 100644 (file)
@@ -18,7 +18,7 @@ import qualified Prelude ()
 import Language.Symantic.Grammar
 import Language.Symantic
 
-import Hcompta.LCC.Journal (PathFile(..))
+import Hcompta.LCC.IO (PathFile(..))
 
 -- * Class 'Sym_PathFile'
 type instance Sym PathFile = Sym_PathFile
@@ -35,8 +35,10 @@ instance (Sym_PathFile r1, Sym_PathFile r2) => Sym_PathFile (Dup r1 r2) where
        pathfile x = pathfile x `Dup` pathfile x
 instance (Sym_PathFile term, Sym_Lambda term) => Sym_PathFile (BetaT term)
 
+instance NameTyOf PathFile where
+       nameTyOf _c = ["FS"] `Mod` "PathFile"
 instance ClassInstancesFor PathFile where
-       proveConstraintFor _ (TyApp _ (TyConst _ _ q) c)
+       proveConstraintFor _ (TyConst _ _ q :$ c)
         | Just HRefl <- proj_ConstKiTy @(K PathFile) @PathFile c
         = case () of
                 _ | Just Refl <- proj_Const @Eq q   -> Just Dict
@@ -66,9 +68,9 @@ instance -- Gram_Term_AtomsFor
                         <$> char '.'
                         <*> (concat <$> some ((:) <$> char '/' <*> g_pathfile_section))
                g_pathfile_section :: CF g FilePath
-               g_pathfile_section = some (choice $ unicat <$> [Unicat_Letter, Unicat_Number])
+               g_pathfile_section = some (choice $ char '.' : (unicat <$> [Unicat_Letter, Unicat_Number]))
 instance (Source src, SymInj ss PathFile) => ModuleFor src ss PathFile where
-       moduleFor = ["PathFile"] `moduleWhere`
+       moduleFor = ["FS", "PathFile"] `moduleWhere`
         [
         ]