diff options
author | Péter Diviánszky <divipp@gmail.com> | 2016-04-27 13:40:07 +0200 |
---|---|---|
committer | Péter Diviánszky <divipp@gmail.com> | 2016-04-27 13:40:07 +0200 |
commit | 354ab8759fd3879d85e392351bb9ea1aed173e98 (patch) | |
tree | 804a23050aac9473a2591de8aec5c3d83cf73532 /src | |
parent | 4b3046c72ec4c2a18595ae9631c1930bc8789345 (diff) |
adjust .out files
Diffstat (limited to 'src')
-rw-r--r-- | src/LambdaCube/Compiler/DesugaredSource.hs | 9 |
1 files changed, 4 insertions, 5 deletions
diff --git a/src/LambdaCube/Compiler/DesugaredSource.hs b/src/LambdaCube/Compiler/DesugaredSource.hs index c4ac22e2..af85af65 100644 --- a/src/LambdaCube/Compiler/DesugaredSource.hs +++ b/src/LambdaCube/Compiler/DesugaredSource.hs | |||
@@ -31,7 +31,6 @@ import LambdaCube.Compiler.DeBruijn | |||
31 | 31 | ||
32 | import qualified LambdaCube.Compiler.Pretty as Parser | 32 | import qualified LambdaCube.Compiler.Pretty as Parser |
33 | import LambdaCube.Compiler.Pretty hiding (Doc, braces, parens) | 33 | import LambdaCube.Compiler.Pretty hiding (Doc, braces, parens) |
34 | --import LambdaCube.Compiler.Lexer | ||
35 | 34 | ||
36 | -------------------------------------------------------------------------------- simple name | 35 | -------------------------------------------------------------------------------- simple name |
37 | 36 | ||
@@ -44,6 +43,9 @@ switchTick :: SName -> SName | |||
44 | switchTick (Ticked n) = n | 43 | switchTick (Ticked n) = n |
45 | switchTick n = Ticked n | 44 | switchTick n = Ticked n |
46 | 45 | ||
46 | -- TODO | ||
47 | --pattern CaseName :: SName -> SName | ||
48 | --pattern CaseName cs <- 'c':'a':'s':'e':cs where CaseName (c:cs) = "case" ++ cs | ||
47 | pattern CaseName :: SName -> SName | 49 | pattern CaseName :: SName -> SName |
48 | pattern CaseName cs <- (getCaseName -> Just cs) where CaseName (c:cs) = toLower c: cs ++ "Case" | 50 | pattern CaseName cs <- (getCaseName -> Just cs) where CaseName (c:cs) = toLower c: cs ++ "Case" |
49 | 51 | ||
@@ -52,10 +54,7 @@ getCaseName cs = case splitAt 4 $ reverse cs of | |||
52 | _ -> Nothing | 54 | _ -> Nothing |
53 | 55 | ||
54 | pattern MatchName :: SName -> SName | 56 | pattern MatchName :: SName -> SName |
55 | pattern MatchName cs <- (getMatchName -> Just cs) where MatchName cs = "match" ++ cs | 57 | pattern MatchName cs <- 'm':'a':'t':'c':'h':cs where MatchName cs = "match" ++ cs |
56 | |||
57 | getMatchName ('m':'a':'t':'c':'h':cs) = Just cs | ||
58 | getMatchName _ = Nothing | ||
59 | 58 | ||
60 | 59 | ||
61 | -------------------------------------------------------------------------------- fixity | 60 | -------------------------------------------------------------------------------- fixity |