             escapedLine = line.replace(/"/g, '\\"')
             options.model.interpret escapedLine
               .map (e) ->
+                type: 'success'
                 input: line
                 code: e.msg[0]
                 highlightInformation: e.msg[1]
+              .catch (e) ->
+                error =
+                  input: line
+                  type: 'error'
+                  message: e.message
+                  warnings: e.warnings
+                Rx.Observable.just error
           .scan ((acc, x) -> [x].concat acc), []
           .startWith []
 

                CycleDOM.h 'span', { className: 'idris-repl-input-prompt' }, '> '
                line.input
              ]
            CycleDOM.h 'pre',
              {
                className: 'idris-repl-output'
                style: styles
              },
              [
                highlightedCode
              ]
          ]

      CycleDOM.h 'div',

Cycle = require '@cycle/core'
CycleDOM = require '@cycle/dom'
highlighter = require '../utils/highlighter'
Rx = require 'rx-lite'

fontOptions = () ->
  fontSize = atom.config.get 'language-idris.panelFontSize'
