summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorPéter Diviánszky <divipp@gmail.com>2016-04-27 13:40:07 +0200
committerPéter Diviánszky <divipp@gmail.com>2016-04-27 13:40:07 +0200
commit354ab8759fd3879d85e392351bb9ea1aed173e98 (patch)
tree804a23050aac9473a2591de8aec5c3d83cf73532 /src
parent4b3046c72ec4c2a18595ae9631c1930bc8789345 (diff)
adjust .out files
Diffstat (limited to 'src')
-rw-r--r--src/LambdaCube/Compiler/DesugaredSource.hs9
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
32import qualified LambdaCube.Compiler.Pretty as Parser 32import qualified LambdaCube.Compiler.Pretty as Parser
33import LambdaCube.Compiler.Pretty hiding (Doc, braces, parens) 33import 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
44switchTick (Ticked n) = n 43switchTick (Ticked n) = n
45switchTick n = Ticked n 44switchTick 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
47pattern CaseName :: SName -> SName 49pattern CaseName :: SName -> SName
48pattern CaseName cs <- (getCaseName -> Just cs) where CaseName (c:cs) = toLower c: cs ++ "Case" 50pattern 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
54pattern MatchName :: SName -> SName 56pattern MatchName :: SName -> SName
55pattern MatchName cs <- (getMatchName -> Just cs) where MatchName cs = "match" ++ cs 57pattern MatchName cs <- 'm':'a':'t':'c':'h':cs where MatchName cs = "match" ++ cs
56
57getMatchName ('m':'a':'t':'c':'h':cs) = Just cs
58getMatchName _ = Nothing
59 58
60 59
61-------------------------------------------------------------------------------- fixity 60-------------------------------------------------------------------------------- fixity