Skip to content

Commit

Permalink
Prserve case when parsing unknown/other enum values for OS,Arch and C…
Browse files Browse the repository at this point in the history
…ompiler
  • Loading branch information
dcoutts committed Mar 24, 2008
1 parent 941bede commit ada6097
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion Distribution/Compiler.hs
Expand Up @@ -81,7 +81,7 @@ classifyCompilerFlavor :: String -> CompilerFlavor
classifyCompilerFlavor s =
case lookup (lowercase s) compilerMap of
Just compiler -> compiler
Nothing -> OtherCompiler (lowercase s)
Nothing -> OtherCompiler s
where
compilerMap = [ (display compiler, compiler)
| compiler <- knownCompilerFlavors ]
Expand Down
4 changes: 2 additions & 2 deletions Distribution/System.hs
Expand Up @@ -48,7 +48,7 @@ classifyOS :: String -> OS
classifyOS s =
case lookup (lowercase s) osMap of
Just os -> os
Nothing -> OtherOS (lowercase s)
Nothing -> OtherOS s
where
osMap = [ (name, os)
| os <- knownOSs
Expand Down Expand Up @@ -95,7 +95,7 @@ classifyArch :: String -> Arch
classifyArch s =
case lookup (lowercase s) archMap of
Just arch -> arch
Nothing -> OtherArch (lowercase s)
Nothing -> OtherArch s
where
archMap = [ (name, arch)
| arch <- knownArches
Expand Down

0 comments on commit ada6097

Please sign in to comment.