In [1]:
import IHaskell.Display

-- My widget type
data Slider = Slider

instance IHaskellDisplay Slider where
  display Slider = return $ Display []
  
instance IHaskellWidget Slider where
  targetName _ = "WidgetModel"
  open _ s = s undefined >> error "what"
  
In [2]:
:ext QuasiQuotes
_ <- [myQQ| blah
    blah
    blah |]
Not in scope: `myQQ'
In [3]:
:!cd ..
:!pwd
/Users/silver
In [1]:
import Text.Parsec
import Text.Parsec.String
import Text.Parsec.Prim
import Text.Parsec.Char

data List = List [Float] deriving Show

let -- Parse a nonempty int list like [1, 2, 3]
    parser :: Parser List
    parser = do
      char '['
      values <- option [] $ many1 (try float <|> int)
      char ']'
      return $ List values
      
    -- Parse an element of an int list,  like "3, "
    int :: Parser Float
    int = do
      value <- many1 $ oneOf "0123456789"
      optional $ char ','
      whitespace
      return (fromIntegral (read value :: Int) :: Float)
      
    float :: Parser Float
    float = do
      value <- many1 $ oneOf "0123456789"
      char '.'
      after <- many1 $ oneOf "0123456789"
      optional $ char ','
      whitespace
      return (read (value ++ "." ++ after) :: Float)
      
    -- Parse any whitespace
    whitespace = many $ oneOf " \t"
    
parser
Unshowable:Parser ListNo instance for (Show (Parser List)) arising from a use of `print'
Possible fix: add an instance declaration for (Show (Parser List))
In a stmt of an interactive GHCi command: print it
In [ ]: