Skip to content

Instantly share code, notes, and snippets.

View JakubGrobelny's full-sized avatar
🤔

Jakub Grobelny JakubGrobelny

🤔
  • Vewd/Xperi
  • Wrocław, Poland
View GitHub Profile
@LightAndLight
LightAndLight / lex-parse-megaparsec.lhs
Last active November 21, 2023 15:26
Lexing and parsing in Megaparsec
\begin{code}
{-# LANGUAGE TypeFamilies #-}
module Parser where
import Control.Applicative ((*>), (<|>))
import Control.Monad (void)
import Data.Functor (($>))
import Data.List.NonEmpty (NonEmpty(..))
import Data.Maybe (fromJust)