diff --git a/Hakyll/Web/Agda.hs b/Hakyll/Web/Agda.hs
--- a/Hakyll/Web/Agda.hs
+++ b/Hakyll/Web/Agda.hs
@@ -9,7 +9,7 @@
     , pandocAgdaCompiler
     ) where
 
-import           Agda.Interaction.FindFile (findFile)
+import           Agda.Interaction.FindFile (findFile, SourceFile(..))
 import           Agda.Interaction.Highlighting.Precise
 import qualified Agda.Interaction.Imports as Imp
 import           Agda.Interaction.Options
@@ -28,6 +28,9 @@
 import qualified Data.IntMap as IntMap
 import           Data.List (groupBy, isInfixOf, isPrefixOf, tails)
 import           Data.Maybe (fromMaybe)
+import qualified Data.Set as Set
+import           Data.Text.Lazy (Text)
+import qualified Data.Text.Lazy as TL
 import           Hakyll.Core.Compiler
 import           Hakyll.Core.Identifier
 import           Hakyll.Core.Item
@@ -40,16 +43,18 @@
 import           Text.XHtml.Strict
 import qualified Data.Text as T
 
-checkFile :: AbsolutePath -> TCM TopLevelModuleName
+checkFile :: SourceFile -> TCM TopLevelModuleName
 checkFile file = do
     TCM.resetState
-    toTopLevelModuleName . TCM.iModuleName . fst <$> Imp.typeCheckMain file Imp.TypeCheck
+    info <- Imp.sourceInfo file
+    toTopLevelModuleName . TCM.iModuleName . fst <$>
+      Imp.typeCheckMain file Imp.TypeCheck info
 
-getModule :: TopLevelModuleName -> TCM (HighlightingInfo, String)
+getModule :: TopLevelModuleName -> TCM (HighlightingInfo, Text)
 getModule m = do
     Just mi <- TCM.getVisitedModule m
     f <- findFile m
-    s <- liftIO . UTF8.readTextFile . filePath $ f
+    s <- liftIO . UTF8.readTextFile . filePath . srcFilePath $ f
     return (TCM.iHighlighting (TCM.miInterface mi), s)
 
 pairPositions :: HighlightingInfo -> String -> [(Integer, String, Aspects)]
@@ -124,7 +129,7 @@
         in kindClass ++ opClass
     aspectClasses a = [show a]
 
-    otherAspectClasses = map show
+    otherAspectClasses = map show . Set.toList
 
     -- Notes are not included.
     noteClasses _ = []
@@ -149,13 +154,13 @@
 convert :: String -> TopLevelModuleName -> TCM String
 convert classpr m =
     do (info, contents) <- getModule m
-       return . toMarkdown classpr m . groupLiterate . pairPositions info $ contents
+       return . toMarkdown classpr m . groupLiterate . pairPositions info . TL.unpack $ contents
 
-markdownAgda :: CommandLineOptions -> String -> FilePath -> IO String
-markdownAgda opts classpr fp =
+markdownAgda :: CommandLineOptions -> String -> SourceFile -> IO String
+markdownAgda opts classpr file =
     do let check = do
                TCM.setCommandLineOptions opts
-               checkFile (mkAbsolute fp) >>= convert classpr
+               checkFile file >>= convert classpr
        r <- TCM.runTCMTop $ check `catchError` \err -> do
                 s <- prettyError err
                 liftIO (putStrLn s)
@@ -189,7 +194,7 @@
              -- not be not the one where Hakyll is ran in.
              abfp <- canonicalizePath fp
              setCurrentDirectory (dropFileName abfp)
-             s <- markdownAgda aopt "Agda" abfp
+             s <- markdownAgda aopt "Agda" (SourceFile $ mkAbsolute abfp)
              let i' = i {itemBody = T.pack s}
              case Pandoc.runPure (traverse (readMarkdown ropt) i') of
                Left err -> fail $ "pandocAgdaCompilerWith: Pandoc failed with error " ++ show err
diff --git a/hakyll-agda.cabal b/hakyll-agda.cabal
--- a/hakyll-agda.cabal
+++ b/hakyll-agda.cabal
@@ -1,6 +1,6 @@
-Cabal-version:      >= 1.6
+Cabal-version:      >= 1.10
 Name:               hakyll-agda
-Version:            0.1.11
+Version:            0.1.12
 Author:             Francesco Mazzoli (f@mazzo.li)
 Maintainer:         Francesco Mazzoli (f@mazzo.li)
 Build-Type:         Simple
@@ -21,7 +21,7 @@
 
 Library
     Build-Depends:    base         >= 3 && < 5
-                    , Agda         == 2.5.*
+                    , Agda         >= 2.6.1
                     , containers
                     , directory
                     , filepath
@@ -33,3 +33,4 @@
                     , text
     GHC-Options:      -Wall
     Exposed-Modules:  Hakyll.Web.Agda
+    Default-Language:   Haskell2010
