       syntax.name[0].name.tokenKind == .underscore:
       return [.wild]
     case let syntax as NamedBasicExprSyntax:
-      return [.variable(QualifiedName(ast: syntax.name).name)]
+      let headName = QualifiedName(ast: syntax.name).name
+      if case let .some((fullName, .constructor(_, _))) = self.lookupLocalName(headName) {
+        return [.constructor(fullName, [])]
+      }
+      return [.variable(headName)]
     case let syntax as ApplicationExprSyntax:
       guard
         let firstExpr = syntax.exprs.first,


  private func scopeCheckPattern(
    _ syntax: BasicExprListSyntax) -> [DeclaredPattern] {
    assert(!syntax.isEmpty)

    let pats = syntax.flatMap(self.exprToDeclPattern)
    func openPatternVarsIntoScope(_ p: DeclaredPattern) -> Bool {
      switch p {

      let n = QualifiedName(ast: headExpr.name)
      guard n.string != "_->_" else {
        assert(syntax.exprs.count == 2)
        if let piParams = syntax.exprs[0] as? TypedParameterGroupExprSyntax {
          return rollPi(piParams.parameters.map(self.scopeCheckParameter),
                        self.scopeCheckExpr(syntax.exprs[1])).0
        }
        return .function(self.scopeCheckExpr(syntax.exprs[0]),
                         self.scopeCheckExpr(syntax.exprs[1]))
      }
