Fix description.
[haskell/symantic.git] / symantic-lib / Language / Symantic / Lib / List.hs
index 048d4d5e31da9616145e3c94290230848a56e0da..db4b515d70e2b522d4f044ee501819108b9ccaa4 100644 (file)
@@ -108,26 +108,26 @@ instance
         [ rule "teList_list" $
                between (symbol "[") (symbol "]") listG
         , rule "teList_empty" $
-               withMeta $
-               (\src -> BinTree0 $ Token_Term $ TermVT_CF teList_empty `setSource` src)
+               g_source $
+               (\src -> BinTree0 $ Token_Term $ TermAVT teList_empty `setSource` src)
                 <$ symbol "["
                 <* symbol "]"
         ]
                where
                listG :: CF g (AST_Term src ss)
                listG = rule "list" $
-                       withMeta $
+                       g_source $
                        (\a mb src ->
                                case mb of
-                                Just b_  -> BinTree2 (BinTree2 (BinTree0 $ Token_Term $ TermVT_CF $ (`setSource` src) $ teList_cons) a) b_
+                                Just b  -> BinTree2 (BinTree2 (BinTree0 $ Token_Term $ TermAVT $ (`setSource` src) $ teList_cons) a) b
                                 Nothing ->
                                        BinTree2
-                                        (BinTree2 (BinTree0 $ Token_Term $ TermVT_CF $ (`setSource` src) $ teList_cons) a)
-                                        (BinTree0 $ Token_Term $ TermVT_CF $ (`setSource` src) $ teList_empty))
+                                        (BinTree2 (BinTree0 $ Token_Term $ TermAVT $ (`setSource` src) $ teList_cons) a)
+                                        (BinTree0 $ Token_Term $ TermAVT $ (`setSource` src) $ teList_empty))
                         <$> g_term
                         <*> option Nothing (Just <$ symbol "," <*> listG)
-instance (Source src, Inj_Sym ss []) => Module src ss [] where
-       module_ _s = [] `moduleWhere`
+instance (Source src, Inj_Sym ss []) => ModuleFor src ss [] where
+       moduleFor _s = ["List"] `moduleWhere`
         [ "[]"      := teList_empty
         , "zipWith" := teList_zipWith
         , ":" `withInfixR` 5 := teList_cons