Skip to content

Commit 4ba5bd5

Browse files
committed
Merge pull request #6 from Frege/dev/refactor
Do not show generated identifier
2 parents e28e821 + 279c8d2 commit 4ba5bd5

File tree

1 file changed

+6
-7
lines changed

1 file changed

+6
-7
lines changed

src/main/frege/frege/repl/FregeRepl.fr

+6-7
Original file line numberDiff line numberDiff line change
@@ -76,12 +76,10 @@ print console _ (InterpreterResult{typ=EvalSuccess, messages=msgs}) =
7676
print console _
7777
(InterpreterResult{typ=Interpret symbol g _, env=state}) = do
7878
let res = showableSymbol state g symbol
79-
case res of
80-
Just (sym, g, newInterpEnv) -> do
81-
valEither <- fieldValue (symbolClass sym g) (symbolVar sym) newInterpEnv.loader
82-
console.println $ maybe "undefined" id valEither
83-
Nothing -> console.println $ showSymbol g symbol
84-
_ -> return ()
79+
getValue (sym, g, newInterpEnv) = do
80+
valMaybe <- fieldValue (symbolClass sym g) (symbolVar sym) newInterpEnv.loader
81+
console.println $ maybe "undefined" id valMaybe
82+
maybe (console.println $ getSymbolType g symbol) getValue res
8583
`catch` (println . showThrowableCause)
8684
print _ _ _ = return ()
8785

@@ -246,7 +244,8 @@ helpGUI title content = do
246244
frame.setVisible true
247245

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

251250
showDesktop :: Object -> Method -> ObjectArr -> IO ()
252251
showDesktop _ _ args = do

0 commit comments

Comments
 (0)