Skip to content
This repository

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse code

Solve error on parenthesized variables (try to solve issue #21)

  • Loading branch information...
commit 896a1886c0b7660fc21129efe1a79f1cdf0c9e44 1 parent 6801ade
Alejandro Serrano authored February 04, 2012
15  src/Main.hs
... ...
@@ -1,4 +1,4 @@
1  
-{-# LANGUAGE OverloadedStrings #-}
  1
+{-# LANGUAGE OverloadedStrings, TemplateHaskell #-}
2 2
 
3 3
 module Main where
4 4
 
@@ -21,14 +21,11 @@ import Scion.PersistentBrowser.Util (logToStdout)
21 21
 import GHC.IO.Handle (hDuplicate,hDuplicateTo)
22 22
 
23 23
 main :: IO ()
24  
-main = do
25  
-        args<-getArgs 
26  
-        case args of
27  
-                ("--version":_)->do
28  
-                        putStrLn ("scion-browser executable, version "++ (showVersion version))
29  
-                _-> do
30  
-                        runStateT (runInputT defaultSettings loop) initialState
31  
-                        return ()
  24
+main = do args <- getArgs 
  25
+          case args of
  26
+            ("--version":_) -> putStrLn ("scion-browser executable, version " ++ (showVersion version))
  27
+            _               -> do runStateT (runInputT defaultSettings loop) initialState
  28
+                                  return ()
32 29
 
33 30
 loop :: InputT BrowserM ()
34 31
 loop = do maybeLine <- getInputLine ""
5  src/Scion/PersistentBrowser/Parser/Internal.hs
@@ -539,6 +539,7 @@ toKindedVars :: [Type Doc] -> [TyVarBind Doc]
539 539
 toKindedVars []         = []
540 540
 toKindedVars ((TyVar d (Ident _ n1)):( (TyList _ (TyVar _ (Ident _ n2))): xs )) =
541 541
   (UnkindedVar d (Ident NoDoc $ n1 ++ "[" ++ n2 ++ "]")) : toKindedVars xs
542  
-toKindedVars ((TyVar d n):xs) = (UnkindedVar d n) : toKindedVars xs
543  
-toKindedVars (x:_)            = error $ show x
  542
+toKindedVars ((TyVar d n):xs)       = (UnkindedVar d n) : toKindedVars xs
  543
+toKindedVars ((TyParen _ inner):xs) = toKindedVars (inner:xs)
  544
+toKindedVars (x:_)                  = error $ show x
544 545
 
2  src/Scion/PersistentBrowser/ToDb.hs
@@ -60,7 +60,7 @@ saveDeclToDb moduleId (InstDecl doc ctx hd _) =
60 60
 -- Signatures
61 61
 saveDeclToDb moduleId (TypeSig doc names ty) =
62 62
   do mapM_ saveSignatureToDb names
63  
-  where saveSignatureToDb name = 
  63
+  where saveSignatureToDb name = do
64 64
           insert $ DbDecl DbSignature (getNameString name) (docToString doc) 
65 65
                           Nothing (Just (singleLinePrettyPrint ty)) Nothing moduleId
66 66
 -- Types

0 notes on commit 896a188

Please sign in to comment.
Something went wrong with that request. Please try again.