Commit 73f465b6 authored by Mikhail Glushenkov's avatar Mikhail Glushenkov
Browse files


parent dd8c0946
......@@ -87,7 +87,7 @@ import Data.Char (isSpace, toLower, isAlphaNum, isDigit)
import Data.Maybe (fromMaybe)
import Data.Tree as Tree (Tree(..), flatten)
import qualified Data.Map as Map
import Control.Monad (foldM, ap)
import Control.Monad (foldM, ap)
import Control.Applicative (Applicative(..))
import System.FilePath (normalise)
import Data.List (sortBy)
......@@ -119,11 +119,11 @@ data ParseResult a = ParseFailed PError | ParseOk [PWarning] a
instance Functor ParseResult where
fmap _ (ParseFailed err) = ParseFailed err
fmap f (ParseOk ws x) = ParseOk ws $ f x
instance Applicative ParseResult where
pure = return
(<*>) = ap
instance Monad ParseResult where
return = ParseOk []
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment