Skip to content

Commit

Permalink
Merge pull request #6 from Frege/dev/refactor
Browse files Browse the repository at this point in the history
Do not show generated identifier
  • Loading branch information
mmhelloworld committed Jan 22, 2014
2 parents e28e821 + 279c8d2 commit 4ba5bd5
Showing 1 changed file with 6 additions and 7 deletions.
13 changes: 6 additions & 7 deletions src/main/frege/frege/repl/FregeRepl.fr
Original file line number Diff line number Diff line change
Expand Up @@ -76,12 +76,10 @@ print console _ (InterpreterResult{typ=EvalSuccess, messages=msgs}) =
print console _
(InterpreterResult{typ=Interpret symbol g _, env=state}) = do
let res = showableSymbol state g symbol
case res of
Just (sym, g, newInterpEnv) -> do
valEither <- fieldValue (symbolClass sym g) (symbolVar sym) newInterpEnv.loader
console.println $ maybe "undefined" id valEither
Nothing -> console.println $ showSymbol g symbol
_ -> return ()
getValue (sym, g, newInterpEnv) = do
valMaybe <- fieldValue (symbolClass sym g) (symbolVar sym) newInterpEnv.loader
console.println $ maybe "undefined" id valMaybe
maybe (console.println $ getSymbolType g symbol) getValue res
`catch` (println . showThrowableCause)
print _ _ _ = return ()

Expand Down Expand Up @@ -246,7 +244,8 @@ helpGUI title content = do
frame.setVisible true

data FregeJavaProxy = pure native frege.interpreter.javasupport.FregeJavaProxy where
native with frege.interpreter.javasupport.FregeJavaProxy.with :: (Object -> Method -> ObjectArr -> ST s a) -> Class c -> IO c
native with frege.interpreter.javasupport.FregeJavaProxy.with ::
(Object -> Method -> ObjectArr -> ST s a) -> Class c -> IO c

showDesktop :: Object -> Method -> ObjectArr -> IO ()
showDesktop _ _ args = do
Expand Down

0 comments on commit 4ba5bd5

Please sign in to comment.