Skip to main content

All Questions

Filter by
Sorted by
Tagged with
4 votes
1 answer
885 views

Haskell: implementing Read for a custom dynamic value type

I'm using Haskell to interpret a dynamically-typed language. I have a sum type called Value which can represent some basic objects: ...
pxeger's user avatar
  • 143
5 votes
1 answer
183 views

Small combinator parsing library in Haskell

I recently wrote code to parse lambda expressions written in a lisp like format, using a small hand-rolled parsing library. The goal This code was written as a part of this code-golf challenge not as ...
Sriotchilism O'Zaic's user avatar
2 votes
1 answer
2k views

Simple Haskell Parser

I'm very new to haskell (I never used Monads, Functors and other things) and FP in general. I decided to write the simplest parser I possibly can with some expansion possibilities. (I have a general ...
somerandomdev49's user avatar
5 votes
1 answer
680 views

Python tokenizer in Haskell + Parsec

I wrote a tokenizer/lexer (difference?) for Python in Haskell: this is my code on GitHub. I already tested it out with some of CPython's standard library scripts, and it doesn't fail. However, it ...
Gabriel Garcia's user avatar
15 votes
4 answers
2k views

How to shorten this terrible HTTP header parser?

I am trying to read a line ending in \r\n from a Handle. This is an HTTP header. I’m fairly new to functional programming, so I ...
daknøk's user avatar
  • 664