diff --git a/lib/resource-1.0/api/examples/Makefile b/lib/resource-1.0/api/examples/Makefile index b3d176815..b951b58b9 100644 --- a/lib/resource-1.0/api/examples/Makefile +++ b/lib/resource-1.0/api/examples/Makefile @@ -7,7 +7,11 @@ gfs: runghc mkgfs.hs exx: - gf ExxSwe.gf ExxGer.gf ExxFre.gf ExxFin.gf ExxEng.gf >= (mapM_ mkLink . lines) mkLink line = case break (=="--") (words (takeWhile (/='#')line)) of - (fun : ":" : typ, _ : num : ex) -> + (fun : ":" : typ, _ : num : ex) | isDigit (head num) -> appendFile tgt ("\n" ++ takeInit line ++ " " ++ link ex typ num) _ -> appendFile tgt ("\n" ++ line) where takeInit line = init (init (takeWhile (/='.') line)) - link ex typ num = - "" ++ unwords ex ++ "" + link ex typ num = + "" ++ unwords ex ++ "" example typ num = case reverse typ of ";":val:_ -> "ex" ++ init num ++ "_" ++ val val:_ -> "ex" ++ init num ++ "_" ++ val