--- 
name: Haskell
fileTypes: 
- hs
scopeName: source.haskell
uuid: 5C034675-1F6D-497E-8073-369D37E2FD7D
patterns: 
- name: entity.name.function.infix.haskell
  captures: 
    "1": 
      name: punctuation.definition.entity.haskell
    "2": 
      name: punctuation.definition.entity.haskell
  match: (`).*(`)
- name: keyword.other.haskell
  match: \b(otherwise|module|where|import|data|type|case|of|let|in|instance|deriving|class|newtype|default|hiding|as)\b
- name: punctuation.separator.equal-sign.haskell
  match: (?<![<=>/])=(?![=])
- name: punctuation.separator.pipe-sign.haskell
  match: (?<!\|)\|(?!(\||[\(\),_a-zA-Z0-9\s]*<-))
- name: keyword.operator.haskell
  match: \b(infixl|infixr)\b
- name: keyword.control.haskell
  match: \b(do|if|then|else)\b
- name: meta.preprocessor.haskell
  captures: 
    "1": 
      name: punctuation.definition.preprocessor.haskell
  match: ^\s*(#)\s*\w+
- name: string.quoted.double.haskell
  endCaptures: 
    "0": 
      name: punctuation.definition.string.end.haskell
  begin: "\""
  beginCaptures: 
    "0": 
      name: punctuation.definition.string.begin.haskell
  end: "\""
  patterns: 
  - name: constant.character.escape.haskell
    match: \\.
- name: string.quoted.single.haskell
  endCaptures: 
    "0": 
      name: punctuation.definition.string.end.haskell
  begin: "[^\\w']'"
  beginCaptures: 
    "0": 
      name: punctuation.definition.string.begin.haskell
  end: "'"
  patterns: 
  - name: constant.character.escape.haskell
    match: \\.
- name: meta.function.type-declaration.haskell
  begin: ^\s*([a-z_][a-zA-Z0-9_]*|\([|!%$+\-.,=</>]+\))\s*(::)
  beginCaptures: 
    "1": 
      name: entity.name.function.haskell
    "2": 
      name: punctuation.separator.double-colon.haskell
  end: $\n?
  patterns: 
  - name: punctuation.separator.arrow.haskell
    match: ->
  - name: punctuation.separator.big-arrow.haskell
    match: =>
  - name: variable.other.generic-type.haskell
    match: \b[a-z][a-zA-Z0-9,()_]*\b
  - name: constant.other.haskell
    match: \b[A-Z][a-zA-Z0-9,()_]*\b
- name: constant.other.haskell
  match: \b[A-Z]\w*\b
- name: comment.line.double-dash.haskell
  captures: 
    "1": 
      name: punctuation.definition.comment.haskell
  match: (--).*$\n?
- name: comment.block.haskell
  captures: 
    "0": 
      name: punctuation.definition.comment.haskell
  begin: "{-"
  end: -}
- name: entity.name.function.builtin.prelude.haskell
  match: \b(abs|acos|acosh|all|and|any|appendFile|applyM|asTypeOf|asin|asinh|atan|atan2|atanh|break|catch|ceiling|compare|concat|concatMap|const|cos|cosh|curry|cycle|decodeFloat|div|divMod|drop|dropWhile|elem|encodeFloat|enumFrom|enumFromThen|enumFromThenTo|enumFromTo|error|even|exp|exponent|fail|filter|flip|floatDigits|floatRadix|floatRange|floor|fmap|foldl|foldl1|foldr|foldr1|fromEnum|fromInteger|fromIntegral|fromRational|fst|gcd|getChar|getContents|getLine|head|id|init|interact|ioError|isDenormalized|isIEEE|isInfinite|isNaN|isNegativeZero|iterate|last|lcm|length|lex|lines|log|logBase|lookup|map|mapM|mapM_|max|maxBound|maximum|maybe|min|minBound|minimum|mod|negate|not|notElem|null|odd|or|otherwise|pi|pred|print|product|properFraction|putChar|putStr|putStrLn|quot|quotRem|read|readFile|readIO|readList|readLn|readParen|reads|readsPrec|realToFrac|recip|rem|repeat|replicate|return|reverse|round|scaleFloat|scanl|scanl1|scanr|scanr1|seq|sequence|sequence_|show|showChar|showList|showParen|showString|shows|showsPrec|significand|signum|sin|sinh|snd|span|splitAt|sqrt|subtract|succ|sum|tail|take|takeWhile|tan|tanh|toEnum|toInteger|toRational|truncate|uncurry|undefined|unlines|until|unwords|unzip|unzip3|userError|words|writeFile|zip|zip3|zipWith|zipWith3)\b
- name: entity.name.function.infix.haskell
  match: \([|!%$+\-.,=</>]+\)
keyEquivalent: ^~H
