mirror of
https://github.com/GrammaticalFramework/gf-core.git
synced 2026-04-22 11:19:32 -06:00
silence Tab warnings in the Haskell runtime
This commit is contained in:
@@ -71,12 +71,12 @@ pIdent =
|
|||||||
-- where
|
-- where
|
||||||
insideChar = RP.readS_to_P $ \s ->
|
insideChar = RP.readS_to_P $ \s ->
|
||||||
case s of
|
case s of
|
||||||
[] -> []
|
[] -> []
|
||||||
('\\':'\\':cs) -> [('\\',cs)]
|
('\\':'\\':cs) -> [('\\',cs)]
|
||||||
('\\':'\'':cs) -> [('\'',cs)]
|
('\\':'\'':cs) -> [('\'',cs)]
|
||||||
('\\':cs) -> []
|
('\\':cs) -> []
|
||||||
('\'':cs) -> []
|
('\'':cs) -> []
|
||||||
(c:cs) -> [(c,cs)]
|
(c:cs) -> [(c,cs)]
|
||||||
|
|
||||||
isIdentFirst c =
|
isIdentFirst c =
|
||||||
(c == '_') ||
|
(c == '_') ||
|
||||||
|
|||||||
@@ -297,27 +297,27 @@ process flit ftok cnc (item@(Active j ppos funid seqid args key0):items) acc cha
|
|||||||
Nothing -> process flit ftok cnc items4 acc' chart{active=insertAC key (Set.singleton item,new_sc) (active chart)}
|
Nothing -> process flit ftok cnc items4 acc' chart{active=insertAC key (Set.singleton item,new_sc) (active chart)}
|
||||||
Just (set,sc) | Set.member item set -> process flit ftok cnc items acc chart
|
Just (set,sc) | Set.member item set -> process flit ftok cnc items acc chart
|
||||||
| otherwise -> process flit ftok cnc items2 acc chart{active=insertAC key (Set.insert item set,IntMap.unionWith Set.union new_sc sc) (active chart)}
|
| otherwise -> process flit ftok cnc items2 acc chart{active=insertAC key (Set.insert item set,IntMap.unionWith Set.union new_sc sc) (active chart)}
|
||||||
SymKS tok -> let !acc' = ftok_ [tok] (Active j (ppos+1) funid seqid args key0) acc
|
SymKS tok -> let !acc' = ftok_ [tok] (Active j (ppos+1) funid seqid args key0) acc
|
||||||
in process flit ftok cnc items acc' chart
|
in process flit ftok cnc items acc' chart
|
||||||
SymNE -> process flit ftok cnc items acc chart
|
SymNE -> process flit ftok cnc items acc chart
|
||||||
SymBIND -> let !acc' = ftok_ ["&+"] (Active j (ppos+1) funid seqid args key0) acc
|
SymBIND -> let !acc' = ftok_ ["&+"] (Active j (ppos+1) funid seqid args key0) acc
|
||||||
in process flit ftok cnc items acc' chart
|
in process flit ftok cnc items acc' chart
|
||||||
SymSOFT_BIND->process flit ftok cnc ((Active j (ppos+1) funid seqid args key0):items) acc chart
|
SymSOFT_BIND->process flit ftok cnc ((Active j (ppos+1) funid seqid args key0):items) acc chart
|
||||||
SymSOFT_SPACE->process flit ftok cnc ((Active j (ppos+1) funid seqid args key0):items) acc chart
|
SymSOFT_SPACE->process flit ftok cnc ((Active j (ppos+1) funid seqid args key0):items) acc chart
|
||||||
SymCAPIT -> let !acc' = ftok_ ["&|"] (Active j (ppos+1) funid seqid args key0) acc
|
SymCAPIT -> let !acc' = ftok_ ["&|"] (Active j (ppos+1) funid seqid args key0) acc
|
||||||
in process flit ftok cnc items acc' chart
|
in process flit ftok cnc items acc' chart
|
||||||
SymALL_CAPIT->let !acc' = ftok_ ["&|"] (Active j (ppos+1) funid seqid args key0) acc
|
SymALL_CAPIT->let !acc' = ftok_ ["&|"] (Active j (ppos+1) funid seqid args key0) acc
|
||||||
in process flit ftok cnc items acc' chart
|
in process flit ftok cnc items acc' chart
|
||||||
SymKP syms vars
|
SymKP syms vars
|
||||||
-> let to_tok (SymKS t) = [t]
|
-> let to_tok (SymKS t) = [t]
|
||||||
to_tok SymBIND = ["&+"]
|
to_tok SymBIND = ["&+"]
|
||||||
to_tok SymSOFT_BIND = []
|
to_tok SymSOFT_BIND = []
|
||||||
to_tok SymSOFT_SPACE= []
|
to_tok SymSOFT_SPACE= []
|
||||||
to_tok SymCAPIT = ["&|"]
|
to_tok SymCAPIT = ["&|"]
|
||||||
to_tok SymALL_CAPIT = ["&|"]
|
to_tok SymALL_CAPIT = ["&|"]
|
||||||
to_tok _ = []
|
to_tok _ = []
|
||||||
|
|
||||||
!acc' = foldl (\acc syms -> ftok_ (concatMap to_tok syms) (Active j (ppos+1) funid seqid args key0) acc) acc
|
!acc' = foldl (\acc syms -> ftok_ (concatMap to_tok syms) (Active j (ppos+1) funid seqid args key0) acc) acc
|
||||||
(syms:[syms' | (syms',_) <- vars])
|
(syms:[syms' | (syms',_) <- vars])
|
||||||
in process flit ftok cnc items acc' chart
|
in process flit ftok cnc items acc' chart
|
||||||
SymLit d r -> let PArg hypos fid = args !! d
|
SymLit d r -> let PArg hypos fid = args !! d
|
||||||
|
|||||||
@@ -109,11 +109,11 @@ mkProbDefs :: PGF -> ([[CId]],[(CId,Type,[Equation])])
|
|||||||
mkProbDefs pgf =
|
mkProbDefs pgf =
|
||||||
let cs = [(c,hyps,fns) | (c,(hyps0,fs,_)) <- Map.toList (cats (abstract pgf)),
|
let cs = [(c,hyps,fns) | (c,(hyps0,fs,_)) <- Map.toList (cats (abstract pgf)),
|
||||||
not (elem c [cidString,cidInt,cidFloat]),
|
not (elem c [cidString,cidInt,cidFloat]),
|
||||||
let hyps = zipWith (\(bt,_,ty) n -> (bt,mkCId ('v':show n),ty))
|
let hyps = zipWith (\(bt,_,ty) n -> (bt,mkCId ('v':show n),ty))
|
||||||
hyps0
|
hyps0
|
||||||
[1..]
|
[1..]
|
||||||
fns = [(f,ty) | (_,f) <- fs,
|
fns = [(f,ty) | (_,f) <- fs,
|
||||||
let Just (ty,_,_,_) = Map.lookup f (funs (abstract pgf))]
|
let Just (ty,_,_,_) = Map.lookup f (funs (abstract pgf))]
|
||||||
]
|
]
|
||||||
((_,css),eqss) = mapAccumL (\(ngen,css) (c,hyps,fns) ->
|
((_,css),eqss) = mapAccumL (\(ngen,css) (c,hyps,fns) ->
|
||||||
let st0 = (1,Map.empty)
|
let st0 = (1,Map.empty)
|
||||||
|
|||||||
Reference in New Issue
Block a user