úÎÕ  The hexadecimal parser used for  expressions.  As an expression, the " quasiquoter provides hexadecimal    literals:  import Data.Hex.Quote &import qualified Data.ByteString as B  main = B.putStr [hex| 4 57 65 2c 20 61 6c 6f 6e 65 20 6f 6e 20 65 61 72 4 74 68 2c 20 63 61 6e 20 72 65 62 65 6c 20 61 67 4 61 69 6e 73 74 20 74 68 65 20 74 79 72 61 6e 6e 4 79 20 6f 66 20 74 68 65 20 73 65 6c 66 69 73 68 1 20 72 65 70 6c 69 63 61 74 6f 72 73 2e 0a |] All characters other than 0123456789abcdefABCDEF are ignored, including !whitespace. Comments start with "--" and continue to end-of-line:   code = [hex|  7e3a -- jle 0x3c # 4889f5 -- mov rbp, rsi # bb01000000 -- mov ebx, 0x1 ) 488b7d08 |] -- mov rdi, [rbp+0x8]  When using 8 as a pattern, you can include placeholders of the form < name:size>, where  name2 is a Haskell identifier, or the wildcard pattern "_"  size0 is the size of the field in bytes, or the word rest to consume  the rest of the  . 4The named placeholders bind local variables of type  . Here's ?an example of pattern-matching an IPv4-over-Ethernet-II frame:  import Data.Hex.Quote  describe [hex| 6 <src_mac:6> <dst_mac:6> 08 00 -- ethernet header 9 45 <_:1> <len:2> -- start of IP header > <_:rest> -- discard remaining frame  |] = (src_mac, dst_mac, len)  #describe _ = error "unknown frame" Quasiquotes require the  QuasiQuotes! extension. In pattern context,  also  requires the  ViewPatterns extension.       hexquote-0.1Data.Hex.QuoteparseHexhexTokTakeLit dropCommentshexMapliftBShexExp parseToks mkExtractmkPathexPatbytestring-0.9.2.0Data.ByteString.Internal ByteString