14 May 2018

webkit

System: Slackware Linux (version 14.0)
CPUs: Intel(R) Atom(TM) CPU N270 @1.60GHz
Deps: geoclue-0.12.99.tar.gz, webkit-1.8.3.tar.xz

This entry will look at a browser written in Haskell.

http://slackbuilds.org/repository/14.0/system/geoclue/
geoclue-0.12.99.tar.gz

http://slackbuilds.org/repository/14.0/libraries/webkitgtk/
webkit-1.8.3.tar.xz
webkitgtk.tar.gz

http://hackage.haskell.org/package/Cabal-1.24.0.0
Cabal-1.24.0.0.tar.gz

sh-4.2$ cd Cabal-1.24.0.0
sh-4.2$ ghc -threaded --make Setup

...
sh-4.2$ ./Setup configure --user
Configuring Cabal-1.24.0.0...
sh-4.2$
sh-4.2$ ./Setup build

...
sh-4.2$ ./Setup haddock

...
sh-4.2$ find -print0 | xargs -0 file | grep -e "shared object" | grep ELF \
> | cut -f 1 -d : | xargs strip --strip-unneeded 2> /dev/null || true
sh-4.2$ ./Setup install

...
sh-4.2$

http://hackage.haskell.org/package/Cabal-1.24.0.0
gtk2hs-buildtools-0.13.1.0.tar.gz

sh-4.2$ runghc Setup configure --user
Configuring gtk2hs-buildtools-0.13.1.0...
sh-4.2$ runghc Setup build

...
sh-4.2$ runghc Setup haddock

...
sh-4.2$ find -print0 | xargs -0 file | grep -e "executable" -e "shared object" | grep ELF \
> | cut -f 1 -d : | xargs strip --strip-unneeded 2> /dev/null || true
sh-4.2$ runghc Setup install

...
sh-4.2$

http://hackage.haskell.org/package/webkit
webkit-0.14.2.1.tar.gz

sh-4.2$ runghc Setup configure --user
Configuring webkit-0.14.2.1...
sh-4.2$ runghc Setup build

...
sh-4.2$ runghc Setup haddock

...
sh-4.2$ find -print0 | xargs -0 file | grep -e "shared object" | grep ELF \
> | cut -f 1 -d : | xargs strip --strip-unneeded 2> /dev/null || true
sh-4.2$ runghc Setup install

...
sh-4.2$

running webkit-0.14.2.1/demo/Webkit.hs connected to a URL, but
I noticed that the unicode codepoint 0x25E5 failed to render  

web-browser-in-haskell-1.0.tar.gz

sh-4.2$ runghc Setup configure --user
Configuring web-browser-in-haskell-1.0...
sh-4.2$ runghc Setup build
Building web-browser-in-haskell-1.0...
Preprocessing library web-browser-in-haskell-1.0...
[1 of 1] Compiling WebBrowser.Browser ( WebBrowser/Browser.hs,
 dist/build/WebBrowser/Browser.o )

WebBrowser/Browser.hs:137:3:
    Could not deduce (glib-0.13.2.2:System.Glib.UTFString.GlibString
                        string0)
      arising from a use of `toolbarAppendNewWidget'
    from the context (NotebookClass self, Show a)
      bound by the inferred type of
               repeating :: (NotebookClass self, Show a) =>
                            self -> IORef a -> IO WebView
               browserViewNewTab :: (NotebookClass self, Show a) =>
                                    self -> IORef a -> WebFrame -> IO WebView
      at WebBrowser/Browser.hs:(86,1)-(192,16)
    The type variable `string0' is ambiguous
    Note: there are several potential instances:
      instance glib-0.13.2.2:System.Glib.UTFString.GlibString
                 text-1.2.0.3:Data.Text.Internal.Text
        -- Defined in `glib-0.13.2.2:System.Glib.UTFString'
      instance glib-0.13.2.2:System.Glib.UTFString.GlibString [Char]
        -- Defined in `glib-0.13.2.2:System.Glib.UTFString'
    In a stmt of a 'do' block: toolbarAppendNewWidget tool h Nothing
    In the expression:
      do { widgetShowAll ntbk;
           tab2 <- tableNew 1 5 False;
           button2 <- buttonNew;
           buttonSetFocusOnClick button2 False;
           .... }
    In an equation for `repeating':
        repeating ntbk cnt
          = do { widgetShowAll ntbk;
                 tab2 <- tableNew 1 5 False;
                 button2 <- buttonNew;
                 .... }

WebBrowser/Browser.hs:153:5:
    Could not deduce (glib-0.13.2.2:System.Glib.UTFString.GlibString
                        string1)
      arising from a use of `webFrameGetUri'
    from the context (NotebookClass self, Show a)
      bound by the inferred type of
               repeating :: (NotebookClass self, Show a) =>
                            self -> IORef a -> IO WebView
               browserViewNewTab :: (NotebookClass self, Show a) =>
                                    self -> IORef a -> WebFrame -> IO WebView
      at WebBrowser/Browser.hs:(86,1)-(192,16)
    The type variable `string1' is ambiguous
    Note: there are several potential instances:
      instance glib-0.13.2.2:System.Glib.UTFString.GlibString
                 text-1.2.0.3:Data.Text.Internal.Text
        -- Defined in `glib-0.13.2.2:System.Glib.UTFString'
      instance glib-0.13.2.2:System.Glib.UTFString.GlibString [Char]
        -- Defined in `glib-0.13.2.2:System.Glib.UTFString'
    In the first argument of `(>>=)', namely `webFrameGetUri frame'
    In a stmt of a 'do' block:
      webFrameGetUri frame
      >>=
        \ uri
          -> do { ch <- webViewGetTitle wv;
                  let ...;
                  .... }
    In the expression:
      do { webFrameGetUri frame >>= \ uri -> do { ... } }
sh-4.2$

There is also the newer hbro using webkitgtk3, though
the author reported some problems/limitations with the
webkitgtk3 and gtk3 code.

NB: Cabal-1.22.0.0 was the first release that used a binary format setup-config file.