diff options
| author | Omni Worker <bot@omni.agent> | 2025-11-21 06:26:49 -0500 |
|---|---|---|
| committer | Omni Worker <bot@omni.agent> | 2025-11-21 06:26:49 -0500 |
| commit | 717d58af46f4cc81baea27f4eab9a58e01dae24a (patch) | |
| tree | 7d69a43a202703c32e0588d3c4409699e1536204 /Omni/Namespace.hs | |
| parent | bf7a6695c972b61e693aa0a239ab4fa66f369466 (diff) | |
fix: normalize haskell namespace and remove reproduce script
Amp-Thread-ID:
https://ampcode.com/threads/T-79499d9e-f4f4-40de-893c-524c32a45483
Co-authored-by: Amp <amp@ampcode.com>
Diffstat (limited to 'Omni/Namespace.hs')
| -rw-r--r-- | Omni/Namespace.hs | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/Omni/Namespace.hs b/Omni/Namespace.hs index 5884507..a0f8a8e 100644 --- a/Omni/Namespace.hs +++ b/Omni/Namespace.hs @@ -111,7 +111,10 @@ toHaskellModule :: Namespace -> String toHaskellModule = toModule fromHaskellModule :: String -> Namespace -fromHaskellModule s = Namespace (List.splitOn "." s) Hs +fromHaskellModule s = + let s' = if ".hs" `List.isSuffixOf` s then List.take (length s - 3) s else s + s'' = map (\c -> if c == '/' then '.' else c) s' + in Namespace (List.splitOn "." s'') Hs toSchemeModule :: Namespace -> String toSchemeModule = toModule |
