symModSplit :: String -> (String, String)
symModSplit n =
    let modrest = span (`elem` nonSyms) n
    in case modrest of
        ([], _) -> modrest
        (m, '.':r) -> first (\m' -> m ++ (if null m' then id else ('.':) ) m')
                        $ symModSplit r
        _ -> error $ "Module part not followed by symbol in (" ++ show n ++ ")"
    where
        nonSyms = ['A'..'z'] ++ ['0'..'9'] ++ "_"
-----------------------------------------------------------------------------
symModSplit :: String -> (String, String)
symModSplit n =
    let modrest = span (`elem` nonSyms) n
    in case modrest of
        ([], _) -> modrest
        (m, '.':r) -> first (\m' -> m ++ (if null m' then id else ('.':) ) m')
                        $ symModSplit r
        _ -> error $ "Module part not followed by symbol in (" ++ show n ++ ")"
    where
        nonSyms = ['A'..'z'] ++ ['0'..'9'] ++ "_"
-----------------------------------------------------------------------------
symModSplit n =
    let modrest = span (`elem` nonSyms) n
    in case modrest of
        ([], _) -> modrest
        (m, '.':r) -> first (\m' -> m ++ (if null m' then id else ('.':) ) m')
                        $ symModSplit r
        _ -> error $ "Module part not followed by symbol in (" ++ show n ++ ")"
    where
        nonSyms = ['A'..'z'] ++ ['0'..'9'] ++ "_"
-----------------------------------------------------------------------------