@@ -1,6 +1,6 @@
11-- Copyright 2009-2010 Corey O'Connor
2+{-# LANGUAGE RankNTypes #-}
23{-# LANGUAGE ScopedTypeVariables #-}
3−{-# LANGUAGE Rank2Types #-}
44{-# LANGUAGE ExistentialQuantification #-}
55{-# LANGUAGE GADTs #-}
66{-# LANGUAGE FlexibleContexts #-}
@@ -98,7 +98,7 @@ instance Terminal TerminalHandle where
9898 output_handle (TerminalHandle t _) = output_handle t
9999
100100data DisplayHandle where
101− DisplayHandle :: DisplayTerminal d => d -> TerminalHandle -> DisplayState -> DisplayHandle
101+ DisplayHandle :: forall d . DisplayTerminal d => d -> TerminalHandle -> DisplayState -> DisplayHandle
102102
103103-- | Acquire display access to the given region of the display.
104104-- Currently all regions have the upper left corner of (0,0) and the lower right corner at
@@ -106,8 +106,7 @@ data DisplayHandle where
106106display_context :: MonadIO m => TerminalHandle -> DisplayRegion -> m DisplayHandle
107107display_context t b = do
108108 s <- initial_display_state
109− let c d = DisplayHandle d t s
110− display_terminal_instance t b c
109+ display_terminal_instance t b (\ d -> DisplayHandle d t s)
111110
112111data DisplayState = DisplayState
113112 { previous_output_ref :: IORef (Maybe SpanOpSequence)